Commit Graph
13665 Commits
Author SHA1 Message Date
Darren Tucker 7b776066bc Update LibreSSL test 4.3.1->4.3.2. 2026-06-01 17:39:40 +10:00
[email protected] 684d26a3c4 upstream: sk-usbhid: skip unsupported key types in read_rks()
When enumerating resident keys, encountering a credential with an
unsupported COSE key type (not ES256 or EdDSA) caused the entire
enumeration to abort via goto out, discarding all valid keys.

Move the key type check before the per-credential allocation so
unsupported types can be skipped with continue instead. This
preserves all valid resident keys on the token.

Patch from Akhilesh Arora via GHPR657

OpenBSD-Commit-ID: b344a44ff97d26faf099b8e0cad72ad1e793ac0f
2026-06-01 15:50:05 +10:00
[email protected] de24573efc upstream: Actually set pollfd.events correctly for socket type
channels; previously we were throwing away the events we computed if the
channel had a c->sock distinct from it's other read and write fds.
Fortunately, it appears that this case happens rarely, if ever.

Reported by Darafei Praliaskouski via GHPR660

OpenBSD-Commit-ID: d3f483b7919946c5649e8c697d5b927af35aac4b
2026-06-01 15:41:25 +10:00
[email protected] 58b9381e0b upstream: handle compiled-time unsupported options in servconf.h
better; leave a zero placeholder variable so we don't have #ifdef around
their absence elsehwere in the tree

OpenBSD-Commit-ID: 9601de2c67042aacb0ea12ca424e67c092fa7801
2026-05-31 23:14:07 +10:00
Damien Miller ea91c7a1a9 depend 2026-05-31 22:23:42 +10:00
[email protected] 3bc4ac4394 upstream: unit test for new servconf.[ch] code, including a basic
fuzz test for deserialisation

OpenBSD-Regress-ID: f182c21485dc37a41a125f067b59bee48adbfe6c
2026-05-31 22:23:42 +10:00
[email protected] f2b815e42d upstream: the new configuration dump code emits configuration
directives with capitalisation (previously they were all lowercase), so make
the tests that consume them insensitive to case

OpenBSD-Regress-ID: 9a81d8501b8b8fc1c1a0d268d4cc91cbb19668f5
2026-05-31 22:23:41 +10:00
[email protected] 633a4c1a24 upstream: flesh out match_pattern() tests, including a new
comparison test of the new NFA-based implementation against the original one
for all possible combinations of short inputs and patterns constructed from a
small dictionary of possibilities.

OpenBSD-Regress-ID: a18e86c95afb6243ac270468f5dd0ab4a78c8074
2026-05-31 22:23:41 +10:00
[email protected] bebc855fdb upstream: big refactor of sshd config management code.
This generates much of the initialisation, defaults and keyword table
code from a set of macros rather than hand coding them. These same
macros are also used to generate serialisation and deserialisation
code.

The macros are admittedly ugly but have the advantage of forcing a
good degree of consistency across places that need to stay in sync
with each other.

The new de/serialisation code is used to pass configurations across
the various sshd-* process boundaries. This removes the need to pass
around raw text configurations that need to be re-parsed as well as
eliminating some raw pointer leakage across the processes where
structures were previously clumsily serialised.

feedback/ok markus@

OpenBSD-Commit-ID: 9a5109a480637e08c290eeb82aa8ef2ca7e848ce
2026-05-31 22:23:40 +10:00
[email protected] a1dd1c8068 upstream: avoid strlen(NULL) crash if an X11 channel was created before
the x11-req SSH_MSG_CHANNEL_REQUEST was sent. Reported by Ben Perry via
GHPR679

OpenBSD-Commit-ID: 31db0da9ab6c73e6bbf4021ffd53dc3ce5c65f23
2026-05-31 16:15:17 +10:00
[email protected] df18979e11 upstream: DNS0x20[1] can randomise the case of domain names returned by
lookup to force some more uniqueness in queries to reduce the likelihood of
spoofing attacks succeeding.

Normally this should be hidden from the user by the resolver, but
in some cases it can leak through. When it does, it can mess up
ssh's CanonicalizePermittedCNAMEs.

Fix this by forcing the name we received from the system resolver to
lowercase.

bz3966, report and fix by Martin D Kealey

[1] https://datatracker.ietf.org/doc/html/draft-vixie-dnsext-dns0x20-00

OpenBSD-Commit-ID: e0b300d3b3af289e053d928380af71949f95bfb0
2026-05-31 16:03:47 +10:00
[email protected] 5a5e47740b upstream: disallow use of the copy-data extension to read and write
to the same inode simultaneously; reported by Qifan Zhang of Palo Alto
Networks; ok markus@

OpenBSD-Commit-ID: 94ceb85146d92dbc1289c55d308498d5f56f274a
2026-05-31 15:03:58 +10:00
[email protected] 073faa6bec upstream: Fix two separate one-byte out-of-cound reads
1) if a server sent an empty reply to a SSH2_FXP_REALPATH request
2) if a batch command used the full 2048 byte buffer but ended in a
  literal backslash character

Both reported by Zhenpeng (Leo) Lin from depthfirst

ok markus@

OpenBSD-Commit-ID: d1ccc1f5a6eb109065ce8a552fea8e502381ce59
2026-05-31 15:03:57 +10:00
[email protected] 8dfe7ed6e2 upstream: DisableForwarding=yes didn't override PermitTunnel=yes
Reported independently by Huzaifa Sidhpurwala of Redhat and Marko
Jevtic; ok markus@

OpenBSD-Commit-ID: b5c13f0746cf079b21f8deba47407fad49ccbf4c
2026-05-31 15:03:57 +10:00
[email protected] 72b05ecd14 upstream: make the transport protocol stricter by disconnecting if
the peer sends non-KEX messages during a key re-exchange.

Previously an evil peer could continue sending non-KEX messages
without penalty, causing memory to be wasted up until the
connection terminated or the server/client hit a OOM limit.

reported by Marko Jevtic; ok markus@

OpenBSD-Commit-ID: 8937f0f2096156f5c68ae2dce77956373589d757
2026-05-31 15:03:56 +10:00
[email protected] 26cde4cfc5 upstream: stricter validation of the transport state passed from
the unprivileged preauth sshd-auth process to the user-privileged postauth
sshd-session process.

These are harmless unless an attacker had an exploit for sshd-auth
in which case they could be used for post-auth memory DoS or to
crash you own session in a new and exciting way.

Reported by bylee3 and Kayky Vinicius

ok markus

OpenBSD-Commit-ID: 214e256904a4ae4f83d2083096796c9689c1d7b5
2026-05-31 15:03:55 +10:00
[email protected] 10f66b2af9 upstream: Enforce a maximum size for usernames in agent key use
constraints

Along with the match_pattern() performance change that was just
committed this avoids a denial-of-service where an agent client could
waste CPU on an agent by sending user constraints with lots of
wildcards.

Reported by Huzaifa Sidhpurwala of Redhat

ok markus

OpenBSD-Commit-ID: 0483817f1a8accf4dbff42b7073ee4d119105d71
2026-05-31 15:03:55 +10:00
[email protected] 1e82d2cfcf upstream: fix client use-after-free on error path if cipher_init()
fails; reported by Qualys Security Advisory Team, ok markus@

OpenBSD-Commit-ID: a8731da0c462b2b9d11314ba505c26ee0cdada83
2026-05-31 15:03:54 +10:00
[email protected] 9d4c0b31f1 upstream: Replace the old recursive match_pattern() with an
implementation that uses a NFA for matching. This avoids the exponential
worst- case behaviour for the old implementation.

ok markus@

OpenBSD-Commit-ID: fc6b75a52f4c0acb52b7900658c8d25ff873cbae
2026-05-31 15:03:54 +10:00
Damien Miller 7ab700f170 Make failure to set SECCOMP or NO_NEW_PRIVS fatal
If your Linux system lacks support for these then please don't
enable the seccomp sandbox.

Prompted by [email protected]
2026-05-30 23:30:13 +10:00
Manfred Kaiser 4f4aeee6ed sandbox-seccomp-filter: remove duplicate SC_ALLOW(__NR_clock_gettime64)
The syscall is already permitted at line 297 in its own ifdef guard.
No functional change.
2026-05-30 23:30:12 +10:00
[email protected] 1690822136 upstream: Use the new RELINK feature in bsd.prog.mk to build the
relink kits.

OpenBSD-Commit-ID: df5c950444e208b320265fa8a1afd676e2edfa6e
2026-05-30 23:29:55 +10:00
[email protected] 3bee4a1a26 upstream: ssh: use sentinel idiom for timegm(3) and mktime(3)
There is nothing wrong with times before the epoch, even -1, so use the
idiom recently added to the CAVEATS section to figure out whether there
was an error in the timegm() or mktime() calls.

We should sweep the tree for this. If anyone is bored, feel free to beat
me to it...

ok deraadt djm

OpenBSD-Commit-ID: e2b1721966dc782e776db5d6cfb18958534f9d4b
2026-05-30 23:29:54 +10:00
[email protected] 26a8c13e61 upstream: ssh-agent: add -V to usage()
ok djm

OpenBSD-Commit-ID: ea9bc250ce34c4c8317896673ca37f3ee17223c7
2026-05-30 23:29:54 +10:00
[email protected] 3a05a07e78 upstream: use "ssh-agent -V" to test the binary is functional after
relinking requested deraadt@

OpenBSD-Commit-ID: eb4169949bf61188fb7336b11b73833019d10d7b
2026-05-30 23:29:53 +10:00
[email protected] 7fbe3e440e upstream: add a -V flag to print the version, but mostly as a way
to check the binary is functional; ok deraadt@

OpenBSD-Commit-ID: 0cc5cb22cbfe09ac4c316dd5da0af7a4193a42af
2026-05-30 23:27:34 +10:00
[email protected] f44f124a23 upstream: Test all mutually supported algorithms,
using dropbear's new -Q option to query its algorithms where possible.

OpenBSD-Regress-ID: 7e1fa733dec3bfa9f8931e535a9397209b5953f3
2026-05-28 18:33:20 +10:00
[email protected] 0cadf7e0e8 upstream: Dropbear recently added a -Q option;
use it to query KEX if available.

OpenBSD-Regress-ID: beab781f357e27e75dfdd2ec600a7dff2c63cb5b
2026-05-28 18:33:12 +10:00
[email protected] 0e2db7bc01 upstream: Fix skip message.
OpenBSD-Regress-ID: d192bbc19cc5914e64a3bb35a347eca0318729af
2026-05-28 18:33:04 +10:00
Darren Tucker 0a561f9067 Run hardenedmalloc test on ubuntu-latest.
Needed for newer clang that supports -std=c23.
2026-05-26 10:48:19 +10:00
Darren Tucker 3468ac7296 Hardenedmalloc needs -std=c23 so build with clang. 2026-05-26 09:35:42 +10:00
Michael Forney 42b213c66b Fix IPTOS_DSCP_VA fallback
0x2c is the unshifted value, and was copied over from openbsd before
it was fixed to be 0xb0 in [0].

Source of discrepancy identified by Leah Neukirchen.

[0] https://cvsweb.openbsd.org/log/src/sys/netinet/ip.h#rev1.22
2026-05-24 15:33:21 +10:00
Darren Tucker 66847768ff Add OpenBSD 7.9 test VM. 2026-05-21 18:39:54 +10:00
Darren Tucker d0d7981cf5 Another shell portability fix for Solaris. 2026-05-21 18:39:28 +10:00
Darren Tucker 498372545f Use backticks for shell portability w/ Solaris. 2026-05-21 18:25:50 +10:00
Darren Tucker 18b9db789e Add interop tests against Dropbear >= 2020.79 2026-05-21 18:01:01 +10:00
[email protected] a5a1b7e753 upstream: mention that compression could potentially leak
information about session contents (cf. the CRIME attack on TLS) if a
connection allows attacker- controlled traffic over it alongside trused
traffic. This might occur in some forwarding scenarios.

with deraadt@

OpenBSD-Commit-ID: 03d145cdbf3a8713e8309724b5c9a9b76c317749
2026-05-21 14:06:35 +10:00
[email protected] e5c9cf9ac7 upstream: mention usefulness of request type allow/denylisting for
servers accepting untrusted clients

OpenBSD-Commit-ID: 8b991bd263b46374a8e73f02d05cdccca73ae520
2026-05-21 14:06:35 +10:00
[email protected] 62fce76130 upstream: chacha: avoid -Wunterminated-string-initialization
warning

The sizes of sigma[] and tau[] aren't used, so include a trailing NUL and
thereby avoid upsetting modern compilers about use of dangerous, valid C.

ok deraadt djm

OpenBSD-Commit-ID: 030a71ff16bb1e6135170c6507bc558eabe7345c
2026-05-21 14:06:34 +10:00
[email protected] 33392024f4 upstream: avoid validating bad cipher or mac lists in config files
/ commandline arguments as valid.

Identified by SUSE and reported by Camila Camargo de Matos

ok deraadt@ tb@

OpenBSD-Commit-ID: 45d51154f2418549e08b80fa33df6c6532046054
2026-05-21 14:06:01 +10:00
[email protected] cf6c0b3b94 upstream: fix hard-to-reach NULL deref during pubkey auth
To hit this, the user must be using a PEM style private key with no
corresponding .pub key adjacent to it.

OpenBSD-Commit-ID: b7150acc5322fa33f21491834d9471fbe3d30f20
2026-05-13 15:12:18 +10:00
Darren Tucker 55df196e39 Retire OmniOS r151046 & r151054 test configs.
They require packages from an external mirror which has been unreliable
lately, so stop relying on it.
2026-05-12 19:53:54 +10:00
Darren Tucker 6d9116d4df Handle missing packages for FreeBSD 12.4.
(Most) FreeBSD mirrors no longer have packages for 12.x, so install the
only thing we need (sudo) from source on.
2026-05-12 19:47:13 +10:00
Darren Tucker 99f1e0c2f9 OmniOS: check for gcc before installing. 2026-05-12 18:50:20 +10:00
Darren Tucker ded80eb0ff Add VM test versions for : OmniOS and FreeBSD.
Add OmniOS r151056 and r151058 (with build-essentials, so hopefully
faster and lower dependency) and FreeBSD 12.4 for better coverage.
2026-05-12 18:07:45 +10:00
Damien Miller 67f31cefd8 update getrrsetbyname.c from OpenBSD upstream
revision 1.15
date: 2026/05/09 01:54:51;  author: tb;  state: Exp;  lines: +14 -13;  commitid: zZPVUWycKAslGJtO;
Avoid recursive cleanup in getrrsetbyname()

Instead of freeing struct dns_query and struct dns_rr by walking the
linked lists recursively, use a simple loop. This avoids a possible
stack exhaustion unlikely to be reachable with the limits modern
resolvers impose.

From Dhiraj Mishra
2026-05-12 14:36:27 +10:00
Darafei Praliaskouski 56e73cd804 ci: avoid rsync dependency in NetBSD VM jobs 2026-05-11 18:16:59 +10:00
[email protected] ac4a41265a upstream: unbreak; spotted by Darren's test army
OpenBSD-Commit-ID: e95ceda842a2c7a08fc00ac3a529877d87fee7b2
2026-05-05 16:23:36 +10:00
[email protected] 3754f2edd4 upstream: classify dynamic-tcpip channels as bulk, not interactive;
bz3958, ok markus@

OpenBSD-Commit-ID: b18f1c1eaff8423bf069ff6103e8865cec18d64b
2026-05-05 15:35:28 +10:00
Darren Tucker 4ea08a0353 Improve NetBSD PAM tests.
- Set random password and use for password auth test.
 - When testing PAM builds, test with and without UsePAM.
2026-05-05 00:09:12 +10:00