1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-15 01:34:03 +00:00

243904 Commits

Author SHA1 Message Date
tb
38cd3ff5d2 relay_tls_ctx_create: plug tls_cfg leak
If the second tls_cfg_new() call fails, the tls_cfg is leaked.

From Jan Schreiber
2026-04-02 13:38:24 +00:00
tb
6515c4104f relayd: error check bsearch in relay_httperror_byid()
If relay_httperror_byid() is passed a HTTP error code not in the table
this would result in a NULL deref. The intent is that the code fall back
to "Unknown error" on NULL return.

From Jan Schreiber
2026-04-02 13:35:36 +00:00
tb
97281f0902 relayd: fix NULL check for strdup()
Due to a copy-paste error, relay_lookup_query() would check the wrong kv
member for NULL.

From Jan Schreiber
2026-04-02 13:28:22 +00:00
bluhm
c055930d45 Add regress test for TCP Selective ACK packets. 2026-04-02 11:54:06 +00:00
kirill
88e30ec869 sys/iwx: align antenna patterns and STBC with iwlwifi
Follow iwlwifi for antenna pattern and STBC advertisement. Advertise RX
antenna pattern only when RX is effectively 1x1; advertise HT and VHT
STBC unconditionally, and VHT TX antenna pattern only when TX is
effectively 1x1, and program the firmware TLC STBC flag when the peer
advertises RX STBC and the device has more than one valid TX antenna.

OK: stsp@
2026-04-02 11:19:45 +00:00
nicm
bd9eac5a7a Do not leak command in list-keys, reported by tb@. Also tidy up some
function names while here.
2026-04-02 09:58:14 +00:00
nicm
4245707926 Do not leak trimmed string when expanding, found by ossfuzz. 2026-04-02 09:35:46 +00:00
nicm
3c769161d8 Use INT_MIN + 1 as strtonum lower limits in formats so -ve works, found
by ossfuzz.
2026-04-02 09:28:22 +00:00
nicm
b47f74b422 Limit argc to between 0 and 1000 to prevent fatal from MSG_COMMAND, from
Michal Majchrowicz.
2026-04-02 09:11:39 +00:00
nicm
dac62aa1e0 Handle empty regular expression in substitution, found by ossfuzz. 2026-04-02 08:45:35 +00:00
nicm
228dbe0fa0 Check for \0 after skipping # not before in format_expand1, from ossfuzz. 2026-04-02 08:37:14 +00:00
nicm
012a125b6d Fix NULL dereference in sort.c, from Dane Jensen. 2026-04-02 08:01:47 +00:00
djm
32cc01e8dc adapt to username validity check change 2026-04-02 07:52:15 +00:00
djm
14539578db openssh-10.3 2026-04-02 07:51:12 +00:00
djm
572646d530 move username validity check for usernames specified on the
commandline to earlier in main(), specifically before some
contexts where a username with shell characters might be
expanded by a %u directive in ssh_config.

We continue to recommend against using untrusted input on
the SSH commandline. Mitigations like this are not 100%
guarantees of safety because we can't control every
combination of user shell and configuration where they are
used.

Reported by Florian Kohnhäuser
2026-04-02 07:50:55 +00:00
djm
f68503eaa6 correctly match ECDSA signature algorithms against algorithm
allowlists: HostKeyAlgorithms, PubkeyAcceptedAlgorithms and
HostbasedAcceptedAlgorithms.

Previously, if any ECDSA type (say "ecdsa-sha2-nistp521") was
present in one of these lists, then all ECDSA algorithms would
be permitted.

Reported by Christos Papakonstantinou of Cantina and Spearbit.
2026-04-02 07:48:13 +00:00
djm
aaf4b0e819 when downloading files as root in legacy (-O) mode and without the
-p (preserve modes) flag set, clear setuid/setgid bits from
downloaded files as one might expect.

AFAIK this bug dates back to the original Berkeley rcp program.

Reported by Christos Papakonstantinou of Cantina and Spearbit.
2026-04-02 07:42:16 +00:00
djm
b171efd1c6 add missing askpass check when using ControlMaster=ask/autoask
and "ssh -O proxy ..."; reported by Michalis Vasileiadis
2026-04-02 07:39:57 +00:00
djm
e58fa79f4b Fix possible sshd crash when sshd_config set MaxStartups to a
value <10 using the single-argument form of MaxStartups (e.g.
MaxStartups=3). This doesn't affect the three-argument form
of the directive (e.g. MaxStartups 3:20:5).

Patch from Peter Kaestle via bz3941
2026-04-02 07:38:14 +00:00
jsg
ac4a125d9e match recent Intel parts
ok deraadt@ mlarkin@
2026-04-02 07:33:15 +00:00
jsg
51b8af5964 match on Panther Lake
ok deraadt@ mlarkin@
2026-04-02 07:31:09 +00:00
jsg
2e263234e2 regen 2026-04-02 07:26:45 +00:00
jsg
3d1960dc6e add Intel Panther Lake ids
from Mesa and:
Intel Core Ultra Processors (Series 3)
Datasheet, Volume 1 of 2, Doc. No.: 872188, Rev.: 001

ok deraadt@ mlarkin@
2026-04-02 07:25:48 +00:00
deraadt
8c0eb659e2 sync 2026-04-02 01:11:00 +00:00
afresh1
8eafb9a57f Update to perl 5.42.2
The two main changes are both from 5.42.1, a timezone fix and a
corner case for auto-vivification.

The CVE from 5.42.1 we had already patched and the zlib update in
5.42.2 is in code we don't use because we link against the system
zlib.

https://metacpan.org/release/SHAY/perl-5.42.1/view/pod/perldelta.pod
https://metacpan.org/release/SHAY/perl-5.42.2/view/pod/perldelta.pod

I'm not concerned -- sthen@
I think you can just commit this -- naddy@
good timing -- deraadt@
OK -- blumh@
2026-04-01 23:20:53 +00:00
tobhe
3eaa2c8301 If we receive a response it must have the exact same msgid as the last
request we sent, so make sure they match exactly rather than allowing
higher msgids.
We can't handle out of order responses and if we don't receive a response
in time we retransmit our request until we get one or run into a timeout.

Found by Dirk Loss
ok markus@ hshoexer@
2026-04-01 19:04:22 +00:00
tobhe
0ea06f527d iked only ever handles one exchange at a time so we can drop the
entire fragment queue instead of doing a lookup based on the msgid

Found by Dirk Loss
ok markus@ hshoexer@
2026-04-01 18:58:15 +00:00
tobhe
4b14e38b97 Add ikev2_validate_ef() to validate fragment payload header size field
as we do for other IKEv2 payloads.

Reported by Dirk Loss
ok markus@
2026-04-01 18:43:20 +00:00
tobhe
77eba9704e Add SA state check for CREATE_CHILD_SA exchange, similar to what we do
for INFORMATIONAL exchanges. iked currently assumes that IKE_AUTH always
results in valid child SAs, so IKEV2_STATE_ESTABLISHED means we have
successfully completed the IKE_AUTH exchange for the SA.

Independently found by Dirk Loss and Daniel Polak (SYS.nl)
ok and discussed with markus@ stsp@
2026-04-01 18:36:49 +00:00
deraadt
7c6b5cdc9f chars[] array needs to be sized 256 because it is indexed at many places
by (unsigned char) from input data.
from Renaud Allard
2026-04-01 17:49:40 +00:00
deraadt
2092d1748e Use an unsigned sum value to provide deterministic overflow behaviour,
for input to the hash.
from Renaud Allard
2026-04-01 17:47:46 +00:00
deraadt
dc8703adcd Range-check fields inside the file to ensure they don't exceed the size
of the file and cause later crashes.
from renaud allard
2026-04-01 16:58:22 +00:00
deraadt
471a995e78 Do the unveil() after the daemon() call, because otherwise we wouldneed
"/dev/null" "rw" and "/" "r", in particular the second is ugly.
pointed out by bluhm, discussion also with dgl.
2026-04-01 15:39:05 +00:00
jsing
0d123a3a59 Adjust depth check to match change in verifier. 2026-04-01 14:39:11 +00:00
jsing
63d3a7e33d Restore the previous behaviour with maximum verification depth.
The maximum depth is not expected to include the leaf certificate - restore
the decrement prior to checking, which means the previous behaviour is
retained for the callback depth and the maximum depth. Reduce the maximum
depth by one in order to avoid the overwrite that could previously occur.

Thanks to anton@ for flagging the rust-openssl failure in regress.

ok tb@
2026-04-01 14:38:26 +00:00
op
9532dfe990 fix possible out of bound in text_to_netaddr
diff from Renaud Allard (renaud at allard.it), thanks!
ok deraadt
2026-04-01 11:20:58 +00:00
op
76af690f2b fix possible out of bound access in dname_expand()
spotted by Renaud Allard (thanks!), diff tweaked by me.

ok deraadt@
2026-04-01 11:19:01 +00:00
nicm
ffc378411d Fixed missing drag end detection and mouse button detection with
modifiers. From Dane Jensen, reported by Joseph Tyson and Mark Kelly.
2026-04-01 08:10:02 +00:00
jsg
f7a3fa387c mdoc fixes 2026-04-01 02:34:37 +00:00
jsg
215c0970ab add .Nm for __pledge_open, makes 'man __pledge_open' work 2026-04-01 02:32:49 +00:00
kirill
57871d3766 sys/iwx: increase maximal VHT A-MPDU from 64K to 1024K
OK: stsp@
2026-04-01 02:29:37 +00:00
jsg
8716a8b212 remove whitespace at eol 2026-04-01 02:08:38 +00:00
jsg
9efff6d8cc spelling 2026-04-01 02:05:06 +00:00
jsg
c0f9fe8338 make ddb output visible when entering ddb from X on amdgpu
add a call to drm_fb_helper_restore_fbdev_mode_unlocked()
to amdgpu_enter_ddb() otherwise ddb output can't be seen

not required on inteldrm or radeondrm
2026-04-01 01:29:25 +00:00
dv
c9b2dc6761 Clean up vmctl, remove use of vmd's log.c.
This reimplements simpler versions of logging functions needed for
linking the qcow and raw disk image code from vmd.

Also cleans up the Makefile a bit, removing atomicio.c which is
unused.

ok mlarkin@
2026-04-01 00:51:50 +00:00
deraadt
aaea3278ec delete AMD smt related line accidentally deleted 2026-03-31 16:53:02 +00:00
deraadt
1675bd6d03 warn if hw.smt is used, and recommend hw.blockcpu 2026-03-31 16:46:46 +00:00
deraadt
7ce80b6577 Some new intel machines have a new 3rd tier of cpus called LP-E which are
E-core (Atom) without L3 cache.  These cpus are Lethargic, and it sucks
when processes migrate to them.
This introduces sysctl hw.blockcpu= which takes a sequence of 4 letters.
S (for SMT), P (regular performance cpu), E (efficient cpu) generally
80% to 50% as fast), and L (lethargic cpu) which are even slower.
By setting this, you can select cpus to kick out of the scheduler.  The
default is SL.
The hw.smt sysctl remains for now but we will eventually delete it.
hw.smt changes and follows hw.blockcpu=S.
ok kettenis mlarkin
2026-03-31 16:46:21 +00:00
deraadt
9f2496a895 add ci_cputypes field which will be needed by an upcoming MI change
ok kettenis
2026-03-31 16:37:48 +00:00
kettenis
26388c13bd Attempt to power on attached USB hubs. Add support for SpacemiT K1.
ok phessler@, jca@, jsing@
2026-03-31 14:42:54 +00:00