13836 Commits

Author SHA1 Message Date
Darren Tucker
64ede7991d Use clang-20 when building hardenedmalloc for tests.
Some versions of clang-19 report:
error: invalid feature combination:  +avx10.1-256; will be promoted to
avx10.1-512 [-Werror,-Winvalid-feature-combination]
2026-08-08 21:23:22 +10:00
djm@openbsd.org
05ec77c14b upstream: remove mlkem768brainpoolp256r1-sha256; requested by
markus

OpenBSD-Commit-ID: 0fcb5943abe5476e42983dcfc4c400e39e5db6a7
2026-08-08 17:35:08 +10:00
djm@openbsd.org
08d9155d6e upstream: move comment to a better place; suggested by markus@
OpenBSD-Commit-ID: 451ba42a5dc88723a0b8837d4583957f18edbf40
2026-08-08 17:34:53 +10:00
djm@openbsd.org
72ed5241a8 upstream: add some options to allow setting or clearing the
touch-required and verify-required flags on FIDO private keys when resetting
the passphrase.

feedback/ok tb@

OpenBSD-Commit-ID: 8895e62eae5778711fe7dd6c09f8679acb2e6674
2026-08-07 15:50:21 +10:00
djm@openbsd.org
6a57081dc3 upstream: Allow session-bind@openssh.com requests when the agent is
locked, otherwise forwarding sessions established with an agent was locked
will be treated as local, rather than remote.

Reported by sn0x-sharma

OpenBSD-Commit-ID: 524f210c6f2b3a06e0a2f6d0af5188a9a75fa2c7
2026-08-07 15:25:03 +10:00
djm@openbsd.org
9910d5ef53 upstream: avoid potential realloc use-after-free in the client if a
remote forwarding is added via the local session multiplexing socket while a
remote forwarding open request is pending with the server.

Report and fix from Brian Mingus of Cognatory

OpenBSD-Commit-ID: c7888d566576386d0e96859f9ec7310a1e2d3609
2026-08-07 15:25:03 +10:00
naddy@openbsd.org
3883901483 upstream: fix up synopsis and tweak wording for -Z
OpenBSD-Commit-ID: 7f0f8e7f610f6af6890cb10915bf316f23651505
2026-08-07 15:25:03 +10:00
naddy@openbsd.org
e6ece1bc26 upstream: document existence of
mlkem768{brainpoolp256r1,nistp256}-sha256 KEXes

OpenBSD-Commit-ID: e9a9b01a19ed3ccdd82c7fc4c77395495b28faf9
2026-08-07 15:25:03 +10:00
Darren Tucker
4c414d99f3 Re-allow PAMServiceName inside a Match block.
This is documented to be allowed, and was up until 10.4p1 when a
transcription error in the config handling rework reverted it to
global-only, ie not allowed inside Match.  bz#3987.
2026-08-06 23:30:30 +10:00
Darren Tucker
5adaaa7781 Rerun VM tests on regress Makefile change too 2026-08-04 22:20:47 +10:00
Darren Tucker
b1000abf54 Run tests on regress Makefile changes too. 2026-08-04 14:23:59 +10:00
djm@openbsd.org
b8b12ca065 upstream: disable pubkey-priority test until I can fix it to not pick
up the user's keys from ~/.ssh

OpenBSD-Regress-ID: 5295a8cefe1d2def5c8b10f9d60d9bb7a350d316
2026-08-04 12:49:07 +10:00
dtucker@openbsd.org
d5dc50020f upstream: Fix expected output for implicit ordering test. ok djm@
OpenBSD-Regress-ID: 3ba8907d381fb738578ba2090d4b2f22d35a555a
2026-08-04 09:49:11 +10:00
Darren Tucker
265336a702 Don't enable Brainpool on AWS-LC or BoringSSL.
These fail at runtime, so disable until we figure out why.
2026-08-03 22:15:07 +10:00
Darren Tucker
b5ad8c3b1f Correct filename in comment. 2026-08-03 22:06:26 +10:00
Darren Tucker
7d6170c00e Fix OpenSSL ECC detection message. 2026-08-03 21:18:48 +10:00
Darren Tucker
e766b76b61 Make EC_KEY_METHOD_new optional again.
The change making ECC required also incorrectly made EC_KEY_METHOD_new
required, causing builds with BoringSSL to fail.
2026-08-03 18:19:58 +10:00
djm@openbsd.org
e47a744c8b upstream: crank up MaxAuthTries to avoid failures here
OpenBSD-Regress-ID: 052b0c4cc8bd6ea2679fbc9f96f4cb7f48c73035
2026-08-03 16:54:20 +10:00
djm@openbsd.org
129f5ac61f upstream: regression test for pubkey ordering in the client; ok
dtucker

OpenBSD-Regress-ID: e55fa977be300307e6e03a001716b3dce8faa1a1
2026-08-03 16:54:19 +10:00
djm@openbsd.org
6fe6ab77da upstream: Tweak ordering of certificates tried during pubkey
authentication to prefer FIDO keys that do not require user presence (touch)
first, followed by ones that do and with FIDO keys that require user
verification via PIN or biometrics last.

This effectively tries low-friction authenticators before higher
friction authenticators.

ok dtucker@

OpenBSD-Commit-ID: 067076c652dbb4f2aa89c6e82b19d8cbfec1d1be
2026-08-03 16:53:54 +10:00
djm@openbsd.org
29f1b46e0f upstream: Add a "ssh -Z user@host" mode that dumps the pubkeys that
will be tried for authentication in the order that they will be used.

feedback tb@ ok dtucker@

OpenBSD-Commit-ID: 617a7f149d1410980eac551e4780280190a5f218
2026-08-03 16:53:54 +10:00
djm@openbsd.org
2aee73ed90 upstream: fix ML-KEM/ECDH interop problem (does not affect
mlkem768x25519-sha256) from markus@

OpenBSD-Commit-ID: 9c72e9c0407906bb7d5fb16648b38282676391e9
2026-08-03 16:44:04 +10:00
Darren Tucker
ec04856328 Require NISTP521 in libcrypto.
Previously we supported building without NISTP521 in libcrypto since
some vendors shipped without it, but this now seems uncommon. This
removes that support, requiring a fully functional libcrypto.

This removes another set of diffs vs upstream and should reduce the
maintenance burden.  ok djm@
2026-08-01 12:29:37 +10:00
Darren Tucker
e416edf1b2 Remove support for libcrypto w/out ECC.
Since 2010, we have supported building against an OpenSSL that did not
have any ECC support, since at the time many systems still shipped with
OpenSSL versions prior to ECC being added.  We no longer support OpenSSL
versions that old, and while it's possible to build a modern libcrypto
without ECC, doing so seems very uncommon.

Having OPENSSL_HAS_ECC sprinkled throughout the code increases the
cost of syncing changes and is a maintenance burden, so this has now
outlived its usefulness and is being removed.  It is still possible to
build --without-openssl on such systems if required.

This includes a few whitespace and header order changes to bring
Portable back into sync with OpenBSD in those places, and removes the
corresponding test.

ok djm@
2026-07-31 21:41:10 +10:00
Darren Tucker
15d1832b5e Add includes.h for compat interfaces. 2026-07-30 22:15:46 +10:00
brynet@openbsd.org
d8140f0706 upstream: Use ssh_mldsa44_ed25519_cleanup consistently to avoid
calling freezero with the wrong size.

With help from tb@

ok tb, dtucker@

OpenBSD-Commit-ID: 4de18532e448a62005e12c179786bec512b83fde
2026-07-30 18:02:30 +10:00
dtucker@openbsd.org
18f5f351ed upstream: Fix $OpenBSD marker for easier syncing.
OpenBSD-Commit-ID: 1f38203c268007964b0abdfa4e024d572c65a898
2026-07-30 18:02:29 +10:00
markus@openbsd.org
128a4a5bf9 upstream: ssh: update kex unit test
OpenBSD-Regress-ID: db6f1a538803716ce225e2128046de0b6ab6d2aa
2026-07-30 17:41:27 +10:00
dtucker@openbsd.org
52794802d9 upstream: Make mlkem768ecdh build with OPENSSL=no. ok djm@
OpenBSD-Commit-ID: b23fc98b885d72b57d9a2b989f6c062751bff52b
2026-07-30 17:39:53 +10:00
djm@openbsd.org
4b5860ed27 upstream: pass back errors from ed25519 key generation, which
theoretically can fail. From Dimitri John Ledkov via GHPR702.

ok deraadt@ dtucker@

OpenBSD-Commit-ID: 1ecdd981c3f89393092949ff5e96662946fc5040
2026-07-30 13:49:44 +10:00
djm@openbsd.org
52154c2d23 upstream: Move check of public key type against allowed algorithms
to before parsing of the key sent by the peer.

This removes at least some key parsing and verification paths from
the pre-auth attack surface.

Suggested by Christopher Paul Rohlf of Anthropic, ok deraadt@

OpenBSD-Commit-ID: 4560b53b5cd2fe9b875436e48995a1829c2a9dea
2026-07-30 13:49:43 +10:00
deraadt@openbsd.org
05000bc5ea upstream: Fix double frees (impossible to reach outside of a test
harness), and also use freezero where possible from Christopher Paul Rohlf at
Anthropic ok djm

OpenBSD-Commit-ID: 50227bff4ffd4a93aad399f21fc20f1c3cbf2c69
2026-07-30 13:49:43 +10:00
markus@openbsd.org
ddbcd8ffda upstream: ssh: implement mlkem768brainpoolp256r1-sha256; ok djm@
OpenBSD-Commit-ID: 99a304085f96d9a595b326c06694290c5612620c
2026-07-30 13:49:43 +10:00
markus@openbsd.org
786cb6a14c upstream: ssh: implement mlkem768nistp256-sha256; ok djm@
OpenBSD-Commit-ID: f5daafce2fcb44684606197873dab4cd189524a9
2026-07-30 13:48:52 +10:00
djm@openbsd.org
1b23e24d21 upstream: use sshpkt_fatal instead of plain fatal() for errors in
the packet code as this provides context of the failing peer (address, port,
user, etc). Based on patch from Dag-Erling Smørgrav
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

OpenBSD-Commit-ID: 2e50ab08ab697722230f5d7dbebc9ea3c4f2931b
2026-07-30 13:46:21 +10:00
dtucker@openbsd.org
7e446d3f59 upstream: Automatically detect IPv6 support
and test IPv6 parsing if found. This should always be enabled on OpenBSD,
but allows us to use the same test in Portable without modifications
that make syncs harder.

OpenBSD-Regress-ID: 80dce2465e9414695d878a9af18a3d75711f7861
2026-07-22 11:35:18 +10:00
dtucker@openbsd.org
5e44a8ce08 upstream: Factor out all of the IPv6 addresses into variables.
This lets us skip them in Portable on platforms that don't support IPv6
all in one place, removing diffs from within the tests themselves and
making syncs easier.

OpenBSD-Regress-ID: be5d2d67c28f8134f84e8baab09f303be8ceb626
2026-07-22 11:35:05 +10:00
Darren Tucker
9e35b3845c Sync missed case-insensitivity changes. 2026-07-22 08:44:39 +10:00
Darren Tucker
b6080d835f Add obsd79 target. 2026-07-22 08:34:32 +10:00
Darren Tucker
d3411094b3 Wording. 2026-07-22 08:34:32 +10:00
djm@openbsd.org
fed6e6fea6 upstream: verify that ChannelTimeout in a Match block is effective
OpenBSD-Regress-ID: 30770cad71ca060aaaa05e4bdd0ea8941b768c6b
2026-07-21 16:20:23 +10:00
djm@openbsd.org
dd4556dc75 upstream: verify that RekeyLimit in a Match block is effective
OpenBSD-Regress-ID: 23084bcf86071a7fe0c121552ec6e0b208cc7e28
2026-07-21 16:20:22 +10:00
dtucker@openbsd.org
3f44bece40 upstream: Use -Ohashalg to restrict output to specfic hash instead
of awk.

OpenBSD-Regress-ID: aa5fac0e3ee8f518794d3361d537090c6e3f0bec
2026-07-21 16:20:22 +10:00
djm@openbsd.org
caa6d7d19d upstream: fix ChannelTimeout and RekeyLimit not being applied in
sshd_config Match blocks; reported by Alex Harrison

OpenBSD-Commit-ID: 2d8866b841fc92e6e079e3f37590ba5948531b3d
2026-07-21 16:20:16 +10:00
djm@openbsd.org
752b4e3bd9 upstream: s/= - 1/= -1/; from serity---
OpenBSD-Commit-ID: d003b300b0062d8e5951b84e8e09bd8d98cfe562
2026-07-21 15:23:24 +10:00
djm@openbsd.org
bf268c8009 upstream: move to a better place
OpenBSD-Commit-ID: 0c70f26de19babb2557a7a95ae7057d996a2c3f8
2026-07-21 15:23:24 +10:00
djm@openbsd.org
76357c4155 upstream: use crypto_api.h #define constants for lengths; no
binary change

OpenBSD-Commit-ID: 6527baa1f07b7fdf42ca84531a13ae3ff2c0dbc8
2026-07-21 15:23:23 +10:00
djm@openbsd.org
d322f2ccf7 upstream: make authorized_keys "restrict" keyword apply correctly
to tunnel forwarding (which is administratively disabled by default).

Reported by Erichen, Institute of Computing Technology,
Chinese Academy of Sciences

OpenBSD-Commit-ID: 5b3cc987a64749c94b20e12755db32a83f8f01e6
2026-07-21 15:23:23 +10:00
naddy@openbsd.org
f6acdce690 upstream: in sshd config dump mode, write all directives in mixed
case for consistency

ok djm@

OpenBSD-Commit-ID: 55647b13194d0aaa7095b89455d4c44ddeb53e7d
2026-07-21 15:23:23 +10:00
naddy@openbsd.org
1ae9eeb18d upstream: read ~/.ssh/id_mldsa44_ed25519 private key files by
default

ok djm@

OpenBSD-Commit-ID: c45683d341d7dce6c126903bf9a37393f2b75839
2026-07-21 15:23:23 +10:00