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
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
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
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
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
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
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
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
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
request. This ensures that these signals are subsequently delivered after the
restart has been completed, rather than ignored. bz3981
OpenBSD-Commit-ID: a69ff4121882583edcba319fa40adfc6ba75377c
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
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
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
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.
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
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
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
sockets. Fixes some of the regress failures in t-multiplex after recent
pledge(2) strictification.
OpenBSD-Commit-ID: ff64648747176a3192c97df50d6a8fb66b926828
hex format. Very useful when writing internet-drafts.
E.g. ssh-keygen -em hexdump -f /path/key
OpenBSD-Commit-ID: 922f997de2c691cf7ddf4067a5406d39b36b25ef
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
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
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
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@