Commit Graph

12778 Commits

Author SHA1 Message Date
djm@openbsd.org
e86d7a077c
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
2024-10-24 14:29:31 +11:00
djm@openbsd.org
94cdfebec8
upstream: relax valid_domain() checks to allow an underscore as the
first character. ok deraadt@

OpenBSD-Commit-ID: 3f8be6d32496e5596dd8b14e19cb067ddd7969ef
2024-10-24 14:28:40 +11:00
dtucker@openbsd.org
1b05d5437b
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
2024-10-22 19:19:26 +11:00
dtucker@openbsd.org
307ab3c772
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
2024-10-22 17:50:38 +11:00
dtucker@openbsd.org
87bd1cb3cc
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
2024-10-22 17:50:23 +11:00
Darren Tucker
c44c349edd
Resync cvsid missed in commit 6072e4c9. 2024-10-22 17:50:18 +11:00
djm@openbsd.org
fe4305c37f
upstream: mention that LocalForward and RemoteForward can accept Unix
domain socket paths; GHPR115

OpenBSD-Commit-ID: a8a34d0a0c51a9ddab3dfce615f9878fa76ef842
2024-10-18 16:53:50 +11:00
djm@openbsd.org
9c97b6af8e
upstream: remove duplicate check; GHPR392 from Pedro Martelletto
OpenBSD-Commit-ID: 597ab7dd3f0e78939d2659fc1904d0f39ee95487
2024-10-18 16:46:09 +11:00
djm@openbsd.org
d9cd208e89
upstream: allow "-" as output file for moduli screening
based on GHPR393

OpenBSD-Commit-ID: 1517763764eb55d03a6092dd120d2909c6fef0e1
2024-10-18 16:37:53 +11:00
djm@openbsd.org
5eb5c4b282
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
2024-10-18 16:33:29 +11:00
djm@openbsd.org
0a1e75499e
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
2024-10-18 16:16:13 +11:00
djm@openbsd.org
d01ee7a88c
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
2024-10-18 16:04:16 +11:00
djm@openbsd.org
74ff6382f5
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
2024-10-18 15:30:36 +11:00
djm@openbsd.org
a9d6d7d93c
upstream: unreachable POLLERR case; from ya0guang via GHPR485
OpenBSD-Commit-ID: b3c82655190532b01eb817e532742cfaa4687eff
2024-10-18 15:15:27 +11:00
djm@openbsd.org
d76424bf27
upstream: s/Sx/Cm/ for external references; from Domen Puncer
Kugler via GHPR501

OpenBSD-Commit-ID: f864a34feb5d5ff17160cf7c42ad0f7744fe8a3f
2024-10-18 15:12:27 +11:00
naddy@openbsd.org
ca204b994e
upstream: mention SshdAuthPath option; ok djm@
OpenBSD-Commit-ID: 9a5d3add25e4e77bd3805bc5583a842ecf34d85c
2024-10-18 15:12:26 +11:00
Darren Tucker
be27770e84
Remove references to systrace and pledge sandboxes.
ok djm@
2024-10-18 13:38:32 +11:00
Pavel Miadzvedzeu
49e64bf63f
Fix "undeclared 'ut'" error by replacing it with 'utx' 2024-10-18 13:18:43 +11:00
Darren Tucker
67f684733f
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.
2024-10-17 20:50:29 +11:00
Darren Tucker
c06c681aee
MacOS 12 runners are deprecated, replace with 15. 2024-10-17 19:18:23 +11:00
Damien Miller
39db1f23ba
Fix lookup path for sshd-auth; bz3745 2024-10-17 13:28:47 +11:00
Damien Miller
c537eeb1ae
fix breakage; missing saved_argc symbol 2024-10-16 08:28:21 +11:00
Damien Miller
98a0883bde
fix capsicum sandbox 2024-10-14 17:17:50 +11:00
Damien Miller
164ea43805
put back some portable bits for sshd-auth.c 2024-10-14 17:16:41 +11:00
Damien Miller
f8edf08c25
there's only one sandbox, move to a static global 2024-10-14 14:49:25 +11:00
Damien Miller
4482f0042b
depend 2024-10-14 14:49:20 +11:00
djm@openbsd.org
74856204a3
upstream: regress support for split sshd-auth binary
OpenBSD-Regress-ID: df7d18a87b475f70004770f0f4e404adba5f6ab7
2024-10-14 14:03:07 +11:00
djm@openbsd.org
461741083d
upstream: test some more Match syntax, including criteria=arg and
negations

OpenBSD-Regress-ID: 67476baccc60bf1a255fd4e329ada950047b8b8d
2024-10-14 14:02:34 +11:00
djm@openbsd.org
6072e4c938
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
2024-10-14 14:01:37 +11:00
djm@openbsd.org
fe6c6330c1
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
2024-10-14 09:21:08 +11:00
jsg@openbsd.org
538cd28598
upstream: remove duplicate misc.h include ok dtucker@
OpenBSD-Commit-ID: fdd056e7854294834d54632b4282b877cfe4c12e
2024-10-14 09:21:07 +11:00
djm@openbsd.org
0051381a8c
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
2024-10-14 09:21:07 +11:00
djm@openbsd.org
67a115e7a5
upstream: fix previous change to ssh_config Match, which broken on
negated Matches; spotted by phessler@ ok deraadt@

OpenBSD-Commit-ID: b1c6acec66cd5bd1252feff1d02ad7129ced37c7
2024-09-27 10:01:11 +10:00
jsg@openbsd.org
220b6c1290
upstream: remove some unused defines; ok djm@
OpenBSD-Commit-ID: 3a63e4e11d455704f684c28715d61b17f91e0996
2024-09-27 10:01:11 +10:00
jmc@openbsd.org
3ef4f6e8a4
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
2024-09-27 10:01:10 +10:00
djm@openbsd.org
3f02368e8e
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
2024-09-25 11:27:24 +10:00
djm@openbsd.org
9517cc5857
upstream: some extra paranoia, reminded by jsg@
OpenBSD-Commit-ID: 22072bfa1df1391858ae7768a6c627e08593a91e
2024-09-25 11:27:23 +10:00
Damien Miller
815a94e86a
gss-serv.c needs sys/param.h
From Void Linux
2024-09-25 11:15:45 +10:00
Damien Miller
76a618d284
build construct_utmp() when USE_BTMP is set
Fixes compile error on Void Linux/Musl
2024-09-25 11:13:05 +10:00
Darren Tucker
d3aee17f6d
Test the flags from OpenWRT's package. 2024-09-24 18:41:44 +10:00
Christoph Ostarek
0f5d19e6fe
fix utmpx ifdef
02e16ad95f did a copy-paste for
utmpx, but forgot to change the ifdef appropriately
2024-09-24 12:09:48 +10:00
jsg@openbsd.org
e03239f999
upstream: remove some unused defines; ok djm@
OpenBSD-Commit-ID: 81869ee6356fdbff19dae6ff757095e6b24de712
2024-09-24 12:09:35 +10:00
jsg@openbsd.org
a35f543d3a
upstream: remove unneeded semicolons; checked by millert@
OpenBSD-Commit-ID: 3fb621a58e04b759a875ad6a33f35bb57ca80231
2024-09-24 12:09:35 +10:00
Darren Tucker
1641f2d4d6
Add 9.9 branch to CI status console. 2024-09-23 20:52:31 +10:00
Damien Miller
46d1fb16b2
update version numbers 2024-09-20 08:20:13 +10:00
djm@openbsd.org
0bdca1f218
upstream: openssh-9.9
OpenBSD-Commit-ID: 303417285f1a73b9cb7a2ae78d3f493bbbe31f98
2024-09-20 08:18:23 +10:00
Damien Miller
ef2d7f2d3e
include openbsd-compat/base64.c license in LICENSE 2024-09-18 16:03:23 +10:00
Damien Miller
7ef362b989
conditionally include mman.h in arc4random code 2024-09-18 09:01:23 +10:00
Damien Miller
5fb2b5ad0e
fix bug in recently-added sntrup761 fuzzer
key values need to be static to persist across invocations;
spotted by the Qualys Security Advisory team.
2024-09-17 11:53:24 +10:00
djm@openbsd.org
0ca128c9ee
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
2024-09-16 15:37:51 +10:00