14122 Commits
Author SHA1 Message Date
Michael Forney 102bee7f3a include stdlib.h for free/freezero
This fixes the build with --without-openssl, where stdlib.h is not
implicitly included by openssl/crypto.h.

While the CI tests --without-openssl, this configuration is only
run on ubuntu-22.04 which uses gcc < 14, so implicit functions are
only warnings (see [0]) by default.

[0] https://github.com/openssh/openssh-portable/actions/runs/41998802982/job/127148570075#step:11:550
2026-11-06 09:49:03 +11:00
Damien Miller f78fc73d31 version 2026-11-05 10:57:15 +11:00
Damien Miller 3e29b958f6 RPM specs 2026-11-05 10:56:59 +11:00
Damien Miller c5cd8e8ccf depend 2026-11-05 08:58:10 +11:00
Damien Miller 4353fdc43e avoid password authn bypass
This bypass affects some configurations and runtime configurations.
We do not consider the root cause to be within OpenSSH but we are
well equipped to avoid it.
2026-11-05 08:57:56 +11:00
Darren Tucker 3c6ec4c637 Save generated Makefile in logs on failure.
Should make reproducing problems locally easier.
2026-11-03 19:25:49 +11:00
Darren Tucker b79cb50c07 Update LibreSSL/OpenSSL versions tested against. 2026-11-03 19:25:23 +11:00
dtucker@openbsd.org 4001f0adac upstream: Use ssh -Q addressfamily to determine if IPv6 is supported.
OpenBSD-Regress-ID: 2211808223316d349ec59928d88053f3c4943555
2026-11-02 18:32:12 +11:00
Darren Tucker dec6e9e8ee Add hostkey_untrusted to fix build error. 2026-11-02 18:26:40 +11:00
Darren Tucker 57fdc25ae9 Omit "inet6" from ssh -Qaddressfamily when unsupported 2026-11-02 18:13:17 +11:00
dtucker@openbsd.org 0887340b43 upstream: Add ssh -Q addressfamily. ok djm@
OpenBSD-Commit-ID: 6f10697b0be025a3ebe9229a35637b5c799e5119
2026-11-02 18:07:31 +11:00
dtucker@openbsd.org 511fcdc77d upstream: Move state sanity check to before potential use. CID
915536, ok djm@

OpenBSD-Commit-ID: e10cd1caf73663ca194b2c7f793a785892feb127
2026-11-02 18:07:30 +11:00
Darren Tucker 721ad09d84 Disable IPv6 on aix51 test target.
It doesn't seem to do IP6 scoped link-local addresses.
2026-11-01 09:14:17 +11:00
Darren Tucker 7413fddf8d Add hostkey_trusted to fix build error. 2026-10-31 14:37:15 +11:00
Darren Tucker 0a49e4e883 Remove macos-14 as the runners are being retired. 2026-10-31 14:20:03 +11:00
Darren Tucker 1fbdcb4025 Supply RSA limit params for BoringSSL/AWS-LC.
In commit 625475f, BoringSSL removed OPENSSL_RSA_SMALL_MODULUS_BITS and
OPENSSL_RSA_MAX_PUBEXP_BITS (previously having but not exporting them).
Check for them and if not found supply them, assuming they are no bigger
than when they were removed.  Fixes builds with BoringSSL and AWS-LC.
2026-10-31 08:49:44 +11:00
djm@openbsd.org 61ead74082 upstream: regress test for AuthorizedPrincipalsCommand with no
command arguments.

Anthropic ANT-2026-YX19N77E

OpenBSD-Regress-ID: 77ad314b5a808d275e0a53f88bed5e0775359e8d
2026-10-30 20:20:25 +11:00
djm@openbsd.org 0ce209a1ca upstream: regress test for properly-delimited %C token
Anthropic ANT-2026-WLVAFTWQ

OpenBSD-Regress-ID: e8c28119ec9bfb850a865d46b81071d05c4d639e
2026-10-30 20:20:25 +11:00
djm@openbsd.org 65390d6328 upstream: regress test for "PubkeyAcceptedAlgorithms -*" and
friends

Anthropic ANT-2026-O2RQ9GNA

OpenBSD-Regress-ID: 9117f7d1f821f95e6610f830c7f6a1b434c6b19f
2026-10-30 20:20:25 +11:00
djm@openbsd.org d1d196070f upstream: unit test for accepting @revoked with tab separation
Anthropic ANT-2026-LIFVTX5L

OpenBSD-Regress-ID: 0bc5039416160d58e76791ed7f7ce217c3f3679c
2026-10-30 20:20:24 +11:00
djm@openbsd.org 9f95a516c8 upstream: regress test for ForkAfterAuthentication implying
StdinNull

Anthropic ANT-2026-7CJ6YZKN

OpenBSD-Regress-ID: 30d1fe44f7d56c44771cda4c9f3e02a71c2def90
2026-10-30 20:20:24 +11:00
djm@openbsd.org 913d517fa2 upstream: regess test for link-local address without scope acting
as a wildcard

Anthropic ANT-2026-4VBYIC2Q

OpenBSD-Regress-ID: 71a5bde790457b80f84e8dbd90cffc7ab1b92fa6
2026-10-30 20:20:24 +11:00
djm@openbsd.org 21b22540cb upstream: test for %C containing ProxyJump user/port/extra
Anthropic ANT-2026-S9DT2E2E

OpenBSD-Regress-ID: 6fcfbc3d101707d72435c9e98e7cd9da19bc0c43
2026-10-30 20:19:03 +11:00
djm@openbsd.org 1bb37a9aac upstream: regression test for sshkey_check_rsa_length() checking CA
key length too.

Anthropic ANT-2026-8H51SIF3

OpenBSD-Regress-ID: 383f63e3a54010d19494b4196d94e2d60900b4ba
2026-10-30 20:19:03 +11:00
djm@openbsd.org 1aacf10731 upstream: make a AuthorizedPrincipalsCommand with no specified
arguments do what it is documented to do: supply the target username as a
default argument.

Anthropic ANT-2026-YX19N77E

OpenBSD-Commit-ID: 2cce51be98e3311666b4d715beea9588cfb55848
2026-10-30 20:18:09 +11:00
djm@openbsd.org 9006a5d709 upstream: check RSA keys decoded from PEM against our hard size
limits

Anthropic ANT-2026-YPAO7WLH

OpenBSD-Commit-ID: 905fcd43f5f540a041b317d7bf4b74b0dba22429
2026-10-30 20:18:09 +11:00
djm@openbsd.org 6321396a87 upstream: when updating known_hosts files for UpdateHostKeys,
bail out if the unable to write to the first known_hosts file in the list.

Avoids a situation where a host key could be fully removed from all
known_hosts files.

Anthropic ANT-2026-YH3JNW7S

OpenBSD-Commit-ID: 88594d6e53dd23d6fad98c36df1e220bcfdf2bee
2026-10-30 20:18:09 +11:00
djm@openbsd.org bc01263f1f upstream: when uploading/crossloading, prefer to use LSETSTAT as
it makes it more difficult for a local attacker on the destination play
tricks where they replace paths around the time where the client is restoring
permissions on things.

Also skip setting permissions entirely when its not necessary to do so.

Anthropic ANT-2026-Y4XK22QX

OpenBSD-Commit-ID: 62cf3dad6cebc2b32c3aa8fdd4f982d8878adc69
2026-10-30 20:18:08 +11:00
djm@openbsd.org 00bc2a1124 upstream: nul-delemit the concatenation of user/hosts/port/etc
that is hashed to generate the %C token. This avoids ambiguiuties like
10.0.0.1 port 2222, 10.0.0.12 port 222 and 10.0.0.122 port 22 all hashing to
the same value.

Anthropic ANT-2026-WLVAFTWQ

OpenBSD-Commit-ID: 31aa3dc883340c56e782a1600a7f4acde97b7ceb
2026-10-30 20:18:08 +11:00
djm@openbsd.org 83eeaca768 upstream: when StrictHostkeyChecking=no and an changed/revoked
host key was permitted by the user anyway, ssh(1) turns off a bunch of more
risk options including various forwardings. Unfortunately we had previously
neglected to turn them off over the mux channel.

Anthropic ANT-2026-VFW3JCKW

OpenBSD-Commit-ID: ad9c14298107c0d8891f68baddef63bfc976cac9
2026-10-30 20:18:08 +11:00
djm@openbsd.org 170dfa9cdd upstream: more completely close mux fds when the owning process
goes away. Avoid case where the server could still write stderr data while in
the DRAIN state if it never sent a CLOSE

Anthropic ANT-2026-T8GUCMJY

OpenBSD-Commit-ID: 061eaf51dee48212651ffaa9df46f915bc6494d1
2026-10-30 20:18:07 +11:00
djm@openbsd.org bb7ffdd796 upstream: check for errors when writing known_hosts files and
refuse to replace if the replacement is incomplete.

Anthropic ANT-2026-SZY2YGUM

OpenBSD-Commit-ID: 6d2137c4db55664397ba1ecb4cd4dc29d21eefe5
2026-10-30 20:18:07 +11:00
djm@openbsd.org c914c757ef upstream: @revoked markers in known_hosts should apply to
VerifyHostKeyDNS hostkeys too

Anthropic ANT-2026-S4RA7UNG

OpenBSD-Commit-ID: 08c6b59c74091bc35b58f9a9a61e7ce5fd194267
2026-10-30 20:18:07 +11:00
djm@openbsd.org e49312d045 upstream: ssh -Z is intended to be a purely local operation and
shouldn't connect to a mux socket.

Anthopic ANT-2026-R47M7VEU

OpenBSD-Commit-ID: 20f2039b371efd0c1e4ea1e16192ec079382a687
2026-10-30 20:18:06 +11:00
djm@openbsd.org 45533eb438 upstream: be more careful when killing a ProxyCommand (including
implicit ProxyJump ones); observe if it already has exited via the main ssh.c
SIGCHLD handler and wrap the kill in sigprocmask() to avoid races.

Prevents SIGHUP from being delivered to an unrelated process if the proxy
command's PID is recycled.

Antropic ANT-2026-ODQD8QBH

OpenBSD-Commit-ID: 2fe79a15fcf1ff274f90a1d1dcd8cfe096d4a633
2026-10-30 20:18:06 +11:00
djm@openbsd.org c41a6c4371 upstream: Correctly error on a algorithm allowlist that removes
all algorithms, e.g. `PubkeyAcceptedAlgorithms -*` rather than defaulting
back to the full list

Anthropic ANT-2026-O2RQ9GNA

OpenBSD-Commit-ID: 6f4e3bd0376e568dc2af2c64a3b0b78edb16997c
2026-10-30 20:17:06 +11:00
djm@openbsd.org c30113f351 upstream: set a glob(3) error callback when globbing Include
files to allow discrimination between missing files/directories and failure
to open a file or directory.

Avoids possible (though unlikely) situation where a local attacker could
cause an Include'd file from being processed by doing tricks like hitting
fd limits at the right time.

Anthropic ANT-2026-NF7CR4JX

OpenBSD-Commit-ID: 561568f92b71cda06f47070c31a533995d652a70
2026-10-30 20:17:05 +11:00
djm@openbsd.org 5c90a1d90e upstream: be more liberal in accepting tab-separated @revoked
markers in known_hosts These shouldn't be ignored if the user picked the
wrong whitespace...

Anthropic ANT-2026-LIFVTX5L

OpenBSD-Commit-ID: 28be5a0bf9d0d37668d64b8f8ac1c2bb605929f8
2026-10-30 20:17:00 +11:00
djm@openbsd.org 0e875c2d75 upstream: make ssh-keygen -H (hash a known_hosts file) also
strip comments from the output. The intention is to obscure the hostnames and
so including comments, especially ones that come from ssh-keyscan, totally
defeats the purpose

Anthropic ANT-2026-KI130WJG

OpenBSD-Commit-ID: 92986fe7d33799f3a4cbbbfbc5f5ea4b284671e1
2026-10-30 20:17:00 +11:00
djm@openbsd.org 025a8a72ba upstream: fix CheckHostIP yes bypass in cases where a server
sends a certificate hostkey. This will ignore any key recorded for the IP
address (as is supposed to happen when CheckHostIP is enabled and fall back
to the new-hostkey path if the hostname had not already matched

Anthropic ANT-2026-KDXJ0Q4K

OpenBSD-Commit-ID: a6313135b82d2b08ed9940b9391a0c804ed524c3
2026-10-30 20:17:00 +11:00
djm@openbsd.org 1ec60f13ce upstream: fix a case where a mux proxy supporting a local (-D or
-L) listener could be caused to fatal() by another user on the originating
host with access to the listening sockets. This was caused by incorrect
cleanup behaviour wrt half-open channels in channel_free() and the mux proxy
code handling open failures incorrectly too

Anthropic ANT-2026-FNOMFC4I

OpenBSD-Commit-ID: 53f8e6193d31f4880a0e54d01709219f076bad24
2026-10-30 20:16:59 +11:00
djm@openbsd.org e3c9ed5ad4 upstream: sanitise some peer-provided strings that get written in
logs via asmprintf(), e.g. `ssh -O conninfo` and `ssh -O channels`

Anthropic ANT-2026-F5EYSC8G

OpenBSD-Commit-ID: d7258da015683c85ce6d9ffb5843b818add5fd59
2026-10-30 20:16:59 +11:00
djm@openbsd.org 69ccd0ff21 upstream: disallow remote removal of PKCS#11 providers from
ssh-agent by default, as this permits an attacker with access to a forwarded
agent a silly path-validity oracle. It's better just to be symmetric with the
restrictions on adding providers.

Note: a user of a forwarded agent can still remove a provider's _keys_
as it is important that access to keys can be easily revoked, this just
block removing entire providers by name.

Anthropic ANT-2026-DYLIZ0VY

OpenBSD-Commit-ID: 1a80510964e03bfd69336580a82a72cbb8983ea4
2026-10-30 20:16:32 +11:00
djm@openbsd.org cbd955ef9e upstream: when CheckHostIP=yes, ensure a known_hosts @revoked
marker is applied correctly

Anthropic ANT-2026-D0S0MTZT

OpenBSD-Commit-ID: 6e1de706e260a92a999fc9271cd1de424ac54ea7
2026-10-30 20:16:32 +11:00
djm@openbsd.org 35ee7aad77 upstream: %C token documentation had local host/port and remote
host/port swapped

Anthropic ANT-2026-CHB5U4K7

OpenBSD-Commit-ID: 5b554322cccf75c7840968dd7d9bfc22199b5758
2026-10-30 20:16:31 +11:00
djm@openbsd.org 42751c85c5 upstream: force hostnames modified by CanonicalizePermittedCNAMEs
to lowercase and perform cname canonicalisation allowlist checks case
insensitively.

Avoids pattern-list evasion when the CanonicalizePermittedCNAMEs list
contains a negated match and improve robustness in the face of stuff
like DNS0x20

Anthropic ANT-2026-7MOIJVM6

OpenBSD-Commit-ID: 08f6d62615e059e0a433405d54b56448a0fccc48
2026-10-30 20:16:31 +11:00
djm@openbsd.org ebc833d1a1 upstream: make ForkAfterAuthentication=yes imply StdinNull=yes.
Setting fork- after-auth via the commandline already did this, but if it was
done via the configuration file then stdin was being left attached and
keystrokes could end up getting sent to the server.

Anthropic ANT-2026-7CJ6YZKN

OpenBSD-Commit-ID: d4806af6626ba04bb83e185c2923b05e09adf2b9
2026-10-30 20:16:31 +11:00
djm@openbsd.org 3b42f3a2f4 upstream: fix inconsistency between unpriv hostbased code and
monitor that could be used to probe account existence when this
authentication method is enabled.

Anthropic ANT-2026-60RCCQ1O

OpenBSD-Commit-ID: 07605a647a738f383678f244926cd43e833dba8c
2026-10-30 20:16:30 +11:00
djm@openbsd.org d62150ded3 upstream: Make @revoked keys in known_hosts apply to the host
regardless of port number. This is a safer and more consistent application of
revocations than the old behaviour of strictly matching the address and port.

Anthropic ANT-2026-521A8B2S

OpenBSD-Commit-ID: 3db971046b6e4852bee9a1fb77b7eeece6ae28c6
2026-10-30 20:16:30 +11:00
djm@openbsd.org 09e6d6be23 upstream: treat unscoped IPv6 link-local addresses as having
wildcard scope when used in `Match address` or similar. Seems like the least
surprising thing to do

Anthropic ANT-2026-4VBYIC2Q

OpenBSD-Commit-ID: b1437244abdad94abdd9e5adf59211f1866576c2
2026-10-30 20:16:30 +11:00