Commit Graph
13915 Commits
Author SHA1 Message Date
djm@openbsd.org 3c11ea4054 upstream: bz3635 - ssh-add -P to skip PIN entry
ok dtucker

OpenBSD-Commit-ID: ca89f9cdc1dad7b5d28d55e342e4e110e7cc3d98
2026-09-16 16:28:59 +10:00
djm@openbsd.org a30bafcbbd upstream: simpler
OpenBSD-Regress-ID: c7f30b865abd0b3e0e5514f861509c32e352a760
2026-09-16 15:04:45 +10:00
djm@openbsd.org 600eca5cfd upstream: leaks on error paths; spotted by Coverity CID 913598
OpenBSD-Commit-ID: 70cde2c42ea549b6f8aff523428e221aad4be1d8
2026-09-16 15:04:40 +10:00
djm@openbsd.org 56c1d08b6c upstream: fix inverted logic that could cause a memleak; spotted en
passant by Coverity CID 913599

OpenBSD-Commit-ID: 72f712175bdf2daf660d4dd193316681aa9eed94
2026-09-16 15:04:40 +10:00
dtucker@openbsd.org e158e008a8 upstream: Add missing semicolon after return. CID 913599, ok
deraadt@

OpenBSD-Commit-ID: d44361633f2791eeeb4bd160bebedf3ad07a9c05
2026-09-16 15:04:40 +10:00
djm@openbsd.org ded92bffa2 upstream: correctly check sshauthopt->restricted merging
OpenBSD-Regress-ID: e81e9267514338d6cf6bd2f83dcb722538af528e
2026-09-16 14:52:55 +10:00
Damien Miller e3cb2b2278 unbreak readpassphrase.c sync 2026-09-16 12:28:40 +10:00
Damien Miller 58db2ec9ca sync readpassphrase(3) with OpenBSD libc
Should fix bz3995: ssh-add spins when started in a background group,
with no controlling tty and with certain signals ignored.
2026-09-16 11:26:40 +10:00
djm@openbsd.org bc15793b2a upstream: whitespace
OpenBSD-Commit-ID: b8d7e0a0b7b1a15941df5bfa91998f988e2346e2
2026-09-16 11:10:41 +10:00
djm@openbsd.org fc5bed4b1c upstream: adapt to libsodium ed25519 implementation
OpenBSD-Regress-ID: d084e761416cea1f00d4f295aa92b737b28cebae
2026-09-16 10:59:23 +10:00
djm@openbsd.org c5c4ca2b77 upstream: missing part of previous commit: update script to
import ed25519 implementation from libsodium

OpenBSD-Commit-ID: 1f3d60686a8ce15212d8730814dfb8213fdf96ac
2026-09-16 10:58:41 +10:00
djm@openbsd.org eab9166136 upstream: switch from SUPERCOP ed25519 to libsodium
The libsodium implementation includes a number of strictness and
malleability checks over the original reference implementation we
have used to this point.

libsodium also offers a more traditional "detached" signature
verification API (SUPERCOP required the signature to be contiguous
with the signed data). Switch to this and avoid a bunch of fiddly
code.

ok markus, deraadt

OpenBSD-Commit-ID: ea9c958435790c391b031bd9f0599f1ebf48d516
2026-09-16 10:58:41 +10:00
djm@openbsd.org 6f9cd19af0 upstream: Only store GSSAPI creds when authn succeeds
Issue report and patch from Moritz Theile

ok markus, deraadt

OpenBSD-Commit-ID: 812bbd22b8dd5a1583094ab2b6ff0045e4088467
2026-09-16 10:56:52 +10:00
djm@openbsd.org 670510d1e1 upstream: Reset GSSAPI client state before authentication
Avoids situation where a partially-completed GSSAPI authentication attempt
can retain state that is subsequently used by a later attempt.

Report and feedback Moritz Theile, also reported by several others.

ok markus, deraadt

OpenBSD-Commit-ID: 95758f23e358b7c19e6205ac1c979193a9145556
2026-09-16 10:56:52 +10:00
djm@openbsd.org 526fd27713 upstream: Correctly handle some options that accept "none"
Some options, including AuthorizedPrincipalsFile were documented as accepting
"none" as a way to disable them, however when overriddes by a ssh_config(5)
Match keyword, this argument was being interpreted as a literal file.

With Chris Rohlf in collaboration with Claude and Anthropic Research

ok markus, deraadt

OpenBSD-Commit-ID: 802f3a7695eba20924c05e500b0ecd34ec877756
2026-09-16 10:56:52 +10:00
djm@openbsd.org 991f1f31dd upstream: Propagate authorized_keys "resrict" keyword
The "restrict" keyword was not pervasively being applied to TunnelForwarding
connections (which are administratively disabled by default). This is a
separate problem to the one fixed in openssh-10.5

reported by several people; ok markus, deraadt

OpenBSD-Commit-ID: 8c36c31dc2bdbc0c432d1056496b2f1ce93198d1
2026-09-16 10:56:51 +10:00
djm@openbsd.org 65666f4e82 upstream: Check key and CA sig type during key parsing
Checks key type and CA signature algorithm allowlists as early as
possible during public key deserialisation.

Use this in the client and server to reduce attack surface from
disallowed key/signature types.

With Chris Rohlf in collaboration with Claude and Anthropic Research

ok markus, deraadt

OpenBSD-Commit-ID: b03cb3755506231a742eed844f269524812f560a
2026-09-16 10:56:51 +10:00
djm@openbsd.org 813f670ccc upstream: Add WarnWeakCrypto to sshd
This option was previously available for the client only. This adds it to
sshd, so allow logging of non-PQ key exchanges.

ok markus, deraadt

OpenBSD-Commit-ID: 524564b82a7a20a4ff984c948fb75aa2b0f9b707
2026-09-16 10:56:51 +10:00
djm@openbsd.org cee6aedb1a upstream: Allow specification of agent socket directories
Add AgentSocketPath for sshd_config and -A flag for ssh-agent.

Agent socket directories may be shared or user-specific.

Shared directories (specified like "shared:/tmp") will cause the listening
program to create a temporary subdirectory ssh-XXXXXXXXXX under the requeted
path to hold the socket. This supports the old sshd/ssh-agent behaviour before
we switched to the socket directory being under ~/.ssh/agent

User-specific directories just create the socket directly in the requested
directory. This is the default, as user:.ssh/agent

bz3860; ok markus, deraadt

OpenBSD-Commit-ID: 91b95d02f376ad8959ffb23902cc115a0b74d9bf
2026-09-16 10:56:41 +10:00
djm@openbsd.org 14843e73b9 upstream: Account pubkey checks separately to auth attempts
Add a `PubkeyOptions max-pk-ok:nnnn` option to allow PK_OK tests (asking
whether the server might accept a given public key) that do not count
against MaxAuthTries, defaulting to 6 attempts.

After these attempts are exhausted, futher attempts count as failed
authentications against MaxAuthTries.

ok markus, deraadt

OpenBSD-Commit-ID: 4a02d2f303f4d83c10871221dce1db1f9fe2936f
2026-09-16 10:49:38 +10:00
djm@openbsd.org 8895b5ae1b upstream: Extend TCPKeepAlive to support forwardings too
This allows the existing client and server TCPKeepAlive option to optionally
enable keepalives on TCP connections that are created for forwardings.

Previously this option controlled keepalives on the connection socket only.

TCPKeepAlive "yes" or "transport" enables keepalives on the connection
socket. "TCPKeepAlive all" additionally enables them for forwarding
sockets.

bz3921. ok markus, deraadt

OpenBSD-Commit-ID: c29b075968e6fa88fd9773bdea8174e70229262e
2026-09-16 10:49:09 +10:00
djm@openbsd.org 0f90a8417b upstream: Mask SIGTERM/SIGQUIT when processing a SIGHUP restart
request. This ensures that these signals are subsequently delivered after the
restart has been completed, rather than ignored. bz3981

OpenBSD-Commit-ID: a69ff4121882583edcba319fa40adfc6ba75377c
2026-09-16 10:49:01 +10:00
Damien Miller ae7373dfe1 fix merge botch that put lines in wrong function
sdirent_cmp() looked similar enough to sglob_cmp() for patch
2026-09-15 21:17:51 +10:00
djm@openbsd.org aef20dfe30 upstream: Correct handling of DST when converting dates
Timestamps conversion was ignoring Daylight Savings Time (DST) causing
date conversions to be +/-1 hour under some circumstances.

bz4004; from Khush Patel, ok deraadt

OpenBSD-Commit-ID: bd5eb2603c04d4b5072b0e593b137a98ef75b731
2026-09-15 18:34:56 +10:00
djm@openbsd.org e1d1c95160 upstream: sk-usbhid: preserve UV requirement for resident keys
When loading resident credentials, derive SSH_SK_USER_VERIFICATION_REQD
directly from the credential's credProtect policy.

The previous code only preserved the flag when the authenticator did not
report the uv capability. As a result, UV_REQUIRED credentials downloaded
from authenticators with built-in UV were saved with flags 0x21 instead
of 0x25.

Do not make preservation of the credential policy depend on the
authenticator's current UV capability. Keep compatibility with libfido2
versions without fido_cred_prot().

GHPR701 from Savely Krasovsky

OpenBSD-Commit-ID: ece9e236cdb6a2b7e973fdc266801f65a3feb12e
2026-09-15 18:30:38 +10:00
job@openbsd.org 961cc92164 upstream: Fix memory leak on an error path in mkdir_path
CID 913589

OK djm@

OpenBSD-Commit-ID: 0050b75ec87722e115d33a3d181a3c24175079e5
2026-09-15 18:30:38 +10:00
djm@openbsd.org 805388d59d upstream: sftp: don't crash when glob(3) results lack stat information
Avoid NULL deref crashes when remote glob(3) results lack stat
information. This can happen if the sftp server selectively fails
a stat/lstat operation.

GHPR707 from Nguyễn Anh Bình

OpenBSD-Commit-ID: d76b6fe49bfe1b53908d83cf67ab624b7436279f
2026-09-15 18:24:11 +10:00
Mike Frysinger b99b84822c openpty: mark inputs const
This matches BSD & GNU implementations.
2026-09-15 18:21:10 +10:00
djm@openbsd.org fb9aad71c9 upstream: replace testing of vendor PQ signature algorithm
"ssh-mldsa44-ed25519@openssh.com" with the IANA-registered
"ssh-mldsa44-ed25519"

OpenBSD-Regress-ID: 294c729668844a63f90c7fc0d7bbdcf4bb732ad8
2026-09-15 18:05:04 +10:00
djm@openbsd.org 2eff38e46f upstream: minor leak of fingerprint text when printing
certificates. bz3997 from Ekaterina Esina

OpenBSD-Commit-ID: a837c2e113b42df3d58c9db783d2992f1ba1f0e0
2026-09-15 18:04:33 +10:00
djm@openbsd.org 9713aaa65f upstream: the default KDF rounds for keys generated by ssh-keygen
is 24, not 16 bz3975; from lbrick

OpenBSD-Commit-ID: 68030733eb680a817bcbd371793824f6aafc538a
2026-09-15 18:04:32 +10:00
Colin Watson d916633361 Don't link sshd against libselinux
When configured with --with-selinux, the main sshd binary only appears
to need symbols from libselinux because functions that it needs are in
the same translation units as functions that use libselinux, meaning
that `ld --as-needed` doesn't realize that it can drop those functions
and the resulting DT_NEEDED tag.

This should have the effect of dropping libselinux and libpcre2-8 from
sshd's linkage in the configuration used by several common Linux
distributions, including Debian.
2026-09-15 17:20:27 +10:00
djm@openbsd.org a92ec36c73 upstream: warnings fixes (static vs missing prototype, sign conversion)
OpenBSD-Commit-ID: 9c9eca0844dd7205597c6a4bd6f97d868ca2a74c
2026-09-15 17:19:27 +10:00
Damien Miller 563087a648 sshd doesn't need sshpty.c any more 2026-09-15 17:00:01 +10:00
djm@openbsd.org 6d558485ff upstream: wrap line
OpenBSD-Commit-ID: 14b59bf44214a9f46d6f0b5281f94420ef0fc888
2026-09-15 16:53:07 +10:00
djm@openbsd.org 21abb62629 upstream: g/c prototype
OpenBSD-Commit-ID: a55c5782dc733fa66b28085abdb10c39cb4d2a2e
2026-09-15 16:49:57 +10:00
djm@openbsd.org a7f490e1e3 upstream: disconnect_controlling_tty() is the only thing from sshpty.c
used in sshd, and sshd is the only thing that calls this function.

Move it into sshd.c and we no longer need to compile sshd against
sshpty.c

Part of bz3996 from Colin Watson

OpenBSD-Commit-ID: cbfb0ecba5c63852d33e930d01f00586ce15ad1d
2026-09-15 16:47:18 +10:00
djm@openbsd.org 02cf3c2bd6 upstream: Fix ChannelTimeout specificity
Previously a more specific channel type (e.g. "session:shell") could
clobber a user-specified ChannelTimeout if it was less specific
(e.g. "session").

Also, in some cases, the debug messages were printing 0 instead of the
effective timeout.

From Bhagavathiyappan Shanmugam <Bhagavathiyappan.Shanmugam@ibm.com>
via bz3994

OpenBSD-Commit-ID: ba88e80db4957b98dfc0cc3b93a8d6d34e18d32d
2026-09-15 16:09:45 +10:00
Damien Miller 78db1b7e9f allow madvise(..., MADV_DONTNEED_LOCKED)
allow MADV_DONTNEED_LOCKED in the seccomp sandbox; needed by GrapheneOS'
hardened allocator. bz4001
2026-09-15 15:37:02 +10:00
djm@openbsd.org 8abd726ee3 upstream: fix case for ssh -G option output; bz4005, reported by
Khush Patel

OpenBSD-Commit-ID: 7ad9df4697b653c21253cea94bf95b87e7108717
2026-09-15 15:28:02 +10:00
djm@openbsd.org 7f671c49eb upstream: mux proxy sockets also share in and out fds, so using
this as a heuristic to decide whether the connection is on an inet/inet6
socket is incorrect.

Fixes breakage in t-multiplex after recent pledge(2) changes where
the packet code would attempt to set TCP_NODELAY on a mux proxy
connection (which is AF_UNIX).

OpenBSD-Commit-ID: f6706e90d499ac0a22322df11935205f38c5ae85
2026-09-15 15:28:01 +10:00
djm@openbsd.org 4fc22252c4 upstream: don't attempt to set TCP_NODELAY on non-AF_INET[6]
sockets. Fixes some of the regress failures in t-multiplex after recent
pledge(2) strictification.

OpenBSD-Commit-ID: ff64648747176a3192c97df50d6a8fb66b926828
2026-09-15 15:28:01 +10:00
djm@openbsd.org 7cc27ceb87 upstream: add a "hexdump" export mode that dumps the key blob in
hex format. Very useful when writing internet-drafts.

E.g. ssh-keygen -em hexdump -f /path/key

OpenBSD-Commit-ID: 922f997de2c691cf7ddf4067a5406d39b36b25ef
2026-09-15 15:28:01 +10:00
job@openbsd.org d991f23d45 upstream: Add '-p' to sftp mkdir/lmkdir to create directories as
required

The -p option causes the mkdir and lmkdir commands to create any missing
intermediate directories. If '-p' is specified, it is not considered an
error if a directory already exists.

With / OK djm@

OpenBSD-Commit-ID: 72e4d4cf2e254959af5a0885e3f3a176846f4345
2026-09-15 15:28:00 +10:00
deraadt@openbsd.org 327fb6ce6f upstream: Use getexecpath(3); if it fails use argv[0] as before
with the pre-existing code to validate it is an absolute path.  Here's a bit
of history:  sshd became the first fork+exec privsep daemon (I did some
arm-twisting). That privsep has recently turned into fork+exec different
binaries but the SIGHUP restart code still want to re-run the binary from the
original path. The rc startup sequence always passes an absolute path.  sshd
was paranoid and validated it.  That made hand-restarts of sshd without
absolute paths not work.  getexecpath(3) improves the ergonomics. ok djm

OpenBSD-Commit-ID: b84759d60f689f94a4fb45f43a7436ce62e35487
2026-09-15 15:27:31 +10:00
schwarze@openbsd.org 0e1c435a86 upstream: Change three paragraphs in different parts of the manual
page (-O control commands, -Q query options, and private key file names) into
tagged lists to make them more readable; no content change intended. OK
naddy@; general direction requested by deraadt@.

OpenBSD-Commit-ID: 63c5cb7ad90fa401f7e97ce8d4c7e0d6f40530ec
2026-09-15 15:24:00 +10:00
naddy@openbsd.org f6ddc809d8 upstream: update fingerprint example from RSA to Ed25519 host key
OpenBSD-Commit-ID: 272127bb56551ff1e6d18352627a77fad003ff27
2026-09-15 15:24:00 +10:00
job@openbsd.org 8cae676a35 upstream: Remove scp '-s' flag from synopsis, the flag has been a
no-op for some time now

OK djm@

OpenBSD-Commit-ID: c272de443c8fb72f470a5e1fa482d5dae5536e85
2026-09-15 15:24:00 +10:00
Damien Miller 7fe3b24c92 set -Wno-error=discarded-qualifiers
Disable this as a compilation error for -Werror builds until we
clean them all up.
2026-09-04 00:16:30 +10:00
Damien Miller 769728b835 seccomp sandbox: restrict mremap flags
In the seccomp sandbox, restrict use of mremap(2) to only permit
its use with the MREMAP_MAYMOVE flag and specifically not the
MREMAP_FIXED flag, as the latter may have some use as part of an
attack chain.

Reported by: Mohammad Hossein Abedini <mhmd.abedinii@gmail.com>

ok deraadt@
2026-09-03 14:14:37 +10:00