]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
5 weeks agoupstream: don't use deprecated ERR_load_crypto_strings()
djm@openbsd.org [Mon, 29 Jun 2026 07:46:22 +0000 (07:46 +0000)] 
upstream: don't use deprecated ERR_load_crypto_strings()

GHPR650 from Mike Frysinger

OpenBSD-Regress-ID: bfe86d9be1db4569c091f3d763cba04ddbb86ec0

5 weeks agodon't leak rrset on fail; GHPR681 from metsw24-max
Damien Miller [Mon, 29 Jun 2026 07:21:01 +0000 (17:21 +1000)] 
don't leak rrset on fail; GHPR681 from metsw24-max

ok dtucker

5 weeks agocheck sockaddr length; GHPR681 from metsw24-max
Damien Miller [Mon, 29 Jun 2026 07:18:58 +0000 (17:18 +1000)] 
check sockaddr length; GHPR681 from metsw24-max

ok dtucker

5 weeks agoreturn result of raise(2); GHPR681 from metsw24-max
Damien Miller [Mon, 29 Jun 2026 07:17:28 +0000 (17:17 +1000)] 
return result of raise(2); GHPR681 from metsw24-max

ok dtucker

5 weeks agouse size_t for lengths; GHPR681 from metsw24-max
Damien Miller [Mon, 29 Jun 2026 07:16:55 +0000 (17:16 +1000)] 
use size_t for lengths; GHPR681 from metsw24-max

ok dtucker

5 weeks agofix leak of error path; GHPR681 from metsw24-max
Damien Miller [Mon, 29 Jun 2026 07:15:10 +0000 (17:15 +1000)] 
fix leak of error path; GHPR681 from metsw24-max

ok dtucker

5 weeks agoupstream: don't print an error message when trying to load a host
djm@openbsd.org [Mon, 29 Jun 2026 07:36:37 +0000 (07:36 +0000)] 
upstream: don't print an error message when trying to load a host

private key when PKCS#11 keys are in use, as these don't need the private
half on the filesystem. GHPR664 from Ingo Franzki

OpenBSD-Commit-ID: c93352e218cb1b74af04e8dc3a42eddec1f312c0

5 weeks agoupstream: make ssh-add open it's connection to the agent after it
djm@openbsd.org [Mon, 29 Jun 2026 02:13:05 +0000 (02:13 +0000)] 
upstream: make ssh-add open it's connection to the agent after it

has finished getopt() processing and not before. This allows the -v flag to
work properly.

ok jca@

OpenBSD-Commit-ID: b9ac820018875aeb5b43ae2119a70c16a5cd2aef

5 weeks agoupstream: Fix bounds checking when signing messages of length
djm@openbsd.org [Mon, 29 Jun 2026 02:08:55 +0000 (02:08 +0000)] 
upstream: Fix bounds checking when signing messages of length

greater than will fit in a size_t. In OpenSSH, messages sizes are bounded by
SSHBUF_SIZE_MAX so this was unreachable. From Swival scanner.

OpenBSD-Commit-ID: 31ab874abe21a528fa995d78023c5ad9444a31e1

5 weeks agoupstream: fix ECDSA order check for curves with cofactor != 1. All
djm@openbsd.org [Mon, 29 Jun 2026 01:58:29 +0000 (01:58 +0000)] 
upstream: fix ECDSA order check for curves with cofactor != 1. All

supported EC curves have cofactor 1, so this is a nop. From Swival scanner

OpenBSD-Commit-ID: 4ae44cc97714fcb6d19fa56714ede56c1ef521e1

5 weeks agoupstream: avoid situation where sftp_download() could get stuck in
djm@openbsd.org [Mon, 29 Jun 2026 01:53:21 +0000 (01:53 +0000)] 
upstream: avoid situation where sftp_download() could get stuck in

a loop if a broken server repeatedly returned zero length while reading a
file. Identified by Swival scanner

OpenBSD-Commit-ID: 53f1de5065ff01952d2abb51747c2418ce21cd96

5 weeks agoupstream: avoid download to server-controlled path when performing
djm@openbsd.org [Mon, 29 Jun 2026 01:47:21 +0000 (01:47 +0000)] 
upstream: avoid download to server-controlled path when performing

download on the commandline. From Swival scanner

OpenBSD-Commit-ID: d1b2c44305fdfe6d51eed9ecc727e59478bf311f

5 weeks agoupstream: resist that return ".." via remote glob during
djm@openbsd.org [Sun, 28 Jun 2026 23:47:16 +0000 (23:47 +0000)] 
upstream: resist that return ".." via remote glob during

remote/remote copies, similar to fixes for bz3871 for remote/local copies.
From Swival scanner

OpenBSD-Commit-ID: c0c20a1b746db55c08e53658bf21ea9405b300a5

5 weeks agoupstream: avoid possible NULL deref; from Swival scanner
djm@openbsd.org [Sun, 28 Jun 2026 23:31:28 +0000 (23:31 +0000)] 
upstream: avoid possible NULL deref; from Swival scanner

OpenBSD-Commit-ID: 62ea8e12b7cddee933596e72f8ab0f7364147c0f

5 weeks agoupstream: mention that ssh-keyscan output is only as trustworthy as
djm@openbsd.org [Fri, 26 Jun 2026 06:17:13 +0000 (06:17 +0000)] 
upstream: mention that ssh-keyscan output is only as trustworthy as

the network between it and the SSH server; ok markus@

OpenBSD-Commit-ID: 067845df7e8eb776408de5f23a2e6e7019945834

6 weeks agoDropbear master -> main here too.
Darren Tucker [Wed, 24 Jun 2026 22:14:47 +0000 (08:14 +1000)] 
Dropbear master -> main here too.

6 weeks agoDropbear's master is now main.
Darren Tucker [Wed, 24 Jun 2026 12:05:05 +0000 (22:05 +1000)] 
Dropbear's master is now main.

6 weeks agoupstream: Avoid printf("%s", NULL) since it's not guaranteed to be safe
dtucker@openbsd.org [Wed, 24 Jun 2026 11:59:09 +0000 (11:59 +0000)] 
upstream: Avoid printf("%s", NULL) since it's not guaranteed to be safe

and will segfault on some -portable platforms.

OpenBSD-Commit-ID: b49d588f8becf6363305aac42d7d9660fc7fe3ba

6 weeks agoFix handling of rh-allow-sha1-signatures on Cygwin
Darren Tucker [Wed, 24 Jun 2026 09:22:36 +0000 (19:22 +1000)] 
Fix handling of rh-allow-sha1-signatures on Cygwin

The format of openssl.cnf has changed, so append to it instead of trying
to insert into it.  Test that openssl can sign RSA with SHA1 before
proceeding.

6 weeks agoMake -j2 for faster builds.
Darren Tucker [Wed, 24 Jun 2026 09:05:12 +0000 (19:05 +1000)] 
Make -j2 for faster builds.

6 weeks agoSet CYGWIN at top-level.
Darren Tucker [Wed, 24 Jun 2026 09:04:48 +0000 (19:04 +1000)] 
Set CYGWIN at top-level.

The ensures the symlinks created in any step (eg, logs) are native
symlinks and can be understood by the log upload step.

6 weeks agoupstream: mention a caveat regarding GSSAPIStrictAcceptorCheck in
djm@openbsd.org [Wed, 24 Jun 2026 06:55:12 +0000 (06:55 +0000)] 
upstream: mention a caveat regarding GSSAPIStrictAcceptorCheck in

some environments

OpenBSD-Commit-ID: aa7158d8f22cb34063c1c2d3cbcf30a9489847c2

6 weeks agoupstream: add some logging to make debugging interactive/bulk
djm@openbsd.org [Wed, 24 Jun 2026 06:53:57 +0000 (06:53 +0000)] 
upstream: add some logging to make debugging interactive/bulk

classification mistakes easier next time (though I think we've got them all
now, really)

OpenBSD-Commit-ID: 5fe3dd4e76ffba787a423e301095d55cf5b0f0dc

6 weeks agoupstream: add a missing channels type for bulk/interactive
djm@openbsd.org [Wed, 24 Jun 2026 06:53:11 +0000 (06:53 +0000)] 
upstream: add a missing channels type for bulk/interactive

classification bz3972; ok dtucker@

OpenBSD-Commit-ID: 9c9442ea14be74877e2c876b1fe9fa20d158dd97

6 weeks agoSet build options in /etc/mk.conf once at startup.
Darren Tucker [Wed, 24 Jun 2026 02:19:53 +0000 (12:19 +1000)] 
Set build options in /etc/mk.conf once at startup.

6 weeks agoupstream: Check return values from malloc.
dtucker@openbsd.org [Mon, 22 Jun 2026 12:28:48 +0000 (12:28 +0000)] 
upstream: Check return values from malloc.

OpenBSD-Regress-ID: 28c8ab94a4fa5d047cec9c865b10bbf3c9ccf6d1

6 weeks agoupstream: Check return value of sscanf.
dtucker@openbsd.org [Mon, 22 Jun 2026 12:08:33 +0000 (12:08 +0000)] 
upstream: Check return value of sscanf.

OpenBSD-Regress-ID: e06a8c769541b1aa7d663cc8859ddabd93847e81

6 weeks agoupstream: annotate tm_wday = -1 with /* sentinel for error */ per
tb@openbsd.org [Sun, 21 Jun 2026 19:23:56 +0000 (19:23 +0000)] 
upstream: annotate tm_wday = -1 with /* sentinel for error */ per

timegm(3) manpage

suggested by deraadt

OpenBSD-Commit-ID: 2fa92f0b826f0ab9e5d1cb0b2243b8e2f80951b2

6 weeks agoupstream: remove cipher_set_keyiv() as nothing uses it from
djm@openbsd.org [Fri, 19 Jun 2026 05:26:04 +0000 (05:26 +0000)] 
upstream: remove cipher_set_keyiv() as nothing uses it from

Loganaden Velvindron

OpenBSD-Commit-ID: 2a6636388028e6f7aa6837d6484a369f3d9c0818

6 weeks agoOutput Actions allowlist for uploading to Github.
Darren Tucker [Mon, 22 Jun 2026 11:28:58 +0000 (21:28 +1000)] 
Output Actions allowlist for uploading to Github.

6 weeks agoAdd script to lookup and pin Actions to hashes.
Darren Tucker [Mon, 22 Jun 2026 09:00:15 +0000 (19:00 +1000)] 
Add script to lookup and pin Actions to hashes.

Update recently changed Cygwin Actions and pin remaining unpinned ones.

6 weeks agoci: pin upstream.yml actions to full commit SHAs
El Mehdi Abenhazou [Wed, 3 Jun 2026 01:02:31 +0000 (02:02 +0100)] 
ci: pin upstream.yml actions to full commit SHAs

Signed-off-by: El Mehdi Abenhazou <mehdiananas007@gmail.com>
6 weeks agoci: pin GitHub Actions to full commit SHAs
El Mehdi Abenhazou [Wed, 3 Jun 2026 01:02:30 +0000 (02:02 +0100)] 
ci: pin GitHub Actions to full commit SHAs

Pinning actions/checkout, actions/upload-artifact, and
cygwin/cygwin-install-action to their full commit SHA instead of
mutable branch/tag references (main, master).

Using mutable refs means a compromised or malicious update to the
action repository could silently alter the workflow behavior.
Pinning to SHA makes the exact version immutable and auditable.

Signed-off-by: El Mehdi Abenhazou <mehdiananas007@gmail.com>
7 weeks agoupstream: Factor out hex2bin into a shared helper function.
dtucker@openbsd.org [Tue, 16 Jun 2026 22:27:10 +0000 (22:27 +0000)] 
upstream: Factor out hex2bin into a shared helper function.

Replace sscanf %hhx (which is C99) with plain %x for better compatibility
in -portable. ok djm@

OpenBSD-Regress-ID: 4d30bb27ffdf2154f1a9f2317df18d256717b300

7 weeks agoupstream: Use awk instead of cut to help -portable.
dtucker@openbsd.org [Tue, 16 Jun 2026 10:58:42 +0000 (10:58 +0000)] 
upstream: Use awk instead of cut to help -portable.

Some platforms have size limits on cut.

OpenBSD-Regress-ID: fe871e8ed43fd92efb0df76f61c5cc9c5429ea82

7 weeks agoupstream: Include stdarg.h for va_list (needed for xmalloc.h).
dtucker@openbsd.org [Tue, 16 Jun 2026 09:00:47 +0000 (09:00 +0000)] 
upstream: Include stdarg.h for va_list (needed for xmalloc.h).

OpenBSD-Regress-ID: 34a6d5db48eec77f92f868093dfa0bfc10ae4622

7 weeks agoupstream: Include stdlib.h for malloc/free and sort headers.
dtucker@openbsd.org [Tue, 16 Jun 2026 08:15:35 +0000 (08:15 +0000)] 
upstream: Include stdlib.h for malloc/free and sort headers.

OpenBSD-Regress-ID: 4f5f427b131f5d6b32ed107b9bef098153f768ce

7 weeks agoRemove check for OpenSSL w/out AES192/256.
Darren Tucker [Tue, 16 Jun 2026 08:16:32 +0000 (18:16 +1000)] 
Remove check for OpenSSL w/out AES192/256.

This was the case for some old Solaris versions, but the support for it
has long been removed from our compat layer so there's no point checking
for it.

7 weeks agoupstream: use different strategy to check whether keys are present or
djm@openbsd.org [Mon, 15 Jun 2026 06:36:52 +0000 (06:36 +0000)] 
upstream: use different strategy to check whether keys are present or

absent in the agent; helps some -portable tests on platforms that have stupid
grep(1)

OpenBSD-Regress-ID: 0cee7ecc437eee7471dc6ccc3b3a0c2b60c1ad2d

7 weeks agoupstream: avoid use of paste(1); helps portable
djm@openbsd.org [Mon, 15 Jun 2026 06:24:20 +0000 (06:24 +0000)] 
upstream: avoid use of paste(1); helps portable

OpenBSD-Regress-ID: ce3ad41b34af9fc16af83e4711a62231ee52a95c

7 weeks agoanother place mldsa-ed25519 keys need deactivation
Damien Miller [Mon, 15 Jun 2026 02:53:53 +0000 (12:53 +1000)] 
another place mldsa-ed25519 keys need deactivation

7 weeks agoupstream: fix multiple problems with testing hostkey types that are not
djm@openbsd.org [Mon, 15 Jun 2026 01:55:44 +0000 (01:55 +0000)] 
upstream: fix multiple problems with testing hostkey types that are not

enabled by default.

1) Add all hostkey types in the "multiple hostkeys" subtest.
  Previously known_hosts was accidentally clobbered, causing
  only the last added hostkey type to be used.
2) Explicitly enable the hostkey types under test via
  HostKeyAlgorithms

OpenBSD-Regress-ID: 8f12d18b79b5cc8a748e187a0e95529cd85a9dcc

7 weeks agobring back mlkem768x25519-sha256 stubs
Damien Miller [Mon, 15 Jun 2026 01:43:52 +0000 (11:43 +1000)] 
bring back mlkem768x25519-sha256 stubs

should fix C89 compile

7 weeks agodon't build ML-KEM/ML-DSA code with <C99 compilers
Damien Miller [Sun, 14 Jun 2026 10:32:12 +0000 (20:32 +1000)] 
don't build ML-KEM/ML-DSA code with <C99 compilers

7 weeks agoinclude includes.h
Damien Miller [Sun, 14 Jun 2026 10:24:25 +0000 (20:24 +1000)] 
include includes.h

7 weeks agoprovide a htobe32() replacement
Damien Miller [Sun, 14 Jun 2026 08:56:31 +0000 (18:56 +1000)] 
provide a htobe32() replacement

7 weeks agohook up new regress/unittests/crypto
Damien Miller [Sun, 14 Jun 2026 05:02:24 +0000 (15:02 +1000)] 
hook up new regress/unittests/crypto

7 weeks agoupstream: unit and regression tests for composite PQ ML-DSA44/Ed25519
djm@openbsd.org [Sun, 14 Jun 2026 04:08:05 +0000 (04:08 +0000)] 
upstream: unit and regression tests for composite PQ ML-DSA44/Ed25519

keys.

Includes a new unittests/crypto test that tests basic functionality
of the underlying crypto primitives against public test vectors

OpenBSD-Regress-ID: 4463b2e8adec391efa24a953f3c911b72892ca80

7 weeks agoupstream: make crypto_sign_ed25519_keypair_from_seed non-static.
djm@openbsd.org [Sun, 14 Jun 2026 04:16:19 +0000 (04:16 +0000)] 
upstream: make crypto_sign_ed25519_keypair_from_seed non-static.

The new ML-DSA/ed25519 code needs it

OpenBSD-Commit-ID: 48d00a2094bca8e422494aaa76105c708837436e

7 weeks agoupstream: Add experimental support for a composite post-quantum
djm@openbsd.org [Sun, 14 Jun 2026 03:59:34 +0000 (03:59 +0000)] 
upstream: Add experimental support for a composite post-quantum

signature scheme that combines ML-DSA 44 and Ed25519 using the construction
specified in draft-ietf-lamps-pq-composite-sigs. There's also an early draft
documenting use of the integration of this scheme into SSH as
draft-miller-sshm-mldsa44-ed25519-composite-sigs

This scheme is not enabled by default. To you use, you'll need
to add it to HostKeyAlgorithms, PubkeyAcceptedAlgorithms, etc.
Keys may be generated using "ssh-keygen -t mldsa44-ed25519".

The ML-DSA implementation comes from libcrux. Thanks to
Jonas Schneider-Bensch and Jonathan Protzenko for their work to
make this available.

Consensus is that it's time to get this in to allow people to
experiment with it.

feedback markus@ tb@ logan@ deraadt@

OpenBSD-Commit-ID: 85f2d41e3d3374b4e8c28a45a7c92f153c4489e2

7 weeks agoupstream: when replying to a "query" SSH_AGENTC_EXTENSION request,
djm@openbsd.org [Sat, 13 Jun 2026 00:37:13 +0000 (00:37 +0000)] 
upstream: when replying to a "query" SSH_AGENTC_EXTENSION request,

don't append an SSH_AGENT_SUCCESS to the reply to the query. bz3967 ok
dtucker@

OpenBSD-Commit-ID: b51418708096e26dbf73a0c1d3cb49b7352bc899

2 months agoupstream: Make crypto_sign_ed25519_keypair_from_seed()
dtucker@openbsd.org [Sun, 7 Jun 2026 08:50:17 +0000 (08:50 +0000)] 
upstream: Make crypto_sign_ed25519_keypair_from_seed()

static to prevent compiler warnings since it's only used within ed25519.c.

OpenBSD-Commit-ID: cf8b1e8f364167eb1766f646cc18a40f32242991

2 months agoupstream: Import updated moduli
dtucker@openbsd.org [Sun, 7 Jun 2026 08:21:07 +0000 (08:21 +0000)] 
upstream: Import updated moduli

OpenBSD-Commit-ID: c3081ccc6e4c1cb21e68c36f5a92e6d9f09e70b3

2 months agosync fmt_scaled.c with OpenBSD upstream
Damien Miller [Sat, 6 Jun 2026 23:56:41 +0000 (09:56 +1000)] 
sync fmt_scaled.c with OpenBSD upstream

Notably picks up this commit:

revision 1.24
date: 2026/06/06 23:49:25;  author: djm;  state: Exp;  lines: +28 -12;  commitid: oznzDs0MaUT3FEqO;
rearrange scan_scaled(3) ordering of multiplications and divisions
to better preserve accuracy for large exponents. From metsw24-max
via https://github.com/openssh/openssh-portable/pull/671/

ok tb@

2 months agoupstream: pass >9 commandline arguments to the internal-sftp server,
djm@openbsd.org [Fri, 5 Jun 2026 08:53:07 +0000 (08:53 +0000)] 
upstream: pass >9 commandline arguments to the internal-sftp server,

previously they were silently dropped; reported by Steve Caffrey ok deraadt@

OpenBSD-Commit-ID: ee6cd5430a3ca027c3223af54b58ad3cc7ccd624

2 months agoupstream: avoid truncation of pathnames headed to lstat() for
djm@openbsd.org [Fri, 5 Jun 2026 08:48:43 +0000 (08:48 +0000)] 
upstream: avoid truncation of pathnames headed to lstat() for

systems where PATH_MAX is not the actual max; reported by sahvx655-wq via
GHPR688

OpenBSD-Commit-ID: fcbeeff99d857f2f3916ad06570fa05fc38b0f07

2 months agoupstream: rename a variable to be more accurate
djm@openbsd.org [Fri, 5 Jun 2026 06:51:02 +0000 (06:51 +0000)] 
upstream: rename a variable to be more accurate

OpenBSD-Commit-ID: bf277f2832125eb40ac2c9fa3ea66e31214f2131

2 months agoupstream: add signature malleability and pubkey validity checks to 686/head 687/head
djm@openbsd.org [Thu, 4 Jun 2026 04:26:51 +0000 (04:26 +0000)] 
upstream: add signature malleability and pubkey validity checks to

ed25519 verification (SSH doesn't depend on these properties) Pointed out by
Soatok Dreamseeker

Add an explicit-seed variant of the keygen function.

feedback / "looks fine" tb@

OpenBSD-Commit-ID: 2a71926bfda24628cf34a88357f44a790e338d5d

2 months agoupstream: refer to RFC9987 instead of I-D
djm@openbsd.org [Tue, 2 Jun 2026 06:18:27 +0000 (06:18 +0000)] 
upstream: refer to RFC9987 instead of I-D

OpenBSD-Commit-ID: 6b273c50c2aa818b9144b8d9ab568c4239023297

2 months agoReformat setup_ci command line.
Darren Tucker [Tue, 2 Jun 2026 11:57:42 +0000 (21:57 +1000)] 
Reformat setup_ci command line.

This prevents setup_ci from running twice on Cygwin due to different
parsing of the command line since on Windows it's run via Powershell.

2 months agoFix search for awk formatter.
Darren Tucker [Tue, 2 Jun 2026 12:20:44 +0000 (22:20 +1000)] 
Fix search for awk formatter.

AC_PATH_PROG only takes a single binary to look for, AC_PATH_PROGS is
what's needed for more than one.  Looks like an error by me in 285546b.

2 months agoReplace shell-level timeout with dedicated command.
Darren Tucker [Tue, 2 Jun 2026 08:49:02 +0000 (18:49 +1000)] 
Replace shell-level timeout with dedicated command.

It turns out the systems we run this workflow on all have timeout(1),

2 months agoAdd a single retry to VM package install steps.
Darren Tucker [Tue, 2 Jun 2026 08:10:25 +0000 (18:10 +1000)] 
Add a single retry to VM package install steps.

These are potentially flaky due to network issues, so hopefully this
will reduce the number of manual retries needed.

2 months agoAdd includes.h for compat functions.
Darren Tucker [Tue, 2 Jun 2026 07:44:12 +0000 (17:44 +1000)] 
Add includes.h for compat functions.

Fixes build on at least old AIX.

2 months agosetup_ci.sh: add timeout and allow one retry
Darren Tucker [Mon, 1 Jun 2026 10:43:31 +0000 (20:43 +1000)] 
setup_ci.sh: add timeout and allow one retry

2 months agoupstream: differentiate between execution failures and subsystem not
djm@openbsd.org [Mon, 1 Jun 2026 08:27:28 +0000 (08:27 +0000)] 
upstream: differentiate between execution failures and subsystem not

found when logging why a subsystem failed to start; GHPR#637 from cuiweixie

OpenBSD-Commit-ID: 42bc40dd6272b7f6726b069a8c4e16025a354056

2 months agoDon't install shim for AWK=awk.
Darren Tucker [Mon, 1 Jun 2026 08:26:31 +0000 (18:26 +1000)] 
Don't install shim for AWK=awk.

If configure finds an undadorned awk, don't install the shim to prevent
recursive calls to it.

2 months agoPass awk detected by configure to regress tests.
Darren Tucker [Mon, 1 Jun 2026 07:40:03 +0000 (17:40 +1000)] 
Pass awk detected by configure to regress tests.

Some platforms' basic awk don't have toupper, but other awks like nawk
or gawk do.  Pass the one found by configure through to the regress
tests, and make a wrapper for it so we don't need to modify any tests.

2 months agoUpdate LibreSSL test 4.3.1->4.3.2.
Darren Tucker [Mon, 1 Jun 2026 07:39:40 +0000 (17:39 +1000)] 
Update LibreSSL test 4.3.1->4.3.2.

2 months agoupstream: sk-usbhid: skip unsupported key types in read_rks()
djm@openbsd.org [Mon, 1 Jun 2026 05:49:20 +0000 (05:49 +0000)] 
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

2 months agoupstream: Actually set pollfd.events correctly for socket type
djm@openbsd.org [Mon, 1 Jun 2026 05:40:13 +0000 (05:40 +0000)] 
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

2 months agoupstream: handle compiled-time unsupported options in servconf.h
djm@openbsd.org [Sun, 31 May 2026 13:12:07 +0000 (13:12 +0000)] 
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

2 months agodepend
Damien Miller [Sun, 31 May 2026 12:03:56 +0000 (22:03 +1000)] 
depend

2 months agoupstream: unit test for new servconf.[ch] code, including a basic
djm@openbsd.org [Sun, 31 May 2026 11:39:44 +0000 (11:39 +0000)] 
upstream: unit test for new servconf.[ch] code, including a basic

fuzz test for deserialisation

OpenBSD-Regress-ID: f182c21485dc37a41a125f067b59bee48adbfe6c

2 months agoupstream: the new configuration dump code emits configuration
djm@openbsd.org [Sun, 31 May 2026 11:31:57 +0000 (11:31 +0000)] 
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

2 months agoupstream: flesh out match_pattern() tests, including a new
djm@openbsd.org [Sun, 31 May 2026 04:20:58 +0000 (04:20 +0000)] 
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

2 months agoupstream: big refactor of sshd config management code.
djm@openbsd.org [Sun, 31 May 2026 11:30:50 +0000 (11:30 +0000)] 
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

2 months agoupstream: avoid strlen(NULL) crash if an X11 channel was created before
djm@openbsd.org [Sun, 31 May 2026 06:14:42 +0000 (06:14 +0000)] 
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

2 months agoupstream: DNS0x20[1] can randomise the case of domain names returned by
djm@openbsd.org [Sun, 31 May 2026 05:55:21 +0000 (05:55 +0000)] 
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

2 months agoupstream: disallow use of the copy-data extension to read and write
djm@openbsd.org [Sun, 31 May 2026 04:59:51 +0000 (04:59 +0000)] 
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

2 months agoupstream: Fix two separate one-byte out-of-cound reads
djm@openbsd.org [Sun, 31 May 2026 04:51:45 +0000 (04:51 +0000)] 
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

2 months agoupstream: DisableForwarding=yes didn't override PermitTunnel=yes
djm@openbsd.org [Sun, 31 May 2026 04:47:29 +0000 (04:47 +0000)] 
upstream: DisableForwarding=yes didn't override PermitTunnel=yes

Reported independently by Huzaifa Sidhpurwala of Redhat and Marko
Jevtic; ok markus@

OpenBSD-Commit-ID: b5c13f0746cf079b21f8deba47407fad49ccbf4c

2 months agoupstream: make the transport protocol stricter by disconnecting if
djm@openbsd.org [Sun, 31 May 2026 04:44:38 +0000 (04:44 +0000)] 
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

2 months agoupstream: stricter validation of the transport state passed from
djm@openbsd.org [Sun, 31 May 2026 04:37:56 +0000 (04:37 +0000)] 
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

2 months agoupstream: Enforce a maximum size for usernames in agent key use
djm@openbsd.org [Sun, 31 May 2026 04:31:04 +0000 (04:31 +0000)] 
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

2 months agoupstream: fix client use-after-free on error path if cipher_init()
djm@openbsd.org [Sun, 31 May 2026 04:24:39 +0000 (04:24 +0000)] 
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

2 months agoupstream: Replace the old recursive match_pattern() with an
djm@openbsd.org [Sun, 31 May 2026 04:19:16 +0000 (04:19 +0000)] 
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

2 months agoMake failure to set SECCOMP or NO_NEW_PRIVS fatal
Damien Miller [Sat, 30 May 2026 13:24:01 +0000 (23:24 +1000)] 
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 manfred.kaiser@ssh-mitm.at

2 months agosandbox-seccomp-filter: remove duplicate SC_ALLOW(__NR_clock_gettime64)
Manfred Kaiser [Sun, 24 May 2026 07:53:42 +0000 (09:53 +0200)] 
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.

2 months agoupstream: Use the new RELINK feature in bsd.prog.mk to build the
deraadt@openbsd.org [Wed, 27 May 2026 13:57:26 +0000 (13:57 +0000)] 
upstream: Use the new RELINK feature in bsd.prog.mk to build the

relink kits.

OpenBSD-Commit-ID: df5c950444e208b320265fa8a1afd676e2edfa6e

2 months agoupstream: ssh: use sentinel idiom for timegm(3) and mktime(3)
tb@openbsd.org [Wed, 27 May 2026 13:54:15 +0000 (13:54 +0000)] 
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

2 months agoupstream: ssh-agent: add -V to usage()
tb@openbsd.org [Wed, 27 May 2026 03:28:07 +0000 (03:28 +0000)] 
upstream: ssh-agent: add -V to usage()

ok djm

OpenBSD-Commit-ID: ea9bc250ce34c4c8317896673ca37f3ee17223c7

2 months agoupstream: use "ssh-agent -V" to test the binary is functional after
djm@openbsd.org [Wed, 27 May 2026 03:05:21 +0000 (03:05 +0000)] 
upstream: use "ssh-agent -V" to test the binary is functional after

relinking requested deraadt@

OpenBSD-Commit-ID: eb4169949bf61188fb7336b11b73833019d10d7b

2 months agoupstream: add a -V flag to print the version, but mostly as a way
djm@openbsd.org [Wed, 27 May 2026 03:04:30 +0000 (03:04 +0000)] 
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

2 months agoupstream: Test all mutually supported algorithms,
dtucker@openbsd.org [Wed, 27 May 2026 23:04:36 +0000 (23:04 +0000)] 
upstream: Test all mutually supported algorithms,

using dropbear's new -Q option to query its algorithms where possible.

OpenBSD-Regress-ID: 7e1fa733dec3bfa9f8931e535a9397209b5953f3

2 months agoupstream: Dropbear recently added a -Q option;
dtucker@openbsd.org [Tue, 12 May 2026 13:02:40 +0000 (13:02 +0000)] 
upstream: Dropbear recently added a -Q option;

use it to query KEX if available.

OpenBSD-Regress-ID: beab781f357e27e75dfdd2ec600a7dff2c63cb5b

2 months agoupstream: Fix skip message.
dtucker@openbsd.org [Mon, 4 May 2026 10:57:24 +0000 (10:57 +0000)] 
upstream: Fix skip message.

OpenBSD-Regress-ID: d192bbc19cc5914e64a3bb35a347eca0318729af

2 months agoRun hardenedmalloc test on ubuntu-latest.
Darren Tucker [Tue, 26 May 2026 00:48:19 +0000 (10:48 +1000)] 
Run hardenedmalloc test on ubuntu-latest.

Needed for newer clang that supports -std=c23.

2 months agoHardenedmalloc needs -std=c23 so build with clang.
Darren Tucker [Mon, 25 May 2026 23:33:51 +0000 (09:33 +1000)] 
Hardenedmalloc needs -std=c23 so build with clang.

2 months agoFix IPTOS_DSCP_VA fallback
Michael Forney [Thu, 21 May 2026 17:02:00 +0000 (03:02 +1000)] 
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