]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
2 days agoUse backticks for shell portability w/ Solaris. github-selfhosted/master github/master
Darren Tucker [Thu, 21 May 2026 08:25:50 +0000 (18:25 +1000)] 
Use backticks for shell portability w/ Solaris.

2 days agoAdd interop tests against Dropbear >= 2020.79
Darren Tucker [Tue, 19 May 2026 08:37:26 +0000 (18:37 +1000)] 
Add interop tests against Dropbear >= 2020.79

2 days agoupstream: mention that compression could potentially leak
djm@openbsd.org [Thu, 21 May 2026 04:04:57 +0000 (04:04 +0000)] 
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

2 days agoupstream: mention usefulness of request type allow/denylisting for
djm@openbsd.org [Thu, 21 May 2026 02:50:59 +0000 (02:50 +0000)] 
upstream: mention usefulness of request type allow/denylisting for

servers accepting untrusted clients

OpenBSD-Commit-ID: 8b991bd263b46374a8e73f02d05cdccca73ae520

2 days agoupstream: chacha: avoid -Wunterminated-string-initialization
tb@openbsd.org [Mon, 18 May 2026 04:14:57 +0000 (04:14 +0000)] 
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

2 days agoupstream: avoid validating bad cipher or mac lists in config files
djm@openbsd.org [Wed, 13 May 2026 05:58:58 +0000 (05:58 +0000)] 
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

10 days agoupstream: fix hard-to-reach NULL deref during pubkey auth
djm@openbsd.org [Wed, 13 May 2026 05:11:02 +0000 (05:11 +0000)] 
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

11 days agoRetire OmniOS r151046 & r151054 test configs.
Darren Tucker [Tue, 12 May 2026 09:53:54 +0000 (19:53 +1000)] 
Retire OmniOS r151046 & r151054 test configs.

They require packages from an external mirror which has been unreliable
lately, so stop relying on it.

11 days agoHandle missing packages for FreeBSD 12.4.
Darren Tucker [Tue, 12 May 2026 09:43:48 +0000 (19:43 +1000)] 
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.

11 days agoOmniOS: check for gcc before installing.
Darren Tucker [Tue, 12 May 2026 08:50:20 +0000 (18:50 +1000)] 
OmniOS: check for gcc before installing.

11 days agoAdd VM test versions for : OmniOS and FreeBSD.
Darren Tucker [Tue, 12 May 2026 08:05:24 +0000 (18:05 +1000)] 
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.

11 days agoupdate getrrsetbyname.c from OpenBSD upstream
Damien Miller [Tue, 12 May 2026 04:36:27 +0000 (14:36 +1000)] 
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

12 days agoci: avoid rsync dependency in NetBSD VM jobs
Darafei Praliaskouski [Sat, 9 May 2026 15:50:31 +0000 (19:50 +0400)] 
ci: avoid rsync dependency in NetBSD VM jobs

2 weeks agoupstream: unbreak; spotted by Darren's test army
djm@openbsd.org [Tue, 5 May 2026 06:21:14 +0000 (06:21 +0000)] 
upstream: unbreak; spotted by Darren's test army

OpenBSD-Commit-ID: e95ceda842a2c7a08fc00ac3a529877d87fee7b2

2 weeks agoupstream: classify dynamic-tcpip channels as bulk, not interactive;
djm@openbsd.org [Tue, 5 May 2026 05:34:27 +0000 (05:34 +0000)] 
upstream: classify dynamic-tcpip channels as bulk, not interactive;

bz3958, ok markus@

OpenBSD-Commit-ID: b18f1c1eaff8423bf069ff6103e8865cec18d64b

2 weeks agoImprove NetBSD PAM tests.
Darren Tucker [Mon, 4 May 2026 13:33:57 +0000 (23:33 +1000)] 
Improve NetBSD PAM tests.

 - Set random password and use for password auth test.
 - When testing PAM builds, test with and without UsePAM.

2 weeks agoImprove FreeBSD PAM tests.
Darren Tucker [Mon, 4 May 2026 13:15:05 +0000 (23:15 +1000)] 
Improve FreeBSD PAM tests.

 - Set random password and use for password auth test.
 - When testing PAM builds, test with and without UsePAM.

2 weeks agoUpdate to FreeBSD 14.4, add 15.0.
Darren Tucker [Mon, 4 May 2026 12:57:58 +0000 (22:57 +1000)] 
Update to FreeBSD 14.4, add 15.0.

2 weeks agoImprove Solaris PAM tests.
Darren Tucker [Mon, 4 May 2026 11:40:52 +0000 (21:40 +1000)] 
Improve Solaris PAM tests.

 - Set up and run tests with SUDO.
 - Set random password to use for password & kbdint auth tests.
 - Only run t-exec when re-testing with PAM, don't rerun unit tests.
 - When testing PAM builds, test with and without UsePAM.

2 weeks agoOnly run t-exec when re-testing with PAM.
Darren Tucker [Mon, 4 May 2026 11:39:01 +0000 (21:39 +1000)] 
Only run t-exec when re-testing with PAM.

There's no point rerunning unit tests.

2 weeks agoAdd Solaris 11.4-clang-19 test.
Darren Tucker [Mon, 4 May 2026 08:47:03 +0000 (18:47 +1000)] 
Add Solaris 11.4-clang-19 test.

2 weeks agoAdd RUN_ONLY_PLATFORM to run a subset of tests.
Darren Tucker [Mon, 4 May 2026 07:41:37 +0000 (17:41 +1000)] 
Add RUN_ONLY_PLATFORM to run a subset of tests.

2 weeks agoskip ("#if 0") strvisx and stravis
Damien Miller [Mon, 4 May 2026 06:05:34 +0000 (16:05 +1000)] 
skip ("#if 0") strvisx and stravis

we don't use the in OpenSSH and some compilers throw warnings
compiling them that break -Werror

3 weeks agoRemove 9.9 and 10.0 branches from build status page.
Darren Tucker [Thu, 30 Apr 2026 23:19:56 +0000 (09:19 +1000)] 
Remove 9.9 and 10.0 branches from build status page.

3 weeks agovm.yml: fix solaris PAM tests
Renaud Allard [Sat, 21 Mar 2026 18:23:04 +0000 (19:23 +0100)] 
vm.yml: fix solaris PAM tests

Add missing SSHD_CONFOPTS="UsePam yes" to the solaris PAM test
step so it actually tests PAM functionality instead of re-running
the default tests with a PAM-enabled binary.

3 weeks agoupstream: fiddle with mask after umask call and not before; avoids
djm@openbsd.org [Wed, 29 Apr 2026 22:22:10 +0000 (22:22 +0000)] 
upstream: fiddle with mask after umask call and not before; avoids

fortify warnings on android. bz3954

OpenBSD-Commit-ID: 82224426b2ee989c68f305caa50aa3d3b4993a84

3 weeks agoupstream: unveil the actual listening socket path and its directory
djm@openbsd.org [Tue, 28 Apr 2026 21:32:05 +0000 (21:32 +0000)] 
upstream: unveil the actual listening socket path and its directory

so it can be cleaned up at exit.

Reported by / tested by David Krause, ok markus@

OpenBSD-Commit-ID: b45d740e9a63dec0fad436ed78f6912b39f0cd53

3 weeks agoupstream: Clarify comment on what setting extended types for
job@openbsd.org [Mon, 20 Apr 2026 07:43:52 +0000 (07:43 +0000)] 
upstream: Clarify comment on what setting extended types for

channels does

OK djm@

OpenBSD-Commit-ID: fa035fb19b74571992fa3adca4396a4c572a7a8a

3 weeks agoAdd tracking for 10.3 branch.
Darren Tucker [Tue, 28 Apr 2026 23:14:31 +0000 (09:14 +1000)] 
Add tracking for 10.3 branch.

3 weeks agoRename obsd arm64 snapshot VM for consistency.
Darren Tucker [Mon, 27 Apr 2026 23:09:57 +0000 (09:09 +1000)] 
Rename obsd arm64 snapshot VM for consistency.

3 weeks agoupstream: Use supported hostkeyalgorithms specifically in
dtucker@openbsd.org [Mon, 27 Apr 2026 05:49:41 +0000 (05:49 +0000)] 
upstream: Use supported hostkeyalgorithms specifically in

sshd_config instead of supported key types, which is almost but not
completely correct.

OpenBSD-Regress-ID: 43c3b348576900f3e710bff5d6a87f0e803c5b3d

3 weeks agoupstream: Drop -Winline from CDIAGFLAGS it breaks on sparc64
claudio@openbsd.org [Thu, 23 Apr 2026 12:57:47 +0000 (12:57 +0000)] 
upstream: Drop -Winline from CDIAGFLAGS it breaks on sparc64

On sparc64 ssh/unittests/kex fails to build with:
 usr.bin/ssh/libcrux_mlkem768_sha3.h:8196: warning: inlining failed
 in call to 'libcrux_ml_kem_polynomial_ZERO_89_ea':
 --param max-inline-insns-single limit reached

OK djm@ (long time ago) reminded by tb@

OpenBSD-Regress-ID: c32094e3436536474039a4aeefabdbf0bd826554

3 weeks agoUpdate OpenSSL tested versions.
Darren Tucker [Mon, 27 Apr 2026 11:53:36 +0000 (21:53 +1000)] 
Update OpenSSL tested versions.

3 weeks agoComment out new PAM valgrind test until debugged.
Darren Tucker [Mon, 27 Apr 2026 11:16:56 +0000 (21:16 +1000)] 
Comment out new PAM valgrind test until debugged.

3 weeks agoSimplify Cygwin permissions setting.
Darren Tucker [Mon, 20 Apr 2026 08:47:23 +0000 (18:47 +1000)] 
Simplify Cygwin permissions setting.

3 weeks agoReorder steps to change perms before displaying.
Darren Tucker [Mon, 20 Apr 2026 08:45:37 +0000 (18:45 +1000)] 
Reorder steps to change perms before displaying.

3 weeks agoAllow setting TEST_SSH_TRACE via Github.
Darren Tucker [Mon, 20 Apr 2026 12:46:17 +0000 (22:46 +1000)] 
Allow setting TEST_SSH_TRACE via Github.

3 weeks agoAdd tests for libressl-4.3.1.
Darren Tucker [Mon, 20 Apr 2026 12:55:48 +0000 (22:55 +1000)] 
Add tests for libressl-4.3.1.

3 weeks agoRe-enable SHA1 sigs in OpenSSL on Cygwin for tests.
Darren Tucker [Mon, 27 Apr 2026 10:51:17 +0000 (20:51 +1000)] 
Re-enable SHA1 sigs in OpenSSL on Cygwin for tests.

Recently Cygwin imported changes from Fedora which disable SHA1
signatures by default.  This breaks the unit tests (and a couple of
regression tests), so set rh-allow-sha1-signatures=yes in the OpenSSL
config to re-enable them.

4 weeks agoCheck for OPENSSL_NO_ENGINE for --with-ssl-engine.
Darren Tucker [Sat, 25 Apr 2026 10:00:38 +0000 (20:00 +1000)] 
Check for OPENSSL_NO_ENGINE for --with-ssl-engine.

OpenSSL 4 removes support for ENGINE, but it provides no-op stubs
for the ENGINE functions in addition to setting OPENSSL_NO_ENGINE.

The presence of the stubs fooled the old configure test, so if someone
tried --with-ssl-engine with OpenSSL 4.0.0 it'd try but fail at build
time.  Explicitly check for OPENSSL_NO_ENGINE. before trying to enable
ENGINE support.  bz#3952.

4 weeks agoupstream: correctly set extended type for client-side channels.
djm@openbsd.org [Sun, 19 Apr 2026 23:37:22 +0000 (23:37 +0000)] 
upstream: correctly set extended type for client-side channels.

Fixes interactive vs bulk IPQoS for client->server traffic. ok job@

OpenBSD-Commit-ID: 34f5131face8d6dc4ae6955196e5fcafb3570cfe

4 weeks agoupstream: Also show the duration of the current session through the
job@openbsd.org [Mon, 13 Apr 2026 08:18:33 +0000 (08:18 +0000)] 
upstream: Also show the duration of the current session through the

~I escape

OK dtucker@

OpenBSD-Commit-ID: 695c1a09c4cc8b417a1bd3eb207b0cc7fa831c7a

4 weeks agoupstream: want stdint.h here now that we've switched from u_intXX_t
djm@openbsd.org [Tue, 7 Apr 2026 07:40:40 +0000 (07:40 +0000)] 
upstream: want stdint.h here now that we've switched from u_intXX_t

-> uintXX_t

OpenBSD-Commit-ID: 6d5e80bd6f29a9db18b18beeb1cbe5423b59de44

5 weeks agoMake ci work for OpenSSL 4 variants
Bob Beck [Thu, 16 Apr 2026 16:09:02 +0000 (10:09 -0600)] 
Make ci work for OpenSSL 4 variants

5 weeks agoTest against OpenSSL 3.6.2, 4.0.0 and 4.0-stable.
Darren Tucker [Thu, 16 Apr 2026 10:55:23 +0000 (20:55 +1000)] 
Test against OpenSSL 3.6.2, 4.0.0 and 4.0-stable.

5 weeks agoaccount newer openssl versions in .github/setup_ci.sh
Dmitry Misharov [Mon, 16 Mar 2026 08:08:57 +0000 (09:08 +0100)] 
account newer openssl versions in .github/setup_ci.sh

5 weeks agoMatch case with other messages.
Darren Tucker [Thu, 16 Apr 2026 09:32:34 +0000 (19:32 +1000)] 
Match case with other messages.

5 weeks agoregen signature on allowed_signers file
Damien Miller [Tue, 14 Apr 2026 22:14:58 +0000 (08:14 +1000)] 
regen signature on allowed_signers file

This was missed after the file was updated, but nobody noticed it
until now.

7 weeks agodepend
Damien Miller [Thu, 2 Apr 2026 07:56:48 +0000 (18:56 +1100)] 
depend

7 weeks agoUpdate versions in RPM spec files
Damien Miller [Thu, 2 Apr 2026 07:55:50 +0000 (18:55 +1100)] 
Update versions in RPM spec files

7 weeks agoupstream: adapt to username validity check change
djm@openbsd.org [Thu, 2 Apr 2026 07:52:15 +0000 (07:52 +0000)] 
upstream: adapt to username validity check change

OpenBSD-Regress-ID: d22c66ca60f0d934a75e6ca752c4c11b9f4a5324

7 weeks agoupstream: openssh-10.3
djm@openbsd.org [Thu, 2 Apr 2026 07:51:12 +0000 (07:51 +0000)] 
upstream: openssh-10.3

OpenBSD-Commit-ID: 05e22de74e090e5a174998fa5799317d70ad19c4

7 weeks agoupstream: move username validity check for usernames specified on
djm@openbsd.org [Thu, 2 Apr 2026 07:50:55 +0000 (07:50 +0000)] 
upstream: 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.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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

OpenBSD-Commit-ID: 25ef72223f5ccf1c38d307ae77c23c03f59acc55

7 weeks agoupstream: correctly match ECDSA signature algorithms against
djm@openbsd.org [Thu, 2 Apr 2026 07:48:13 +0000 (07:48 +0000)] 
upstream: 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.

OpenBSD-Commit-ID: c790e2687c35989ae34a00e709be935c55b16a86

7 weeks agoupstream: when downloading files as root in legacy (-O) mode and
djm@openbsd.org [Thu, 2 Apr 2026 07:42:16 +0000 (07:42 +0000)] 
upstream: 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.

OpenBSD-Commit-ID: 49e902fca8dd933a92a9b547ab31f63e86729fa1

7 weeks agoupstream: add missing askpass check when using
djm@openbsd.org [Thu, 2 Apr 2026 07:39:57 +0000 (07:39 +0000)] 
upstream: add missing askpass check when using

ControlMaster=ask/autoask and "ssh -O proxy ..."; reported by Michalis
Vasileiadis

OpenBSD-Commit-ID: 8dd7b9b96534e9a8726916b96d36bed466d3836a

7 weeks agoupstream: Fix possible sshd crash when sshd_config set MaxStartups
djm@openbsd.org [Thu, 2 Apr 2026 07:38:14 +0000 (07:38 +0000)] 
upstream: 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

OpenBSD-Commit-ID: 1ad093cae69f55ebfdea1ab24318aefd593d63b8

7 weeks agoproperly bail out when PAM changes username
Damien Miller [Thu, 2 Apr 2026 07:32:00 +0000 (18:32 +1100)] 
properly bail out when PAM changes username

OpenSSH doesn't support PAM changing its conception of the
username via a module calling pam_set_item(h, PAM_USER, ...).
We were supposed to bail out here, but I messed up while "fixing"
this last time and dropped a return statement.

Reported by Mike Damm

7 weeks agoavoid k suffix in dd count operand in sftp-resume test
Michael Forney [Wed, 1 Apr 2026 01:09:00 +0000 (12:09 +1100)] 
avoid k suffix in dd count operand in sftp-resume test

Not all dd implementations support this. POSIX only specifies
suffixes for block size operands.

Instead, just use 1024k to avoid the special case. This also removes
an incorrect redirection operator that appeared in the 1m case.

7 weeks agoadd missing <stdio.h> include to unit tests for printf
Michael Forney [Tue, 31 Mar 2026 01:54:22 +0000 (12:54 +1100)] 
add missing <stdio.h> include to unit tests for printf

This fixes the build with --without-openssl on musl. glibc worked
previously because it got stdio.h implicitly through resolv.h.

7 weeks agoAdd proxyjump.sh omitted from previous commit.
Darren Tucker [Mon, 30 Mar 2026 10:58:44 +0000 (21:58 +1100)] 
Add proxyjump.sh omitted from previous commit.

7 weeks agoupstream: add a regression test for ProxyJump/-J; ok dtucker
djm@openbsd.org [Mon, 30 Mar 2026 07:19:02 +0000 (07:19 +0000)] 
upstream: add a regression test for ProxyJump/-J; ok dtucker

OpenBSD-Regress-ID: 400dc1b5fb7f2437d0dfbd2eb9a3583dafb412b3

7 weeks agoupstream: Use ~/.shosts for Hostbased test.
dtucker@openbsd.org [Tue, 24 Mar 2026 12:31:35 +0000 (12:31 +0000)] 
upstream: Use ~/.shosts for Hostbased test.

OpenBSD-Regress-ID: ab64fd0a86422df1eadacde56c0a2cff5d93425d

7 weeks agoupstream: Ensure known_hosts file exists when setting up.
dtucker@openbsd.org [Tue, 24 Mar 2026 10:21:14 +0000 (10:21 +0000)] 
upstream: Ensure known_hosts file exists when setting up.

OpenBSD-Regress-ID: 92721cad4c219fe62b7b795a73505c22e56f09e0

7 weeks agoupstream: Check if host keys exist before adding them, and expand
dtucker@openbsd.org [Mon, 23 Mar 2026 09:53:52 +0000 (09:53 +0000)] 
upstream: Check if host keys exist before adding them, and expand

on the warning about modifying the system config.

OpenBSD-Regress-ID: 68038da909f9c992375b7665dab0331d6af426b7

7 weeks agoupstream: Add special handling of
dtucker@openbsd.org [Mon, 23 Mar 2026 09:09:36 +0000 (09:09 +0000)] 
upstream: Add special handling of

TEST_SSH_HOSTBASED_AUTH=setupandrun.

This will MODIFY THE CONFIG OF THE SYSTEM IT IS RUNNING ON to enable
hostbased authentication to/from itself and run the hostbased tests.  It
won't undo these changes, so don't do this on a system where this matters.

OpenBSD-Regress-ID: ae5a86db1791a2b8f999b07b5c8cc756d40bf645

7 weeks agoupstream: apply the same validity rules to usernames and hostnames
djm@openbsd.org [Mon, 30 Mar 2026 07:18:24 +0000 (07:18 +0000)] 
upstream: apply the same validity rules to usernames and hostnames

set for ProxyJump/-J on the commandline as we do for destination user/host
names.

Specifically, they are no longer allowed to contain most characters
that have special meaning for common shells. Special characters are
still allowed in ProxyJump commands that are specified in the config
files.

This _reduces_ the chance that shell characters from a hostile -J
option from ending up in a shell execution context.

Don't pass untrusted stuff to the ssh commandline, it's not intended
to be a security boundary. We try to make it safe where we can, but
we can't make guarantees, because we can't know the parsing rules
and special characters for all the shells in the world, nor can we
know what the user does with this data in their ssh_config wrt
percent expansion, LocalCommand, match exec, etc.

While I'm in there, make ProxyJump and ProxyCommand first-match-wins
between each other.

reported by rabbit; ok dtucker@

OpenBSD-Commit-ID: f05ad8a1eb5f6735f9a935a71a90580226759263

7 weeks agoupstream: switch from int to long long for bandwidth calculations;
djm@openbsd.org [Sun, 29 Mar 2026 01:08:13 +0000 (01:08 +0000)] 
upstream: 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@

OpenBSD-Commit-ID: 071eb48c4cba598d70ea3854bef7c49ddfabf8d3

7 weeks agodepend
Damien Miller [Sun, 29 Mar 2026 05:43:59 +0000 (16:43 +1100)] 
depend

7 weeks agouse nonnull attribute when available
Damien Miller [Sun, 29 Mar 2026 05:42:33 +0000 (16:42 +1100)] 
use nonnull attribute when available

Set this attribute on a few string to avoid compiler warnings from
-Wunterminated-string-initialization warnings in recent gcc.

7 weeks agofix state confusion between PAM and privsep code
Damien Miller [Sun, 29 Mar 2026 05:24:59 +0000 (16:24 +1100)] 
fix state confusion between PAM and privsep code

Commits b9a6dd4d6 and df2b28163 introduced a potential desynchronisation
between the PAM code and the sshd-session monitor that could result in
authentication bypass if the unprivileged sshd-auth process had been
compromised.

Reported by Ben Edelman of NIST. Only git HEAD is affected, these
changes have not yet been included in an OpenSSH release.

8 weeks agoopenbsd-compat: reword EAI_NONAME error string
Laurent Chardon [Sat, 28 Mar 2026 08:22:54 +0000 (04:22 -0400)] 
openbsd-compat: reword EAI_NONAME error string

Reword the EAI_NONAME message in fake-rfc2553.c to make it
clearer and grammatically correct.

While there, remove a couple of stray periods from other error
strings to keep the messages consistent.

No functional change.

8 weeks agoseccomp sandbox: allow riscv_hwprobe syscall if present
Icenowy Zheng [Sun, 22 Mar 2026 07:13:31 +0000 (15:13 +0800)] 
seccomp sandbox: allow riscv_hwprobe syscall if present

The development branch of zlib-ng now contains code for utilizing
riscv_hwprobe syscall to retrieve availability information for several
RISC-V extensions (and accelerate deflate algorithm with them).

As the seccomp sandbox of OpenSSH will raise SIGSYS for filtered out
syscalls, this will abruptly terminate the process when the
riscv_hwprobe syscall is tried.

Put it into the allowlist to prevent process termination. As all
syscalls here are guarded by #ifdef's, the same will be done for
riscv_hwprobe, and thus on non-RISC-V builds nothing will happen.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
8 weeks agoupstream: ensure c->local_window doesn't underflow during updates;
djm@openbsd.org [Sat, 28 Mar 2026 05:16:18 +0000 (05:16 +0000)] 
upstream: ensure c->local_window doesn't underflow during updates;

similar to checks performed elsewhere. From Renaud Allard

OpenBSD-Commit-ID: 4827c10807936e9ab9af2cf1c7379e1f56dbdeac

8 weeks agoupstream: fix base16 parsing; currently unused. From Renaud Allard
djm@openbsd.org [Sat, 28 Mar 2026 05:10:25 +0000 (05:10 +0000)] 
upstream: fix base16 parsing; currently unused. From Renaud Allard

OpenBSD-Commit-ID: 3f6e5d4c6a2550d5a7e3c33bcd895b7f8e42196b

8 weeks agoupstream: mention that RevokedKeys is read by the server at each
djm@openbsd.org [Sat, 28 Mar 2026 05:07:12 +0000 (05:07 +0000)] 
upstream: mention that RevokedKeys is read by the server at each

authentication time and should only ever be replaced atomically.

OpenBSD-Commit-ID: eeedf5a10331ac4e39fbd2fc41e4a11c38b2ef9b

8 weeks agoupstream: fix potential hang if /etc/moduli doesn't contain the
djm@openbsd.org [Sat, 28 Mar 2026 05:06:16 +0000 (05:06 +0000)] 
upstream: fix potential hang if /etc/moduli doesn't contain the

requested DH group values; from 77c9ca, ok dtucker@, markus@

OpenBSD-Commit-ID: 1bf402cdb8876237c280ac77fbf7fafd2c16c5ae

8 weeks agoAdd a VM-based test for OpenBSD-current.
Darren Tucker [Thu, 19 Mar 2026 06:57:26 +0000 (17:57 +1100)] 
Add a VM-based test for OpenBSD-current.

8 weeks agoAdd a Valgrind test of the PAM config.
Darren Tucker [Mon, 23 Mar 2026 06:50:40 +0000 (17:50 +1100)] 
Add a Valgrind test of the PAM config.

8 weeks agoUpstream tests don't use the config file.
Darren Tucker [Thu, 19 Mar 2026 06:52:54 +0000 (17:52 +1100)] 
Upstream tests don't use the config file.

2 months agoupstream: clarify that Authorized(Keys|Principals)(File|Command)
djm@openbsd.org [Mon, 23 Mar 2026 01:33:46 +0000 (01:33 +0000)] 
upstream: clarify that Authorized(Keys|Principals)(File|Command)

are only consulted for valid users.

clarify that TOKENS are expanded without sanitisation or escaping
and that it's the user's reponsibility to ensure their usage is
safe.

prompted by bz3936; feedback/ok deraadt@

OpenBSD-Commit-ID: cd58abad1137346ba2dee55fa9ebb975f5fa7a06

2 months agoupstream: repair ssh-keysign after pledge changes; spotted/tested
djm@openbsd.org [Thu, 19 Mar 2026 02:36:28 +0000 (02:36 +0000)] 
upstream: repair ssh-keysign after pledge changes; spotted/tested

by naddy@ ok deraadt@

OpenBSD-Commit-ID: fccc6c7994c8f45c4417efe490d23154d9caaa6d

2 months agoupstream: Check return values of fcntl(... O_CLOEXEC)
dtucker@openbsd.org [Wed, 11 Mar 2026 09:10:59 +0000 (09:10 +0000)] 
upstream: Check return values of fcntl(... O_CLOEXEC)

calls by reusing the macro in monitor.c.  Flagged by Coverity CID
901297 in ssh-sk-client.c, a few other instances added for good measure.
begrudging ok deraadt@

OpenBSD-Commit-ID: b9de92e17ac0b04348770e5a25cb15a02b416926

2 months agoupstream: Fix potential 1-byte array overrun
dtucker@openbsd.org [Wed, 11 Mar 2026 09:04:17 +0000 (09:04 +0000)] 
upstream: Fix potential 1-byte array overrun

in the case where read() returns exactly 100 bytes.  Flagged by Coverity
CID 901296, ok djm@

OpenBSD-Commit-ID: 66a96b08166e63dcbeed00297c33f09c4f22c1f7

2 months agoupstream: whitespace
djm@openbsd.org [Tue, 10 Mar 2026 07:27:14 +0000 (07:27 +0000)] 
upstream: whitespace

OpenBSD-Commit-ID: b16d2b4a96406538fa181053926cba44abca7f29

2 months agoupstream: when unveils error our, use correct variable
deraadt@openbsd.org [Tue, 10 Mar 2026 06:35:29 +0000 (06:35 +0000)] 
upstream: when unveils error our, use correct variable

OpenBSD-Commit-ID: 6b496c10965e70413a9916a8823839c553c6b2c4

2 months agoupstream: When execve() failure is indicated on the pipe, replicate
deraadt@openbsd.org [Tue, 10 Mar 2026 03:45:01 +0000 (03:45 +0000)] 
upstream: When execve() failure is indicated on the pipe, replicate

the same error conditions as the previous access() check did ok djm

OpenBSD-Commit-ID: 875a77dddf0809a3501de2b913cb3bfd4b64f3f7

2 months agoupstream: unveil ssh-pkcs11-helper too; fixes breakage spotted by
djm@openbsd.org [Tue, 10 Mar 2026 03:40:26 +0000 (03:40 +0000)] 
upstream: unveil ssh-pkcs11-helper too; fixes breakage spotted by

anton@

If SK/P11/askpass is overridden by environment, only unveil the requested
path and not both the requested one and the default.

feedback/ok deraadt@

OpenBSD-Commit-ID: 84356c6a44f35e66fe73fc1524a7c8e908521eb2

2 months agoupstream: With it's own daemonization / fd cleaning code, ssh-agent
deraadt@openbsd.org [Sat, 7 Mar 2026 18:35:43 +0000 (18:35 +0000)] 
upstream: With it's own daemonization / fd cleaning code, ssh-agent

opens /dev/null O_RDWR after a pledge without "wpath".  This is allowed in
current pledge because "/dev/null" is implicitly allowed to be opened even
with the most restrictive pledges or unveils.  This is a design decision in
pledge made at the very beginning, to satisfy libc requirements.  We've
finally had enough experience and know how to fix that in the near-future,
but need to review and fix all code which opens these implicit paths. The fix
is to add "wpath", so that "/dev/null" can be opened O_RDWR. But that is
uncomfortable, so we add unveil() allowing "/" with "r", 4 unveil "x" for the
potential askpass and helpers to be execve'd, and "/dev/null" with "wr".  As
a result filesystem access is substantially more restricted than before, and
ssh-agent is ready for the future pledge change. ok djm dtucker

OpenBSD-Commit-ID: f223b11d2db3c0b14e53c1de59966dd5f372a977

2 months agoupstream: Stop doing access() before execve(). It is a TOCTOU, but
deraadt@openbsd.org [Sat, 7 Mar 2026 18:27:52 +0000 (18:27 +0000)] 
upstream: Stop doing access() before execve(). It is a TOCTOU, but

also it forces use of unveil "rx" instead of "x". This is done by using a
pipe() through the fork+execve attempt to expose execve failure and create
the same error return as the access() used to do. ok djm dtucker

OpenBSD-Commit-ID: f9ee96e20352f35dc6f39127e0cc6b804700200a

2 months agostubs for OpenBSD unveil(2)
Damien Miller [Tue, 10 Mar 2026 03:43:30 +0000 (14:43 +1100)] 
stubs for OpenBSD unveil(2)

2 months agoupstream: Move OpenBSD CVS ID marker to top of file to avoid conflicts
dtucker@openbsd.org [Fri, 6 Mar 2026 07:06:45 +0000 (07:06 +0000)] 
upstream: Move OpenBSD CVS ID marker to top of file to avoid conflicts

when syncing changes to portable.

OpenBSD-Regress-ID: 6b7a9ef354e13e26ed474e98d04ec1d74e56e54e

2 months agoupstream: Replace u_intXX_t types with the equivalent C99 uintXX_t
dtucker@openbsd.org [Fri, 6 Mar 2026 06:57:33 +0000 (06:57 +0000)] 
upstream: Replace u_intXX_t types with the equivalent C99 uintXX_t

types to match similar change to the main ssh code.

OpenBSD-Regress-ID: a62b6499f784f75a4fcb865aebb83f5936917a91

2 months agoupstream: ssh-agent supports a "query" extension that allows a
djm@openbsd.org [Thu, 5 Mar 2026 05:44:15 +0000 (05:44 +0000)] 
upstream: ssh-agent supports a "query" extension that allows a

client to request a list of extensions it support. This makes this capability
available to ssh-add via the -Q flag.

ok markus@

OpenBSD-Commit-ID: f211630568ff1a7d6bb4983a94f05ddac1c2d4eb

2 months agoupstream: With IANA codepoints for draft-ietf-sshm-ssh-agent now
djm@openbsd.org [Thu, 5 Mar 2026 05:40:35 +0000 (05:40 +0000)] 
upstream: With IANA codepoints for draft-ietf-sshm-ssh-agent now

allocated, it's safe to start using the standard names for requesting agent
forwarding over the @openssh.com extension names we've used to date.

Support for the standard names is advertised via EXT_INFO. When the
client sees such support it will use the new names preferentially,
but the existing names remain supported unconditionally.

ok markus@

OpenBSD-Commit-ID: 1ab4a0b4de01e81a432875c2b7e5f7357e231af3

2 months agoupstream: correctness wrt draft-ietf-sshm-ssh-agent:
djm@openbsd.org [Thu, 5 Mar 2026 05:35:44 +0000 (05:35 +0000)] 
upstream: correctness wrt draft-ietf-sshm-ssh-agent:

extension requests should indicate failure using
SSH_AGENT_EXTENSION_FAILURE rather than the generic SSH_AGENT_FAILURE
error code. This allows the client to discern between "the request
failed" and "the agent doesn't support this extension".

ok markus@

OpenBSD-Commit-ID: d15d89f210cc973271d68147f09550163df731c9

2 months agoupstream: Replace all remaining instances of u_intXX_t types with the
dtucker@openbsd.org [Tue, 3 Mar 2026 09:57:25 +0000 (09:57 +0000)] 
upstream: Replace all remaining instances of u_intXX_t types with the

C99 equivalent uintXX_t types.  ok djm@

OpenBSD-Commit-ID: d9b81151266adb129574ce268af49f14ac23e65b

2 months agoupstream: Move banner exchange to sshd-auth process
djm@openbsd.org [Mon, 2 Mar 2026 02:40:15 +0000 (02:40 +0000)] 
upstream: Move banner exchange to sshd-auth process

Previously, exchange of the initial SSH- banners was performed
by the privileged sshd-session monitor. This moves it to the
unprivileged sshd-auth subprocess, removing ~200 LoC from the
monitor's privileged attack surface.

The monitor gains a new "setcompat" RPC to allow sshd-auth to
inform it of bug compat flags picked up from the client's banner.

feedback dtucker@, ok markus@ deraadt@

OpenBSD-Commit-ID: d767eb1183630d754d521d9f0d84a6c72fbe7fc8

2 months agoTry -lstdc++ for libcrypto before giving up.
Darren Tucker [Sat, 28 Feb 2026 22:46:39 +0000 (09:46 +1100)] 
Try -lstdc++ for libcrypto before giving up.

BoringSSL recently added destructors to libcrypto, which requires
linking against libstdc++, so when checking for a working libcrypto if
at first the link fails, try again with -lstdc++ before giving up.

2 months agoRemove BoringSSL rpath as it's statically linked.
Darren Tucker [Sat, 28 Feb 2026 22:41:39 +0000 (09:41 +1100)] 
Remove BoringSSL rpath as it's statically linked.