1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-21 20:55:02 +00:00
Commit Graph

243638 Commits

Author SHA1 Message Date
tb
97142c6557 ssl_sigalg_pkey_ok: allow RSASSA-PSS with pubkey OID RSASSA-PSS
This fixes a long-standing logic error that hasn't been noticed because
we never announced the rsa_pss_pss_sha{256,384,512} SignatureScheme. The
EVP_PKEY_id() of a RSA-PSS pubkey is EVP_PKEY_RSA_PSS, not EVP_PKEY_RSA.

Thanks to beck for helping me figure out how to fix this correctly. It
drove me nuts for a very long time. Problem also noticed by Tom Lane
due to some PostgreSQL regress failures.

ok djm jsing kenjiro
2026-03-30 06:02:21 +00:00
tb
a8b0d4d0a7 ssl_sigalgs: whitespace tweak 2026-03-30 05:49:31 +00:00
afresh1
03db75a2bd Improve OpenBSD::Unveil POD
The choice of variable names made it somewhat unclear what arguments
to pass and made it seem the interface might differ from unveil(2).

ok dgl@
2026-03-30 00:00:04 +00:00
kirill
b6590ac202 sys/iwx: enable 160Mhz window at 5Ghz
OK: kn@, phessler@, stsp@
2026-03-29 21:17:50 +00:00
kirill
a17ca92d14 sys/net80211: support of 160Mhz window at 5Ghz
OK: kn@, phessler@, stsp@
2026-03-29 21:16:21 +00:00
bluhm
751ff169a1 Remove useless memory barriers in igmp and mld6 timer.
Multicast timers are protected by poper locks.  The shortcut that
avoids locking when no timers are scheduled, does not need an
additional membar.

OK mvs@
2026-03-29 18:08:07 +00:00
daniel
7ab78e8bd0 FNM_CASEFOLD (and its synonym FNM_IGNORECASE) are now part of POSIX.1-2024
Flagged by Sortix os-test.

ok millert@, guenther@
2026-03-29 14:08:46 +00:00
kirill
2bea9c5040 sys/tmpfs: use getnanotime() like FFS and MFS
Editing files on tmpfs uses nanotime() to update mtime, and touch uses
utimensat(UTIME_NOW) which uses getnanotime() which is cached and which
can be smaller.

So, sed ... A && touch B leads to mtime(A) > mtime(B) which isn't excted.

"Yep" deraadt@
2026-03-29 09:37:33 +00:00
tb
6b1826a526 ML-KEM: ensure that key_768 is only dereferenced with 768-bit keys
This looks like a NULL dereference that should crash, but for some reason
it doesn't, even with -O0 with all compilers i tried.  At the very least it
may result in compilers deducing that key_768 != NULL and lead to incorrect
optimizations.

ok claudio jsing kenjiro miod
2026-03-29 06:31:07 +00:00
anton
98d16a20cf Add missing include path required to reach newly added crypto_assembly.h
include.
2026-03-29 06:19:12 +00:00
mglocker
e0872ad225 Fix typo. 2026-03-29 05:29:02 +00:00
djm
8c0bc7d7b0 switch from int to long long for bandwidth calculations; fixes
rate display when rate > 2GB/s; based on patch from Cyril Servant
feedback/ok deraadt@
2026-03-29 01:08:13 +00:00
deraadt
69012ea1b2 After the kernel-writes-the-buffer changes to profil(2) a year ago, the
profil(2) call only works for stop/restart of profiling.  So pledge no
longer interferes and it is available in "stdio".
2026-03-28 17:12:01 +00:00
dv
2ec97aa487 Remove pthread rwlocks from vmd(8)'s qcow code.
The users of this code are single threaded today. The locks also
don't look to fully protect key state in qcow images. If/when virtio
block emulation ends up with multiple virtqueues, this will need
to be revisited.

ok mlarkin@, hshoexer@
2026-03-28 16:22:04 +00:00
jsing
b39c1312a5 Include crypto_assembly.h instead of manually ensuring _CET_ENDBR exists.
ok kenjiro@ tb@
2026-03-28 13:11:28 +00:00
jsing
8a6c24b7af Provide a crypto_assembly.h internal header.
This will contain defines and macros that we need for assembly code,
without polluting other headers that are primarily used for C code.

For now, this just unconditionally provides _CET_ENDBR on amd64.

ok kenjiro@ tb@
2026-03-28 13:09:55 +00:00
tb
cc88cbeddb libtls: const workarounds for X509_NAME in OCSP for OpenSSL 4
The API to look up a cert by subject or issuer name clearly only needs to
do name comparisons in a collection of certs so should by all means take a
const X509_NAME * as an argument. However, this isn't all that easy to do
and hence it's only in OpenSSL 4 that this obvious step was reached.

This means that there is no way around casting for older code. One could
cast the return value of X509_get_issuer_name() or the argument passed to
the two lookups by subject. jsing slightly prefers the second approach,
so this is what we do here.

ok djm jsing kenjiro
2026-03-28 11:49:31 +00:00
tb
99d6452825 libtls: simple cases of const for X509_NAME *
After the const sprinkling in OpenSSL 1.1, X509_get_{issuer,subject}_name()
still returned a non-const pointer for unclear reasons. In OpenSSL 4,
the return value also grew a const qualifier, so move the two "name" in
tls_conninfo.c and the "subject_name" in tls_verify.c to const. They are
only used for further processing by already const correct functions (at
least as far as X509_NAME is concerned).

ok djm jsing kenjiro
2026-03-28 11:33:33 +00:00
dgl
dca08cedf0 Test that __pledge_open can bypass unveil. 2026-03-28 07:23:57 +00:00
djm
41316900b8 ensure c->local_window doesn't underflow during updates;
similar to checks performed elsewhere. From Renaud Allard
2026-03-28 05:16:18 +00:00
djm
102666c504 fix base16 parsing; currently unused. From Renaud Allard 2026-03-28 05:10:25 +00:00
djm
27d8b97729 mention that RevokedKeys is read by the server at each
authentication time and should only ever be replaced
atomically.
2026-03-28 05:07:12 +00:00
djm
a02abb8f37 fix potential hang if /etc/moduli doesn't contain the requested
DH group values; from 77c9ca, ok dtucker@, markus@
2026-03-28 05:06:16 +00:00
deraadt
1f66bff071 improve explanation of when it __pledge_open works 2026-03-28 04:13:52 +00:00
daniel
70d21af179 wcwidth(3): fix return value for L'\0'
wcwidth(3) doesn't return the correct result for the NUL wide character.
Fix this by special casing the check for this value.

Interestingly our man page documents this special case explicitly, but it
looks like the function was broken in rev 1.2 from 2011 when support for
non-printable characters was added.

Flagged by Sortix os-test.

ok stsp@
2026-03-27 20:35:08 +00:00
daniel
9d790fdba9 catgets(3): set errno when a message isn't found as per POSIX.
The same change was made by NetBSD in rev 1.13 in 1998.

Flagged by Sortix os-test.

ok guenther@
2026-03-27 20:05:58 +00:00
tb
ddc5737dc1 rpki-client regress: initial plumbing to make this work with OpenSSL 4.0 2026-03-27 19:55:35 +00:00
tb
f43b20dd87 rpki-client regress: drop unused EOPENSSL_PATH 2026-03-27 19:54:10 +00:00
tb
a05c290d1b rpki-client regress: drop another hardcoded eopenssl35 2026-03-27 19:52:38 +00:00
bluhm
b9b707e00d Fix unveil in NFS daemon.
With process accouting, nfsd(8) complains about unveil(2) violations.
It happens during daemon(3) in the child process.  Instead of
unveiling / and /dev/null, move unveil(2) after daemon(3).

OK deraadt@
2026-03-27 19:19:41 +00:00
tb
09b639a88d rpki-client regress: avoid hardcoding eopenssl35 2026-03-27 18:00:17 +00:00
deraadt
7f72b710e6 after a report from 'K r' on bugs that the manual page section rfc868 '-o'
option has incorrect dates, let's recognize that this is no longer a good
way to get time information and only the ntp interface is needed.
ok sthen florian henning
2026-03-27 14:33:58 +00:00
claudio
ceb7e02c45 Make pthread_mutex_destroy() not error out for mutexes that were initalized
with PTHREAD_MUTEX_INITIALIZER but not used.

Unify handling of mutexp == NULL in both version of pthread_mutex_destroy()
and ensure that *mutexp == NULL is not considered an error.

Problem found by tb@ with rpki-client.
OK kettenis@ tb@
2026-03-27 12:26:58 +00:00
nicm
f3ad7971a2 Ql -> Fl, from arza at arza dot us in GitHub issue 4949. 2026-03-27 08:41:54 +00:00
nicm
f7baf5c87e Add a format flag for bracket paste, from George Nachman in GitHub issue
4951.
2026-03-27 08:40:26 +00:00
job
cdc47337d7 Properly reset accounting in HTTP gzip compression detection
OK tb@
2026-03-27 08:10:46 +00:00
dgl
e75afad489 stat() and access() become "rpath", this is safe because pledge_namei no longer
has a special case for these two system calls. With this change pledge "stdio"
no longer lets user code reach namei().

ok deraadt
2026-03-27 05:15:25 +00:00
deraadt
081c22237c incremental improvement documenting recent changes
ok beck dgl
2026-03-27 05:14:38 +00:00
dgl
30d294c44e Hook up __pledge_open regress. 2026-03-27 05:07:02 +00:00
dgl
69556c7634 Add __pledge_open regress. 2026-03-27 05:06:33 +00:00
hshoexer
019066103c acpidmar(4): Recognize reserved 4-byte IVHD device entry
Otherwise parsing of folling entries is aborted.

While there, fix a debug printf.

ok kettenis@
2026-03-27 03:56:15 +00:00
daniel
45720098d5 shm_open(3): align the type of the mode_t parameter with POSIX
POSIX says that sys/mman.h should also define mode_t which is currently
missing.

With mode_t defined there, the type of the last parameter of the shm_open
function can be changed from __mode_t to mode_t, matching the standard.

Both issues flagged by Sortix os-test.

ok deraadt@, millert@
2026-03-26 21:46:24 +00:00
claudio
2f434a4256 Bump version to 9.1 2026-03-26 19:29:07 +00:00
op
1388771ffa table_proc: ensure the request does not contain newlines 2026-03-26 18:43:53 +00:00
op
3d6043dede reject usernames (or passwords) with line feeds in it
initial diff from philipp (at bureaucracy.de), tweaked by me.
2026-03-26 18:43:40 +00:00
stsp
d0edea5c70 Fix a fatal firmware error during association on non-MIMO iwx(4) devices.
If MIMO is disabled we must not try to configure Tx rates in firmware
which require MIMO. Otherwise we trigger sysassert 0x20101A0D.

Problem reported and fix tested by Kirill Kaplin.
Meaning of sysassert hex code provided by Johannes Berg, thanks!
2026-03-26 15:39:04 +00:00
kirill
dc89590874 sys/iwx: move interface into SCAN after CSA or eCSA/XCSA from AP
Reported by mwpudrtxoe

Input: stsp@

Feedback: phessler@ stsp@ mvs@

OK: phessler@ stsp@
2026-03-26 12:15:48 +00:00
kirill
eb89943cc2 sys/net80211: skip AP which announces CSA or eCSA/XCSA
Reported by mwpudrtxoe

Input: stsp@

Feedback: phessler@ stsp@ mvs@

OK: phessler@ stsp@
2026-03-26 12:15:01 +00:00
jmatthew
596398d5de mention RK3528 support 2026-03-26 06:12:38 +00:00
jmatthew
9c6370df4f Add support for the RK3528 variant of the combo phy, currently only in
PCIe mode, though USB3 may follow later.

corrections from kettenis@ and Hayk Martirosyan
ok kettenis@
2026-03-26 05:59:38 +00:00