]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
9 months agoDisable security key for bigendian interop. 403/head
Darren Tucker [Sat, 9 Nov 2024 00:41:44 +0000 (11:41 +1100)] 
Disable security key for bigendian interop.

It doesn't currently work.  It's not clear why, but I suspect
sk-dummy.so ends up being built for the wrong architecture.

9 months agoReshuffle OpenWRT test configs.
Darren Tucker [Fri, 8 Nov 2024 18:14:16 +0000 (05:14 +1100)] 
Reshuffle OpenWRT test configs.

Move the the flags used by the OpenWRT distro to mipsel target and
enable OpenSSL on all targets to improve coverage.

Explicitly disable security key and openssl on mips target so that host
end of the bigendian interop tests don't attempt them and fail (since
they're not enabled on the target side).

9 months agoAdd keytype to bigendian interop test.
Darren Tucker [Fri, 8 Nov 2024 16:26:08 +0000 (03:26 +1100)] 
Add keytype to bigendian interop test.

9 months agoIgnore chown failure, eg due to dangling symlinks.
Darren Tucker [Fri, 8 Nov 2024 16:24:29 +0000 (03:24 +1100)] 
Ignore chown failure, eg due to dangling symlinks.

9 months agoTest bigendian interop.
Darren Tucker [Sat, 2 Nov 2024 07:05:41 +0000 (18:05 +1100)] 
Test bigendian interop.

Where our test target is a bigendian system, do an additional build on
the runner host (which is little endian) and test interop between the two.
Should hopefully catch obvious endianness bugs.

9 months agoAllow overridding TEST_SSH_SSHD.
Darren Tucker [Fri, 1 Nov 2024 08:44:29 +0000 (19:44 +1100)] 
Allow overridding TEST_SSH_SSHD.

This will allow tests to specify an alternative sshd, eg on a remote
machine with different endianness.

9 months agoupstream: ssh-agent implemented an all-or-nothing allow-list of
djm@openbsd.org [Wed, 6 Nov 2024 22:51:26 +0000 (22:51 +0000)] 
upstream: ssh-agent implemented an all-or-nothing allow-list of

FIDO application IDs for security key-backed keys, to prevent web key handles
from being used remotely as this would likely lead to unpleasant surprises.
By default, only application IDs that start with "ssh:*" are allowed.

This adds a -Owebsafe-allow=... argument that can override the default
list with a more or less restrictive one. The default remains unchanged.

ok markus@

OpenBSD-Commit-ID: 957c1ed92a8d7c87453b9341f70cb3f4e6b23e8d

9 months agoupstream: Ignore extra groups that don't fit in the buffer passed
jca@openbsd.org [Mon, 4 Nov 2024 21:59:15 +0000 (21:59 +0000)] 
upstream: Ignore extra groups that don't fit in the buffer passed

to getgrouplist(3)

Our kernel supports 16 groups (NGROUPS_MAX), but nothing prevents
an admin from adding a user to more groups.  With that tweak we'll keep
on ignoring them instead of potentially reading past the buffer passed to
getgrouplist(3).  That behavior is explicitely described in initgroups(3).

ok millert@ gilles@

OpenBSD-Commit-ID: a959fc45ea3431b36f52eda04faefc58bcde00db

9 months agoAdd git signing key for Tim Rice
Damien Miller [Mon, 4 Nov 2024 03:39:27 +0000 (14:39 +1100)] 
Add git signing key for Tim Rice

9 months agoCorrect path to c-cpp.yml file in workflow config.
Darren Tucker [Fri, 1 Nov 2024 07:51:22 +0000 (18:51 +1100)] 
Correct path to c-cpp.yml file in workflow config.

9 months agoTest new OpenSSL and LibreSSL releases.`
Darren Tucker [Fri, 1 Nov 2024 07:44:42 +0000 (18:44 +1100)] 
Test new OpenSSL and LibreSSL releases.`

9 months agoAdd nbsd10 default test config.
Darren Tucker [Fri, 1 Nov 2024 07:44:00 +0000 (18:44 +1100)] 
Add nbsd10 default test config.

9 months agofix uint64_t types; reported by Tom G. Christensen 526/head
Damien Miller [Wed, 30 Oct 2024 03:25:14 +0000 (14:25 +1100)] 
fix uint64_t types; reported by Tom G. Christensen

9 months agohtole64() etc for systems without endian.h
Damien Miller [Sun, 27 Oct 2024 02:28:11 +0000 (13:28 +1100)] 
htole64() etc for systems without endian.h

9 months agoupstream: explicitly include endian.h
djm@openbsd.org [Sun, 27 Oct 2024 02:06:59 +0000 (02:06 +0000)] 
upstream: explicitly include endian.h

OpenBSD-Commit-ID: 13511fdef7535bdbc35b644c90090013da43a318

9 months agoupstream: fix ML-KEM768x25519 KEX on big-endian systems; spotted by
djm@openbsd.org [Sun, 27 Oct 2024 02:06:01 +0000 (02:06 +0000)] 
upstream: fix ML-KEM768x25519 KEX on big-endian systems; spotted by

jsg@ feedback/ok deraadt@

OpenBSD-Commit-ID: 26d81a430811672bc762687166986cad40d28cc0

9 months agoupstream: mlkem768x25519-sha256 has been promoted to default key
naddy@openbsd.org [Fri, 25 Oct 2024 21:53:24 +0000 (21:53 +0000)] 
upstream: mlkem768x25519-sha256 has been promoted to default key

exchange

OpenBSD-Commit-ID: 5a3259a193fd42108a869ebf650b95b5f2d08dcf

9 months agoRetire the minix3 test config.
Darren Tucker [Fri, 25 Oct 2024 08:04:30 +0000 (19:04 +1100)] 
Retire the minix3 test config.

It got broken by the sshd-auth change, it's not obvious why, and the
platform lacks the debugging tools (eg gdb, strace) to figure it out.
The upstream project seems effectively dead (6 years since the last
commit, 10 since the last release).  It was useful while it lasted
(we found a real bug because of it) but its time seems to have passed.

9 months agoUpdated gitignore to ignore sshd-session and sshd-auth targets
Preetish Amballi [Mon, 21 Oct 2024 14:07:02 +0000 (14:07 +0000)] 
Updated gitignore to ignore sshd-session and sshd-auth targets

9 months agoSimplify pselect shim and remove side effects.
Darren Tucker [Fri, 25 Oct 2024 08:01:02 +0000 (19:01 +1100)] 
Simplify pselect shim and remove side effects.

Instead of maintaing state (pipe descriptors, signal handlers) across
pselect-on-select invocations, set up and restore them each call.
This prevents outside factors (eg a closefrom or signal handler
installation) from potentially causing problems.  This does result in a
drop in throughput of a couple of percent on geriatric platforms without
a native pselect due to the extra overhead.  Tweaks & ok djm@

9 months agoupstream: promote mlkem768x25519-sha256 to be the default key exchange;
djm@openbsd.org [Fri, 25 Oct 2024 01:34:18 +0000 (01:34 +0000)] 
upstream: promote mlkem768x25519-sha256 to be the default key exchange;

ok markus@

OpenBSD-Commit-ID: fc673065e6505bb06b2e2b9362f78ccb4200a828

9 months agoupstream: test SIGUSR1 dropping all keys from ssh-agent
djm@openbsd.org [Thu, 24 Oct 2024 03:28:34 +0000 (03:28 +0000)] 
upstream: test SIGUSR1 dropping all keys from ssh-agent

OpenBSD-Regress-ID: 8654b9aa8eb695b1499fffc408c25319592bf0e0

9 months agoupstream: amake ssh-agent drop all keys when it receives SIGUSR1;
djm@openbsd.org [Thu, 24 Oct 2024 03:15:47 +0000 (03:15 +0000)] 
upstream: amake ssh-agent drop all keys when it receives SIGUSR1;

let's users zap keys without access to $SSH_AUTH_SOCK

ok deraadt@

OpenBSD-Commit-ID: dae9db0516b1011e5ba8c655ac702fce42e6c023

9 months agoupstream: relax valid_domain() checks to allow an underscore as the
djm@openbsd.org [Thu, 24 Oct 2024 03:14:37 +0000 (03:14 +0000)] 
upstream: relax valid_domain() checks to allow an underscore as the

first character. ok deraadt@

OpenBSD-Commit-ID: 3f8be6d32496e5596dd8b14e19cb067ddd7969ef

9 months agoupstream: Remove sshd logfile in start_sshd
dtucker@openbsd.org [Tue, 22 Oct 2024 07:13:28 +0000 (07:13 +0000)] 
upstream: Remove sshd logfile in start_sshd

... and ssh and sshd log wrappers before recreating them.  Prevents "can't
create" errors during tests when running tests without SUDO after having
run them with SUDO.

OpenBSD-Regress-ID: 2f0a83532e3dccd673a9bf0291090277268c69a6

9 months agoupstream: Add a sshd debug wrapper
dtucker@openbsd.org [Tue, 22 Oct 2024 06:16:26 +0000 (06:16 +0000)] 
upstream: Add a sshd debug wrapper

... to run all of the subprograms from the build directory while
developing and debugging.  Should help prevent accidentally testing
against unchanged installed sshd-auth and sshd-session binaries. ok djm@

OpenBSD-Commit-ID: 61760cdc98c2bc8f1e9f83a6f97cca0f66b52e69

9 months agoupstream: Make debug call printf("%s", NULL) safe.
dtucker@openbsd.org [Tue, 22 Oct 2024 06:13:00 +0000 (06:13 +0000)] 
upstream: Make debug call printf("%s", NULL) safe.

Prevents problems on platforms where this isn't safe (which it's not
required to be).  ok djm@

OpenBSD-Commit-ID: 8fa4ce3ad90915c925b81b99a79ab920b0523387

9 months agoResync cvsid missed in commit 6072e4c9.
Darren Tucker [Tue, 22 Oct 2024 06:48:32 +0000 (17:48 +1100)] 
Resync cvsid missed in commit 6072e4c9.

10 months agoupstream: mention that LocalForward and RemoteForward can accept Unix
djm@openbsd.org [Fri, 18 Oct 2024 05:53:26 +0000 (05:53 +0000)] 
upstream: mention that LocalForward and RemoteForward can accept Unix

domain socket paths; GHPR115

OpenBSD-Commit-ID: a8a34d0a0c51a9ddab3dfce615f9878fa76ef842

10 months agoupstream: remove duplicate check; GHPR392 from Pedro Martelletto
djm@openbsd.org [Fri, 18 Oct 2024 05:45:40 +0000 (05:45 +0000)] 
upstream: remove duplicate check; GHPR392 from Pedro Martelletto

OpenBSD-Commit-ID: 597ab7dd3f0e78939d2659fc1904d0f39ee95487

10 months agoupstream: allow "-" as output file for moduli screening
djm@openbsd.org [Fri, 18 Oct 2024 05:37:24 +0000 (05:37 +0000)] 
upstream: allow "-" as output file for moduli screening

based on GHPR393

OpenBSD-Commit-ID: 1517763764eb55d03a6092dd120d2909c6fef0e1

10 months agoupstream: ssh-keyscan doesn't need it's own sshfatal() definition, it
djm@openbsd.org [Fri, 18 Oct 2024 05:32:51 +0000 (05:32 +0000)] 
upstream: ssh-keyscan doesn't need it's own sshfatal() definition, it

can use the shared one from fatal.c

based on GHPR401 from lengyijun

OpenBSD-Commit-ID: 8ea75ea99f27f464c9223cbc89cb046ccf9cd5c4

10 months agoupstream: in _ssh_order_hostkeyalgs() consider ECDSA curve type when
djm@openbsd.org [Fri, 18 Oct 2024 05:14:51 +0000 (05:14 +0000)] 
upstream: in _ssh_order_hostkeyalgs() consider ECDSA curve type when

arranging the hostkey algorithms. AFAIK this code is unused in OpenSSH, but I
guess others are using it

based on GHPR387 from Pawel Jakub Dawidek

OpenBSD-Commit-ID: 4d462495ac0c40f7b7dd66178e0005b9b2128225

10 months agoupstream: require control-escape character sequences passed via the '-e
djm@openbsd.org [Fri, 18 Oct 2024 05:03:34 +0000 (05:03 +0000)] 
upstream: require control-escape character sequences passed via the '-e

^x' commandline to be exactly two characters long. Avoids one by OOB read if
ssh is invoked as "ssh -e^ ..."

Spotted by Maciej Domanski in GHPR368

OpenBSD-Commit-ID: baa72bc60898fc5639e6c62de7493a202c95823d

10 months agoupstream: remove addr.[ch] functions that are unused and
djm@openbsd.org [Fri, 18 Oct 2024 04:30:09 +0000 (04:30 +0000)] 
upstream: remove addr.[ch] functions that are unused and

visbility-restrict ones that are unused outside the implementation itself;
based on GHPR#282 by tobias@

OpenBSD-Commit-ID: a0140f2418b4d46cfaa7b33febc0a0931f9b2744

10 months agoupstream: unreachable POLLERR case; from ya0guang via GHPR485
djm@openbsd.org [Fri, 18 Oct 2024 04:14:59 +0000 (04:14 +0000)] 
upstream: unreachable POLLERR case; from ya0guang via GHPR485

OpenBSD-Commit-ID: b3c82655190532b01eb817e532742cfaa4687eff

10 months agoupstream: s/Sx/Cm/ for external references; from Domen Puncer
djm@openbsd.org [Fri, 18 Oct 2024 04:11:54 +0000 (04:11 +0000)] 
upstream: s/Sx/Cm/ for external references; from Domen Puncer

Kugler via GHPR501

OpenBSD-Commit-ID: f864a34feb5d5ff17160cf7c42ad0f7744fe8a3f

10 months agoupstream: mention SshdAuthPath option; ok djm@
naddy@openbsd.org [Mon, 14 Oct 2024 23:53:34 +0000 (23:53 +0000)] 
upstream: mention SshdAuthPath option; ok djm@

OpenBSD-Commit-ID: 9a5d3add25e4e77bd3805bc5583a842ecf34d85c

10 months agoRemove references to systrace and pledge sandboxes.
Darren Tucker [Fri, 18 Oct 2024 02:37:55 +0000 (13:37 +1100)] 
Remove references to systrace and pledge sandboxes.

ok djm@

10 months agoFix "undeclared 'ut'" error by replacing it with 'utx'
Pavel Miadzvedzeu [Wed, 24 Apr 2024 07:19:56 +0000 (10:19 +0300)] 
Fix "undeclared 'ut'" error by replacing it with 'utx'

10 months agoSeed RNG when starting up sshd-auth.
Darren Tucker [Thu, 17 Oct 2024 09:50:29 +0000 (20:50 +1100)] 
Seed RNG when starting up sshd-auth.

Makes builds configured --without-openssl work again since otherwise
the first use of the RNG comes after the sandbox init and it can't
open /dev/random.

10 months agoMacOS 12 runners are deprecated, replace with 15.
Darren Tucker [Thu, 17 Oct 2024 08:18:23 +0000 (19:18 +1100)] 
MacOS 12 runners are deprecated, replace with 15.

10 months agoFix lookup path for sshd-auth; bz3745
Damien Miller [Thu, 17 Oct 2024 02:28:47 +0000 (13:28 +1100)] 
Fix lookup path for sshd-auth; bz3745

10 months agofix breakage; missing saved_argc symbol
Damien Miller [Tue, 15 Oct 2024 21:28:21 +0000 (08:28 +1100)] 
fix breakage; missing saved_argc symbol

10 months agofix capsicum sandbox
Damien Miller [Mon, 14 Oct 2024 06:17:50 +0000 (17:17 +1100)] 
fix capsicum sandbox

10 months agoput back some portable bits for sshd-auth.c
Damien Miller [Mon, 14 Oct 2024 06:16:41 +0000 (17:16 +1100)] 
put back some portable bits for sshd-auth.c

10 months agothere's only one sandbox, move to a static global
Damien Miller [Mon, 14 Oct 2024 03:49:25 +0000 (14:49 +1100)] 
there's only one sandbox, move to a static global

10 months agodepend
Damien Miller [Mon, 14 Oct 2024 03:49:20 +0000 (14:49 +1100)] 
depend

10 months agoupstream: regress support for split sshd-auth binary
djm@openbsd.org [Mon, 14 Oct 2024 03:02:08 +0000 (03:02 +0000)] 
upstream: regress support for split sshd-auth binary

OpenBSD-Regress-ID: df7d18a87b475f70004770f0f4e404adba5f6ab7

10 months agoupstream: test some more Match syntax, including criteria=arg and
djm@openbsd.org [Fri, 27 Sep 2024 01:05:54 +0000 (01:05 +0000)] 
upstream: test some more Match syntax, including criteria=arg and

negations

OpenBSD-Regress-ID: 67476baccc60bf1a255fd4e329ada950047b8b8d

10 months agoupstream: Split per-connection sshd-session binary
djm@openbsd.org [Mon, 14 Oct 2024 01:57:50 +0000 (01:57 +0000)] 
upstream: Split per-connection sshd-session binary

This splits the user authentication code from the sshd-session
binary into a separate sshd-auth binary. This will be executed by
sshd-session to complete the user authentication phase of the
protocol only.

Splitting this code into a separate binary ensures that the crucial
pre-authentication attack surface has an entirely disjoint address
space from the code used for the rest of the connection. It also
yields a small runtime memory saving as the authentication code will
be unloaded after thhe authentication phase completes.

Joint work with markus@ feedback deraadt@

Tested in snaps since last week

OpenBSD-Commit-ID: 9c3b2087ae08626ec31b4177b023db600e986d9c

10 months agoupstream: don't start the ObscureKeystrokeTiming mitigations if
djm@openbsd.org [Sun, 13 Oct 2024 22:20:06 +0000 (22:20 +0000)] 
upstream: don't start the ObscureKeystrokeTiming mitigations if

there has been traffic on a X11 forwarding channel recently.

Should fix X11 forwarding performance problems when this setting is
enabled. Patch from Antonio Larrosa via bz3655

OpenBSD-Commit-ID: 820284a92eb4592fcd3d181a62c1b86b08a4a7ab

10 months agoupstream: remove duplicate misc.h include ok dtucker@
jsg@openbsd.org [Sat, 12 Oct 2024 10:50:37 +0000 (10:50 +0000)] 
upstream: remove duplicate misc.h include ok dtucker@

OpenBSD-Commit-ID: fdd056e7854294834d54632b4282b877cfe4c12e

10 months agoupstream: Turn off finite field (a.k.a modp) Diffie-Hellman key
djm@openbsd.org [Sun, 6 Oct 2024 23:37:17 +0000 (23:37 +0000)] 
upstream: Turn off finite field (a.k.a modp) Diffie-Hellman key

exchange in sshd by default. Specifically, this removes the
diffie-hellman-group* and diffie-hellman-group-exchange-* methods. The client
is unchanged and continues to support these methods by default.

Finite field Diffie Hellman is slow and computationally expensive for
the same security level as Elliptic Curve DH or PQ key agreement while
offering no redeeming advantages.

ECDH has been specified for the SSH protocol for 15 years and some
form of ECDH has been the default key exchange in OpenSSH for the last
14 years.

ok markus@

OpenBSD-Commit-ID: 4e238ad480a33312667cc10ae0eb6393abaec8da

10 months agoupstream: fix previous change to ssh_config Match, which broken on
djm@openbsd.org [Thu, 26 Sep 2024 23:55:08 +0000 (23:55 +0000)] 
upstream: fix previous change to ssh_config Match, which broken on

negated Matches; spotted by phessler@ ok deraadt@

OpenBSD-Commit-ID: b1c6acec66cd5bd1252feff1d02ad7129ced37c7

10 months agoupstream: remove some unused defines; ok djm@
jsg@openbsd.org [Wed, 25 Sep 2024 23:01:39 +0000 (23:01 +0000)] 
upstream: remove some unused defines; ok djm@

OpenBSD-Commit-ID: 3a63e4e11d455704f684c28715d61b17f91e0996

10 months agoupstream: remove some unneeded Xo/Xc calls; from evan silberman the
jmc@openbsd.org [Wed, 25 Sep 2024 06:13:01 +0000 (06:13 +0000)] 
upstream: remove some unneeded Xo/Xc calls; from evan silberman the

original diff had a couple of errors, which i've fixed

OpenBSD-Commit-ID: f37ad5888adbc0d4e1cd6b6de237841f4b1e650d

10 months agoupstream: fix regression introduced when I switched the "Match"
djm@openbsd.org [Wed, 25 Sep 2024 01:24:04 +0000 (01:24 +0000)] 
upstream: fix regression introduced when I switched the "Match"

criteria tokeniser to a more shell-like one. Apparently the old tokeniser
(accidentally?) allowed "Match criteria=argument" as well as the "Match
criteria argument" syntax that we tested for.

People were using this syntax so this adds back support for
"Match criteria=argument"

bz3739 ok dtucker

OpenBSD-Commit-ID: d1eebedb8c902002b75b75debfe1eeea1801f58a

10 months agoupstream: some extra paranoia, reminded by jsg@
djm@openbsd.org [Tue, 24 Sep 2024 02:28:17 +0000 (02:28 +0000)] 
upstream: some extra paranoia, reminded by jsg@

OpenBSD-Commit-ID: 22072bfa1df1391858ae7768a6c627e08593a91e

10 months agogss-serv.c needs sys/param.h
Damien Miller [Wed, 25 Sep 2024 01:15:45 +0000 (11:15 +1000)] 
gss-serv.c needs sys/param.h

From Void Linux

10 months agobuild construct_utmp() when USE_BTMP is set
Damien Miller [Wed, 25 Sep 2024 01:13:05 +0000 (11:13 +1000)] 
build construct_utmp() when USE_BTMP is set

Fixes compile error on Void Linux/Musl

10 months agoTest the flags from OpenWRT's package.
Darren Tucker [Tue, 24 Sep 2024 08:41:44 +0000 (18:41 +1000)] 
Test the flags from OpenWRT's package.

10 months agofix utmpx ifdef
Christoph Ostarek [Wed, 3 Jul 2024 10:46:59 +0000 (12:46 +0200)] 
fix utmpx ifdef

02e16ad95fb1f56ab004b01a10aab89f7103c55d did a copy-paste for
utmpx, but forgot to change the ifdef appropriately

10 months agoupstream: remove some unused defines; ok djm@
jsg@openbsd.org [Sun, 22 Sep 2024 12:56:21 +0000 (12:56 +0000)] 
upstream: remove some unused defines; ok djm@

OpenBSD-Commit-ID: 81869ee6356fdbff19dae6ff757095e6b24de712

10 months agoupstream: remove unneeded semicolons; checked by millert@
jsg@openbsd.org [Fri, 20 Sep 2024 02:00:46 +0000 (02:00 +0000)] 
upstream: remove unneeded semicolons; checked by millert@

OpenBSD-Commit-ID: 3fb621a58e04b759a875ad6a33f35bb57ca80231

10 months agoAdd 9.9 branch to CI status console.
Darren Tucker [Mon, 23 Sep 2024 10:52:31 +0000 (20:52 +1000)] 
Add 9.9 branch to CI status console.

10 months agoupdate version numbers
Damien Miller [Thu, 19 Sep 2024 22:20:13 +0000 (08:20 +1000)] 
update version numbers

10 months agoupstream: openssh-9.9
djm@openbsd.org [Thu, 19 Sep 2024 22:17:44 +0000 (22:17 +0000)] 
upstream: openssh-9.9

OpenBSD-Commit-ID: 303417285f1a73b9cb7a2ae78d3f493bbbe31f98

10 months agoinclude openbsd-compat/base64.c license in LICENSE
Damien Miller [Wed, 18 Sep 2024 06:03:23 +0000 (16:03 +1000)] 
include openbsd-compat/base64.c license in LICENSE

11 months agoconditionally include mman.h in arc4random code
Damien Miller [Tue, 17 Sep 2024 23:01:23 +0000 (09:01 +1000)] 
conditionally include mman.h in arc4random code

11 months agofix bug in recently-added sntrup761 fuzzer
Damien Miller [Tue, 17 Sep 2024 01:53:24 +0000 (11:53 +1000)] 
fix bug in recently-added sntrup761 fuzzer

key values need to be static to persist across invocations;
spotted by the Qualys Security Advisory team.

11 months agoupstream: use 64 bit math to avoid signed underflow. upstream code
djm@openbsd.org [Mon, 16 Sep 2024 05:37:05 +0000 (05:37 +0000)] 
upstream: use 64 bit math to avoid signed underflow. upstream code

relies on using -fwrapv to provide defined over/underflow behaviour, but we
use -ftrapv to catch integer errors and abort the program. ok dtucker@

OpenBSD-Commit-ID: 8933369b33c17b5f02479503d0a92d87bc3a574b

11 months agoupstream: minor grammar/sort fixes for refuseconnection; ok djm
jmc@openbsd.org [Sun, 15 Sep 2024 08:27:38 +0000 (08:27 +0000)] 
upstream: minor grammar/sort fixes for refuseconnection; ok djm

OpenBSD-Commit-ID: 1c81f37b138b8b66abba811fec836388a0f3e6da

11 months agoavoid gcc warning in fuzz test
Damien Miller [Sun, 15 Sep 2024 03:30:13 +0000 (13:30 +1000)] 
avoid gcc warning in fuzz test

11 months agoupstream: bad whitespace in config dump output
djm@openbsd.org [Sun, 15 Sep 2024 03:09:44 +0000 (03:09 +0000)] 
upstream: bad whitespace in config dump output

OpenBSD-Commit-ID: d899c13b0e8061d209298eaf58fe53e3643e967c

11 months agouse construct_utmp to construct btmp records
Damien Miller [Sun, 15 Sep 2024 02:53:59 +0000 (12:53 +1000)] 
use construct_utmp to construct btmp records

Simpler and removes some code with the old-style BSD license.

11 months agoupstream: update the Streamlined NTRU Prime code from the "ref"
djm@openbsd.org [Sun, 15 Sep 2024 02:20:51 +0000 (02:20 +0000)] 
upstream: update the Streamlined NTRU Prime code from the "ref"

implementation in SUPERCOP 20201130 to the "compact" implementation in
SUPERCOP 20240808. The new version is substantially faster. Thanks to Daniel
J Bernstein for pointing out the new implementation (and of course for
writing it).

tested in snaps/ok deraadt@

OpenBSD-Commit-ID: bf1a77924c125ecdbf03e2f3df8ad13bd3dafdcb

11 months agoupstream: document Match invalid-user
djm@openbsd.org [Sun, 15 Sep 2024 01:19:56 +0000 (01:19 +0000)] 
upstream: document Match invalid-user

OpenBSD-Commit-ID: 2c84a9b517283e9711e2812c1f268081dcb02081

11 months agoupstream: add a "Match invalid-user" predicate to sshd_config Match
djm@openbsd.org [Sun, 15 Sep 2024 01:18:26 +0000 (01:18 +0000)] 
upstream: add a "Match invalid-user" predicate to sshd_config Match

options.

This allows writing Match conditions that trigger for invalid username.
E.g.

PerSourcePenalties refuseconnection:90s
Match invalid-user
 RefuseConnection yes

Will effectively penalise bots try to guess passwords for bogus accounts,
at the cost of implicitly revealing which accounts are invalid.

feedback markus@

OpenBSD-Commit-ID: 93d3a46ca04bbd9d84a94d1e1d9d3a21073fbb07

11 months agoupstream: Add a "refuseconnection" penalty class to sshd_config
djm@openbsd.org [Sun, 15 Sep 2024 01:11:26 +0000 (01:11 +0000)] 
upstream: Add a "refuseconnection" penalty class to sshd_config

PerSourcePenalties

This allows penalising connection sources that have had connections
dropped by the RefuseConnection option. ok markus@

OpenBSD-Commit-ID: 3c8443c427470bb3eac1880aa075cb4864463cb6

11 months agoupstream: Add a sshd_config "RefuseConnection" option
djm@openbsd.org [Sun, 15 Sep 2024 01:09:40 +0000 (01:09 +0000)] 
upstream: Add a sshd_config "RefuseConnection" option

If set, this will terminate the connection at the first authentication
request (this is the earliest we can evaluate sshd_config Match blocks)

ok markus@

OpenBSD-Commit-ID: 43cc2533984074c44d0d2f92eb93f661e7a0b09c

11 months agoupstream: switch sshd_config Match processing to the argv tokeniser
djm@openbsd.org [Sun, 15 Sep 2024 00:58:01 +0000 (00:58 +0000)] 
upstream: switch sshd_config Match processing to the argv tokeniser

too; ok markus@

OpenBSD-Commit-ID: b74b5b0385f2e0379670e2b869318a65b0bc3923

11 months agoupstream: switch "Match" directive processing over to the argv
djm@openbsd.org [Sun, 15 Sep 2024 00:57:36 +0000 (00:57 +0000)] 
upstream: switch "Match" directive processing over to the argv

string tokeniser, making it possible to use shell-like quoting in Match
directives, particularly "Match exec". ok markus@

OpenBSD-Commit-ID: 0877309650b76f624b2194c35dbacaf065e769a5

11 months agoupstream: include pathname in some of the ssh-keygen passphrase
djm@openbsd.org [Sun, 15 Sep 2024 00:47:01 +0000 (00:47 +0000)] 
upstream: include pathname in some of the ssh-keygen passphrase

prompts. Helps the user know what's going on when ssh-keygen is invoked via
other tools. Requested in GHPR503

OpenBSD-Commit-ID: 613b0bb6cf845b7e787d69a5b314057ceda6a8b6

11 months agoupstream: Do not apply authorized_keys options when signature
djm@openbsd.org [Sun, 15 Sep 2024 00:41:18 +0000 (00:41 +0000)] 
upstream: Do not apply authorized_keys options when signature

verification fails. Prevents restrictive key options being incorrectly
applied to subsequent keys in authorized_keys. bz3733, ok markus@

OpenBSD-Commit-ID: ba3776d9da4642443c19dbc015a1333622eb5a4e

11 months agoFix without_openssl always being set to 1
Wu Weixin [Fri, 2 Aug 2024 14:16:40 +0000 (22:16 +0800)] 
Fix without_openssl always being set to 1

In Fedora systems, %{?rhel} is empty. In RHEL systems, %{?fedora} is
empty. Therefore, the original code always sets without_openssl to 1.

11 months agoupstream: Relax absolute path requirement back to what it was prior to
djm@openbsd.org [Thu, 12 Sep 2024 00:36:27 +0000 (00:36 +0000)] 
upstream: Relax absolute path requirement back to what it was prior to

OpenSSH 9.8, which incorrectly required that sshd was started with an
absolute path in inetd mode. bz3717, patch from Colin Wilson

OpenBSD-Commit-ID: 25c57f22764897242d942853f8cccc5e991ea058

11 months agoupstream: document the mlkem768x25519-sha256 key exchange algorithm
naddy@openbsd.org [Mon, 9 Sep 2024 14:41:21 +0000 (14:41 +0000)] 
upstream: document the mlkem768x25519-sha256 key exchange algorithm

OpenBSD-Commit-ID: fa18dccdd9753dd287e62ecab189b3de45672521

11 months agoSpell omnios test host correctly.
Darren Tucker [Tue, 10 Sep 2024 11:11:14 +0000 (21:11 +1000)] 
Spell omnios test host correctly.

11 months agoAdd omnios test target.
Darren Tucker [Tue, 10 Sep 2024 08:52:02 +0000 (18:52 +1000)] 
Add omnios test target.

11 months agoWrap stdint.h in ifdef.
Darren Tucker [Tue, 10 Sep 2024 08:45:55 +0000 (18:45 +1000)] 
Wrap stdint.h in ifdef.

11 months agoAlso test PAM on dfly64.
Darren Tucker [Mon, 9 Sep 2024 09:31:54 +0000 (19:31 +1000)] 
Also test PAM on dfly64.

11 months agostubs for ML-KEM KEX functions
Damien Miller [Mon, 9 Sep 2024 11:50:14 +0000 (21:50 +1000)] 
stubs for ML-KEM KEX functions

used for C89 compilers

11 months agodeclare defeat trying to detect C89 compilers
Damien Miller [Mon, 9 Sep 2024 07:30:38 +0000 (17:30 +1000)] 
declare defeat trying to detect C89 compilers

I can't find a reliable way to detect the features the ML-KEM code
requires in configure. Give up for now and use VLA support (that we
can detect) as a proxy for "old compiler" and turn off ML-KEM if
it isn't supported.

11 months agofix previous; check for C99 compound literals
Damien Miller [Mon, 9 Sep 2024 06:46:40 +0000 (16:46 +1000)] 
fix previous; check for C99 compound literals

The previous commit was incorrect (or at least insufficient), the
ML-KEM code is actually using compound literals, so test for them.

11 months agotest for compiler feature needed for ML-KEM
Damien Miller [Mon, 9 Sep 2024 06:06:21 +0000 (16:06 +1000)] 
test for compiler feature needed for ML-KEM

The ML-KEM implementation we uses need the compiler to support
C99-style named struct initialisers (e.g foo = {.bar = 1}). We
still support (barely) building OpenSSH with older compilers, so
add a configure test for this.

11 months agoupstream: test mlkem768x25519-sha256
djm@openbsd.org [Mon, 9 Sep 2024 03:13:39 +0000 (03:13 +0000)] 
upstream: test mlkem768x25519-sha256

OpenBSD-Regress-ID: 7baf6bc39ae55648db1a2bfdc55a624954847611

11 months agoupstream: pull post-quantum ML-KEM/x25519 key exchange out from
djm@openbsd.org [Mon, 9 Sep 2024 02:39:57 +0000 (02:39 +0000)] 
upstream: pull post-quantum ML-KEM/x25519 key exchange out from

compile-time flag now than an IANA codepoint has been assigned for the
algorithm.

Add mlkem768x25519-sha256 in 2nd KexAlgorithms preference slot.

ok markus@

OpenBSD-Commit-ID: 9f50a0fae7d7ae8b27fcca11f8dc6f979207451a

11 months agoupstream: make parsing user@host consistently look for the last '@' in
djm@openbsd.org [Fri, 6 Sep 2024 02:30:44 +0000 (02:30 +0000)] 
upstream: make parsing user@host consistently look for the last '@' in

the string rather than the first. This makes it possible to use usernames
that contain '@' characters.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Prompted by Max Zettlmeißl; feedback/ok millert@

OpenBSD-Commit-ID: 0b16eec246cda15469ebdcf3b1e2479810e394c5

11 months agoupstream: be more strict in parsing key type names. Only allow
djm@openbsd.org [Wed, 4 Sep 2024 05:33:34 +0000 (05:33 +0000)] 
upstream: be more strict in parsing key type names. Only allow

shortnames (e.g "rsa") in user-interface code and require full SSH protocol
names (e.g. "ssh-rsa") everywhere else.

Prompted by bz3725; ok markus@

OpenBSD-Commit-ID: b3d8de9dac37992eab78adbf84fab2fe0d84b187