]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
4 days agomention sntrup761x25519-sha512 in manpages V_9_8 anongit/V_9_8 github-selfhosted/V_9_8 github/V_9_8
Damien Miller [Tue, 12 Aug 2025 23:16:34 +0000 (09:16 +1000)] 
mention sntrup761x25519-sha512 in manpages

Spotted by Colin Watson

4 days agoback out unrelated manpages changes
Damien Miller [Tue, 12 Aug 2025 23:19:53 +0000 (09:19 +1000)] 
back out unrelated manpages changes

spotted by Colin Wilson

6 days agosupport sntrup761x25519-sha512 alias
Damien Miller [Mon, 11 Aug 2025 06:40:24 +0000 (16:40 +1000)] 
support sntrup761x25519-sha512 alias

OpenSSH 9.8 supports the sntrup761x25519-sha512@openssh.com
key agreement algorithm. As part of standardisation, this algorithm
has been assigned the name sntrup761x25519-sha512.

This commit enables the existing algorithm under this new name.

13 months agoupstream: correct keyword; from Yatao Su via GHPR509
djm@openbsd.org [Wed, 10 Jul 2024 21:58:34 +0000 (21:58 +0000)] 
upstream: correct keyword; from Yatao Su via GHPR509

OpenBSD-Commit-ID: 81c778c76dea7ef407603caa157eb0c381c52ad2

13 months agoCast to sockaddr * in systemd interface.
Darren Tucker [Sun, 7 Jul 2024 08:46:19 +0000 (18:46 +1000)] 
Cast to sockaddr * in systemd interface.

Fixes build with musl libx.  bz#3707.

13 months agoAdd 9.8 branch to ci-status page.
Darren Tucker [Thu, 4 Jul 2024 10:12:26 +0000 (20:12 +1000)] 
Add 9.8 branch to ci-status page.

13 months agoFix detection of setres*id on GNU/Hurd
Samuel Thibault [Tue, 26 Mar 2024 21:15:08 +0000 (22:15 +0100)] 
Fix detection of setres*id on GNU/Hurd

Like Linux, proper _SOURCE macros need to be set to get declarations of
various standard functions, notably setres*id. Now that Debian is using
-Werror=implicit-function-declaration this is really required. While at
it, define other _SOURCE macros like on GNU/Linux, since GNU/Hurd uses
the same glibc.

13 months agoautogenerated files for release V_9_8_P1
Damien Miller [Mon, 1 Jul 2024 04:36:28 +0000 (14:36 +1000)] 
autogenerated files for release

13 months agoversion numbers
Damien Miller [Mon, 1 Jul 2024 04:33:26 +0000 (14:33 +1000)] 
version numbers

13 months agoupstream: openssh-9.8
djm@openbsd.org [Mon, 1 Jul 2024 04:31:59 +0000 (04:31 +0000)] 
upstream: openssh-9.8

OpenBSD-Commit-ID: 5f8b89e38a4c5f7c6d52ffa19f796d49f36fab19

13 months agoupstream: when sending ObscureKeystrokeTiming chaff packets, we
djm@openbsd.org [Mon, 1 Jul 2024 04:31:17 +0000 (04:31 +0000)] 
upstream: when sending ObscureKeystrokeTiming chaff packets, we

can't rely on channel_did_enqueue to tell that there is data to send. This
flag indicates that the channels code enqueued a packet on _this_ ppoll()
iteration, not that data was enqueued in _any_ ppoll() iteration in the
timeslice. ok markus@

OpenBSD-Commit-ID: 009b74fd2769b36b5284a0188ade182f00564136

13 months agoupstream: use "lcd" to change directory before "lls" rather then "cd",
djm@openbsd.org [Mon, 1 Jul 2024 03:10:19 +0000 (03:10 +0000)] 
upstream: use "lcd" to change directory before "lls" rather then "cd",

since the directory we're trying to list is local. Spotted by Corinna
Vinschen

OpenBSD-Regress-ID: 821feca4a4bebe491944e624c8f7f2990b891415

13 months agoupstream: delete obsolete comment
djm@openbsd.org [Thu, 27 Jun 2024 23:01:15 +0000 (23:01 +0000)] 
upstream: delete obsolete comment

OpenBSD-Commit-ID: 5fb04f298ed155053f3fbfdf0c6fe7cdf84bbfa2

13 months agoupstream: retire unused API
djm@openbsd.org [Thu, 27 Jun 2024 22:36:44 +0000 (22:36 +0000)] 
upstream: retire unused API

OpenBSD-Commit-ID: 3e30d7b0615e2707f6bbe70f61b1c2f72f78161b

13 months agoupstream: ssl(8) no longer contains a HISTORY section;
jmc@openbsd.org [Thu, 27 Jun 2024 21:02:16 +0000 (21:02 +0000)] 
upstream: ssl(8) no longer contains a HISTORY section;

OpenBSD-Commit-ID: 83b7ff34433d79595e9c2a5d2a561a6660251245

13 months agoupstream: move child process waitpid() loop out of SIGCHLD handler;
djm@openbsd.org [Wed, 26 Jun 2024 23:47:46 +0000 (23:47 +0000)] 
upstream: move child process waitpid() loop out of SIGCHLD handler;

ok deraadt

OpenBSD-Commit-ID: 65815a39564e431414aed7c5ace8076f4e9ca741

13 months agoupstream: Instead of using possibly complex ssh_signal(), write all
deraadt@openbsd.org [Wed, 26 Jun 2024 23:16:52 +0000 (23:16 +0000)] 
upstream: Instead of using possibly complex ssh_signal(), write all

the parts of the grace_alarm_handler() using the exact things allowed by the
signal-safe rules.  This is a good rule of thumb: Handlers should be written
to either set a global volatile sig_atomic_t inspected from outside, and/or
directly perform only safe operations listed in our sigaction(2) manual page.
ok djm markus

OpenBSD-Commit-ID: 14168ae8368aab76e4ed79e17a667cb46f404ecd

13 months agoupstream: save_errno wrappers inside two small signal handlers that
deraadt@openbsd.org [Wed, 26 Jun 2024 23:14:14 +0000 (23:14 +0000)] 
upstream: save_errno wrappers inside two small signal handlers that

perform system calls, for systems with libc that do perform libc sigtramps.
ok djm markus

OpenBSD-Commit-ID: 7749b56419a7c9dcfe4c6c04811e429813346c62

13 months agoupstream: - uppercase start of sentence - correct sentence grammar
jmc@openbsd.org [Mon, 24 Jun 2024 06:59:39 +0000 (06:59 +0000)] 
upstream: - uppercase start of sentence - correct sentence grammar

ok djm

OpenBSD-Commit-ID: 1ec4b0fdb633a43667f2c8fff1d600bd647dde25

13 months agoupstream: mention SshdSessionPath option
djm@openbsd.org [Mon, 24 Jun 2024 04:05:11 +0000 (04:05 +0000)] 
upstream: mention SshdSessionPath option

OpenBSD-Commit-ID: c29734d36c21003973b15c1c9965c35f36cef30c

13 months agoRerun upstream tests on .sh file changes too.
Darren Tucker [Thu, 20 Jun 2024 08:45:14 +0000 (18:45 +1000)] 
Rerun upstream tests on .sh file changes too.

13 months agoupstream: Work around dbclient cipher/mac query bug.
dtucker@openbsd.org [Thu, 20 Jun 2024 08:23:18 +0000 (08:23 +0000)] 
upstream: Work around dbclient cipher/mac query bug.

Unlike earlier versions, recent Dropbear (at least v2024.85) requires
a host arg when querying supported ciphers and macs via "-c/-m
help".  Earlier versions accept but do not require it, so always
provide it.  If these queries fail, skip the test with a warning.

OpenBSD-Regress-ID: 98eb863a3f0363416922efb273885e6b3c7f68d4

13 months agoupstream: Remove dropbear key types not supported
dtucker@openbsd.org [Thu, 20 Jun 2024 08:18:34 +0000 (08:18 +0000)] 
upstream: Remove dropbear key types not supported

by current OpenSSH. Allows subsequent test runs to work if OpenSSH is
rebuilt w/out OpenSSL.

OpenBSD-Regress-ID: e0129eb2b1d31771105903a8055216fbba20a770

13 months agoupstream: stricter check for overfull tables in penalty record path
djm@openbsd.org [Thu, 20 Jun 2024 00:18:05 +0000 (00:18 +0000)] 
upstream: stricter check for overfull tables in penalty record path

OpenBSD-Commit-ID: 7df01e648a0723418c554e64a9f2b6d38db060a6

13 months agoupstream: put back reaping of preauth child process when writes
djm@openbsd.org [Wed, 19 Jun 2024 23:24:47 +0000 (23:24 +0000)] 
upstream: put back reaping of preauth child process when writes

from the monitor fail. Not sure how this got lost in the avalanche of
patches.

OpenBSD-Commit-ID: eb7eb36371e1ac01050b32b70fb2b3e5d98e72f5

13 months agoupstream: remove one more mention of DSA
naddy@openbsd.org [Mon, 17 Jun 2024 13:50:18 +0000 (13:50 +0000)] 
upstream: remove one more mention of DSA

OpenBSD-Commit-ID: 8515f55a15f02836ba657df341415f63c60526ca

13 months agoMove -f to the place needed to restart sshd.
Darren Tucker [Wed, 19 Jun 2024 13:09:05 +0000 (23:09 +1000)] 
Move -f to the place needed to restart sshd.

13 months agoNeed to supply "-f" to restart sshd.
Darren Tucker [Wed, 19 Jun 2024 11:04:01 +0000 (21:04 +1000)] 
Need to supply "-f" to restart sshd.

13 months agoupstream: Provide defaults for ciphers and macs
dtucker@openbsd.org [Wed, 19 Jun 2024 10:15:51 +0000 (10:15 +0000)] 
upstream: Provide defaults for ciphers and macs

if querying for them fails since on some versions of Dropbear (at least
v2024.85) "-m help" doesn't seem to work.  Enable all supported pubkey
algorithms in the server.

OpenBSD-Regress-ID: 4f95556a49ee9f621789f25217c367a33d2745ca

13 months agoupstream: Use ed25519 keys for kex tests
dtucker@openbsd.org [Wed, 19 Jun 2024 10:10:46 +0000 (10:10 +0000)] 
upstream: Use ed25519 keys for kex tests

since that's supported by OpenSSH even when built without OpenSSL.
Only test diffie-hellman kex if OpenSSH is compiled with support for it.

OpenBSD-Regress-ID: a5d09ef9bbd171f9e4ec73ed0d9eeb49a8878e97

13 months agoupstream: Rework dropbear key setup
dtucker@openbsd.org [Wed, 19 Jun 2024 10:08:34 +0000 (10:08 +0000)] 
upstream: Rework dropbear key setup

to always generate ed25519 keys, other types only if OpenSSH has support
for the corresponding key type.

OpenBSD-Regress-ID: 8f91f12604cddb9f8d93aa34f3f93a3f6074395d

13 months agoRestart sshd after installing it for testing.
Darren Tucker [Wed, 19 Jun 2024 10:20:24 +0000 (20:20 +1000)] 
Restart sshd after installing it for testing.

When installing an sshd built without OpenSSL the mismatch between
the running sshd and newly installed sshd-session will cause the
remainder of the test to fail.

13 months agoRemove macos-11 runner.
Darren Tucker [Tue, 18 Jun 2024 09:59:59 +0000 (19:59 +1000)] 
Remove macos-11 runner.

Github is retiring them soon.

13 months agoPAMServiceName may appear in a Match block
Damien Miller [Tue, 18 Jun 2024 23:34:34 +0000 (09:34 +1000)] 
PAMServiceName may appear in a Match block

13 months agoupstream: Re-enable ssh-dss tests
dtucker@openbsd.org [Tue, 18 Jun 2024 08:11:48 +0000 (08:11 +0000)] 
upstream: Re-enable ssh-dss tests

... if ssh is compiled with DSA support

OpenBSD-Regress-ID: bbfaf8c17f2b50a2d46ac35cb97af99b990c990d

13 months agoupstream: Stop using DSA in dropbear interop tests.
anton@openbsd.org [Tue, 18 Jun 2024 06:14:27 +0000 (06:14 +0000)] 
upstream: Stop using DSA in dropbear interop tests.

OpenBSD-Regress-ID: abfd4457d99d8cc1417fd22ca2c570270f74c1cf

13 months agomissed a bit of DSA in the fuzzer
Damien Miller [Tue, 18 Jun 2024 02:29:45 +0000 (12:29 +1000)] 
missed a bit of DSA in the fuzzer

13 months agoDSA support is disabled, so remove from fuzzers
Damien Miller [Mon, 17 Jun 2024 23:35:53 +0000 (09:35 +1000)] 
DSA support is disabled, so remove from fuzzers

14 months agoupstream: disable the DSA signature algorithm by default; ok
djm@openbsd.org [Mon, 17 Jun 2024 08:30:29 +0000 (08:30 +0000)] 
upstream: disable the DSA signature algorithm by default; ok

markus@

(yes, I know this expands to "the Digitial Signature Algorithm
signature algorithm)

OpenBSD-Commit-ID: 961ef594e46dd2dcade8dd5721fa565cee79ffed

14 months agoupstream: promote connection-closed messages from verbose to info
djm@openbsd.org [Mon, 17 Jun 2024 08:28:31 +0000 (08:28 +0000)] 
upstream: promote connection-closed messages from verbose to info

log level; they could be the only record of the connection terminating if the
client doesn't send a SSH2_MSG_DISCONNECT message. ok dtucker@

OpenBSD-Commit-ID: 0c8bfaf5e9fdff945cee09ac21e641f6c5d65d3c

14 months agopropagate PAM crashes to PerSourcePenalties
Damien Miller [Mon, 17 Jun 2024 07:02:18 +0000 (17:02 +1000)] 
propagate PAM crashes to PerSourcePenalties

If the PAM subprocess crashes, exit with a crash status that will be
picked up by the sshd(8) listener process where it can be used by
PerSourcePenalties to block the client. This is similar handling to
the privsep preauth process.

14 months agominix doesn't have loopback, so skip penalty tests
Damien Miller [Mon, 17 Jun 2024 05:06:01 +0000 (15:06 +1000)] 
minix doesn't have loopback, so skip penalty tests

pointed out by dtucker@

14 months agoupstream: same treatment for this test
djm@openbsd.org [Sun, 16 Jun 2024 11:54:49 +0000 (11:54 +0000)] 
upstream: same treatment for this test

OpenBSD-Regress-ID: d0cc9efca7833e673ea7b0cb3a679a3acee8d4c7

14 months agoupstream: penalty test is still a bit racy
djm@openbsd.org [Sun, 16 Jun 2024 08:18:06 +0000 (08:18 +0000)] 
upstream: penalty test is still a bit racy

OpenBSD-Regress-ID: 90c9ac224db454637baf1ebee5857e007321e824

14 months agoupstream: crank up penalty timeouts so this should work on even the
djm@openbsd.org [Sat, 15 Jun 2024 03:59:10 +0000 (03:59 +0000)] 
upstream: crank up penalty timeouts so this should work on even the

slowest of test builders

OpenBSD-Regress-ID: 70bda39c83e3fc9d0f3c1fad4542ed33e173d468

14 months agoupstream: sort -q in the options list;
jmc@openbsd.org [Fri, 14 Jun 2024 05:20:34 +0000 (05:20 +0000)] 
upstream: sort -q in the options list;

OpenBSD-Commit-ID: 6839b38378f38f754de638a5e988c13b4164cc7c

14 months agoupstream: clarify KEXAlgorithms supported vs available. Inspired by
djm@openbsd.org [Fri, 14 Jun 2024 05:01:22 +0000 (05:01 +0000)] 
upstream: clarify KEXAlgorithms supported vs available. Inspired by

bz3701 from Colin Watson.

OpenBSD-Commit-ID: e698e69bea19bd52971d253f2b1094490c4701f7

14 months agoupstream: ssh-keyscan -q man bits
djm@openbsd.org [Fri, 14 Jun 2024 05:00:42 +0000 (05:00 +0000)] 
upstream: ssh-keyscan -q man bits

OpenBSD-Commit-ID: ba28d0e1ac609a4c99c453e57e86560c79079db1

14 months agoskip penalty-expire test in valgrind test env
Damien Miller [Fri, 14 Jun 2024 04:46:35 +0000 (14:46 +1000)] 
skip penalty-expire test in valgrind test env

14 months agoupstream: split the PerSourcePenalties test in two: one tests penalty
djm@openbsd.org [Fri, 14 Jun 2024 04:43:11 +0000 (04:43 +0000)] 
upstream: split the PerSourcePenalties test in two: one tests penalty

enforcement but not penalty expiry, the other tests penalty expiry.

This lets us disable the expiry testing in certain CI test environments.

OpenBSD-Regress-ID: f56811064f3e3cb52ee73a206b8c2a06af1c8791

14 months agoadd a sshd_config PamServiceName option
Damien Miller [Fri, 14 Jun 2024 04:19:23 +0000 (14:19 +1000)] 
add a sshd_config PamServiceName option

Allows selecting which PAM service name to use when UsePAM is
enabled. Defaults to "sshd" unless overridden at compile time
by defining SSHD_PAM_SERVICE.

bz2102, ok dtucker@

14 months agoupstream: don't redirect stderr for ssh-keyscan we expect to succeed
djm@openbsd.org [Fri, 14 Jun 2024 00:26:12 +0000 (00:26 +0000)] 
upstream: don't redirect stderr for ssh-keyscan we expect to succeed

OpenBSD-Regress-ID: 8878b8eb4e070ed2e343166d3eb86db4a08a216c

14 months agoupstream: make host/banner comments go to stderr instead of stdout,
djm@openbsd.org [Fri, 14 Jun 2024 00:25:25 +0000 (00:25 +0000)] 
upstream: make host/banner comments go to stderr instead of stdout,

so they are useful as comments without extra shell redirection and so they
don't clutter actual errors on stderr.

Add a -q flag to shut them up.

ok dtucker@

OpenBSD-Commit-ID: bec813de56a71adb5c1a76adcf49621130d24264

14 months agoupstream: separate keywords with comma
naddy@openbsd.org [Thu, 13 Jun 2024 15:06:33 +0000 (15:06 +0000)] 
upstream: separate keywords with comma

OpenBSD-Commit-ID: d65a99666202a8188c4991c18d14374a229f7be5

14 months agoupstream: specify an algorithm for ssh-keyscan, otherwise it will make
djm@openbsd.org [Fri, 14 Jun 2024 00:23:55 +0000 (00:23 +0000)] 
upstream: specify an algorithm for ssh-keyscan, otherwise it will make

multiple attempts simultaneously and confuse the test

OpenBSD-Regress-ID: 6e910f3315c4345053db1bf5cbf61826b194d0b9

14 months agosshd: don't use argv[0] as PAM service name
Damien Miller [Thu, 13 Jun 2024 06:41:29 +0000 (16:41 +1000)] 
sshd: don't use argv[0] as PAM service name

sshd would implicitly use argv[0] as the PAM service name to
allow people to select different PAM service names by making
differently-named copies/links to the sshd binary.

Splitting sshd into sshd/sshd-session broke this, as the process
that starts PAM is always sshd-session and the user has no control
over this.

Hardcode "sshd" as the default PAM service name unless/until we
figure out a better way. Should unbreak OSX integration tests.

14 months agoprepare for checking in autogenerated files
Damien Miller [Thu, 13 Jun 2024 05:00:28 +0000 (15:00 +1000)] 
prepare for checking in autogenerated files

We plan to check in automatically generated files (config.h.in, etc) on
release branches. These files are normally ignored by .gitignore, but
this shuffles the contents of this file to make it easy to un-ignore
them.

14 months agotypo in comment
Damien Miller [Thu, 13 Jun 2024 04:41:33 +0000 (14:41 +1000)] 
typo in comment

14 months agofix PTY allocation on Cygwin, broken by sshd split
Damien Miller [Thu, 13 Jun 2024 04:35:25 +0000 (14:35 +1000)] 
fix PTY allocation on Cygwin, broken by sshd split

Cygwin doesn't support FD passing and so used to disable post-auth
privilege separation entirely because privsep requires PTY allocation
to happen in the privileged monitor process with the PTY file
descriptors being passed back to the unprivileged process.

This brings back a minimal version of the previous special treatment
for Cygwin (and any other platform that sets DISABLE_FD_PASSING):
privilege separation remains enabled, but PTY allocation happens in
the post-auth user process rather than the monitor.

This either requires PTY allocation to not need privilege to begin
with (this appears to be the case on Cygwin), or the post-auth
privsep process retain privilege (other platforms that set the
DISABLE_FD_PASSING option).

Keeping privileges here is bad, but the non-Cygwin systems that set
DISABLE_FD_PASSING are so deeply legacy that this is likely to be the
least of their problems.

14 months agodelay lookup of privsep user until config loaded
Damien Miller [Thu, 13 Jun 2024 01:33:09 +0000 (11:33 +1000)] 
delay lookup of privsep user until config loaded

sshd-session attempting to use options.kerberos_authentication to
decide whether it needed to lookup the privsep user before the
configuration was loaded. This caused it to get a placeholder value
that caused it always to try to lookup the privsep user, breaking at
least one test environment.

14 months agomissing file for PerSourcePenalties regress test
Damien Miller [Thu, 13 Jun 2024 01:16:57 +0000 (11:16 +1000)] 
missing file for PerSourcePenalties regress test

14 months agoupstream: split PerSourcePenalties address tracking. Previously it
djm@openbsd.org [Wed, 12 Jun 2024 22:36:00 +0000 (22:36 +0000)] 
upstream: split PerSourcePenalties address tracking. Previously it

used one shared table and overflow policy for IPv4 and IPv6 addresses, now it
will use separate tables and optionally different overflow policies.

This prevents misbehaviour from IPv6 addresses (which are vastly easier
to obtain many of) from affecting IPv4 connections and may allow for
stricter overflow policies.

ok deraadt@

OpenBSD-Commit-ID: 12637ed0aa4d5f1f3e702da42ea967cbd8bfdfd9

14 months agoupstream: do not mark up "(default: 20ms)";
jmc@openbsd.org [Tue, 11 Jun 2024 05:24:39 +0000 (05:24 +0000)] 
upstream: do not mark up "(default: 20ms)";

OpenBSD-Commit-ID: 54151ecdecfa1b67dcdda4fd24826ef6e2148ad4

14 months agoupstream: reap preauth net child if it hangs up during privsep message
djm@openbsd.org [Tue, 11 Jun 2024 02:54:51 +0000 (02:54 +0000)] 
upstream: reap preauth net child if it hangs up during privsep message

send, not just message receive

OpenBSD-Commit-ID: 02a093f4ab4f8f83f0cd1ea2bb35b9ca420448f0

14 months agoupstream: fix PIDFILE handling, broken for SUDO=doas in last commit
djm@openbsd.org [Tue, 11 Jun 2024 01:58:27 +0000 (01:58 +0000)] 
upstream: fix PIDFILE handling, broken for SUDO=doas in last commit

here

OpenBSD-Regress-ID: 96fec579af228f87a036e94801eb294af9074625

14 months agoupstream: reap the pre-auth [net] child if it hangs up during privsep
djm@openbsd.org [Tue, 11 Jun 2024 02:00:30 +0000 (02:00 +0000)] 
upstream: reap the pre-auth [net] child if it hangs up during privsep

message sending, not just receiving

OpenBSD-Commit-ID: f7341605bf08c4c15830910446e6775323f2f8cb

14 months agoupstream: a little more RB_TREE paranoia
djm@openbsd.org [Tue, 11 Jun 2024 01:23:25 +0000 (01:23 +0000)] 
upstream: a little more RB_TREE paranoia

OpenBSD-Commit-ID: 8dc2fd21eebd8830c4a4d25461ac4fe228e11156

14 months agoupstream: fix off-by-one comparison for PerSourcePenalty
djm@openbsd.org [Tue, 11 Jun 2024 01:22:25 +0000 (01:22 +0000)] 
upstream: fix off-by-one comparison for PerSourcePenalty

OpenBSD-Commit-ID: af4f5d01c41ef870b23e55655bfbf73474a6c02b

14 months agoupstream: move tree init before possible early return
djm@openbsd.org [Tue, 11 Jun 2024 01:21:41 +0000 (01:21 +0000)] 
upstream: move tree init before possible early return

OpenBSD-Commit-ID: 72e2c5b69f151c08a7c5bf5ad929b97a92c273df

14 months agoupstream: update to mention that PerSourcePenalties default to
djm@openbsd.org [Tue, 11 Jun 2024 01:07:35 +0000 (01:07 +0000)] 
upstream: update to mention that PerSourcePenalties default to

being enabled and document the default values for each parameter.

OpenBSD-Commit-ID: b981288bddfb097aad269f62df4081c688ce0034

14 months agoupstream: reap the [net] child if it hangs up while writing privsep
djm@openbsd.org [Tue, 11 Jun 2024 00:44:52 +0000 (00:44 +0000)] 
upstream: reap the [net] child if it hangs up while writing privsep

message payloads, not just the message header

OpenBSD-Commit-ID: 24dbd400aa381ac96be7ed2dd49018487dfef6ce

14 months agoupstream: log waitpid() status for abnormal exits
djm@openbsd.org [Tue, 11 Jun 2024 00:40:21 +0000 (00:40 +0000)] 
upstream: log waitpid() status for abnormal exits

OpenBSD-Commit-ID: b317930e06b51819c1a2bc6a4359764fecfb1c2d

14 months agoupstream: correct error message
djm@openbsd.org [Tue, 11 Jun 2024 00:36:20 +0000 (00:36 +0000)] 
upstream: correct error message

OpenBSD-Commit-ID: 581f60f73099083392887206860229ab104620ed

14 months agoupstream: avoid shadowing issues which some compilers won't accept
deraadt@openbsd.org [Fri, 7 Jun 2024 13:23:30 +0000 (13:23 +0000)] 
upstream: avoid shadowing issues which some compilers won't accept

ok djm

OpenBSD-Commit-ID: 1e89572397dda83433d58c4fa6333a08f51170d4

14 months agoupstream: escape the final dot at eol in "e.g." to avoid double
jmc@openbsd.org [Thu, 6 Jun 2024 21:14:49 +0000 (21:14 +0000)] 
upstream: escape the final dot at eol in "e.g." to avoid double

spacing;

OpenBSD-Commit-ID: 0a9fb10bc9f7d577afe2da3f498a08bc431115b9

14 months agoupstream: enable PerSourcePenalties by default.
djm@openbsd.org [Thu, 6 Jun 2024 20:25:48 +0000 (20:25 +0000)] 
upstream: enable PerSourcePenalties by default.

ok markus

NB. if you run a sshd that accepts connections from behind large NAT
blocks, proxies or anything else that aggregates many possible users
behind few IP addresses, then this change may cause legitimate traffic
to be denied.

Please read the PerSourcePenalties, PerSourcePenaltyExemptList and
PerSourceNetBlockSize options in sshd_config(5) for how to tune your
sshd(8) for your specific circumstances.

OpenBSD-Commit-ID: 24a0e5c23d37e5a63e16d2c6da3920a51078f6ce

14 months agoupstream: mention that PerSourcePenalties don't affect concurrent
djm@openbsd.org [Thu, 6 Jun 2024 20:20:42 +0000 (20:20 +0000)] 
upstream: mention that PerSourcePenalties don't affect concurrent

in-progress connections.

OpenBSD-Commit-ID: 20389da6264f2c97ac3463edfaa1182c212d420c

14 months agoupstream: regress test for PerSourcePenalties
djm@openbsd.org [Thu, 6 Jun 2024 19:49:25 +0000 (19:49 +0000)] 
upstream: regress test for PerSourcePenalties

OpenBSD-Regress-ID: a1af13d411b25a727742644459d26480b9a1b0f1

14 months agoupstream: make sure logs are saved from sshd run via start_sshd
djm@openbsd.org [Thu, 6 Jun 2024 19:48:40 +0000 (19:48 +0000)] 
upstream: make sure logs are saved from sshd run via start_sshd

OpenBSD-Regress-ID: de4ef0e32e3ab85ff3a6c36eb08d1909c0dd1b4a

14 months agoupstream: simplify
djm@openbsd.org [Thu, 6 Jun 2024 19:47:48 +0000 (19:47 +0000)] 
upstream: simplify

OpenBSD-Regress-ID: 50316e0d1ae0c0a057a45af042253e54ce23d11c

14 months agoupstream: prepare for PerSourcePenalties being enabled by default
djm@openbsd.org [Thu, 6 Jun 2024 18:48:13 +0000 (18:48 +0000)] 
upstream: prepare for PerSourcePenalties being enabled by default

in future

OpenBSD-Regress-ID: 5236c6d1c823997aac5a35e2915da30f1903bec7

14 months agoupstream: disable stderr redirection before closing fds
djm@openbsd.org [Thu, 6 Jun 2024 19:50:01 +0000 (19:50 +0000)] 
upstream: disable stderr redirection before closing fds

OpenBSD-Commit-ID: d42cb895ee4542098050367fc35321c9303f003a

14 months agoupstream: Add a facility to sshd(8) to penalise particular
djm@openbsd.org [Thu, 6 Jun 2024 17:15:25 +0000 (17:15 +0000)] 
upstream: Add a facility to sshd(8) to penalise particular

problematic client behaviours, controlled by two new sshd_config(5) options:
PerSourcePenalties and PerSourcePenaltyExemptList.

When PerSourcePenalties are enabled, sshd(8) will monitor the exit
status of its child pre-auth session processes. Through the exit
status, it can observe situations where the session did not
authenticate as expected. These conditions include when the client
repeatedly attempted authentication unsucessfully (possibly indicating
an attack against one or more accounts, e.g. password guessing), or
when client behaviour caused sshd to crash (possibly indicating
attempts to exploit sshd).

When such a condition is observed, sshd will record a penalty of some
duration (e.g. 30 seconds) against the client's address. If this time
is above a minimum threshold specified by the PerSourcePenalties, then
connections from the client address will be refused (along with any
others in the same PerSourceNetBlockSize CIDR range).

Repeated offenses by the same client address will accrue greater
penalties, up to a configurable maximum. A PerSourcePenaltyExemptList
option allows certain address ranges to be exempt from all penalties.

We hope these options will make it significantly more difficult for
attackers to find accounts with weak/guessable passwords or exploit
bugs in sshd(8) itself.

PerSourcePenalties is off by default, but we expect to enable it
automatically in the near future.

much feedback markus@ and others, ok markus@

OpenBSD-Commit-ID: 89ded70eccb2b4926ef0366a4d58a693de366cca

14 months agowhitespace
Damien Miller [Thu, 6 Jun 2024 17:31:02 +0000 (03:31 +1000)] 
whitespace

14 months agoupstream: enable -fret-clean on amd64, for libc libcrypto ld.so
deraadt@openbsd.org [Tue, 4 Jun 2024 15:14:45 +0000 (15:14 +0000)] 
upstream: enable -fret-clean on amd64, for libc libcrypto ld.so

kernel, and all the ssh tools.  The dynamic objects are entirely ret-clean,
static binaries will contain a blend of cleaning and non-cleaning callers.

OpenBSD-Commit-ID: 112aacedd3b61cc5c34b1fa6d9fb759214179172

14 months agoremove PRIVSEP macros for osx
Damien Miller [Tue, 4 Jun 2024 16:21:30 +0000 (02:21 +1000)] 
remove PRIVSEP macros for osx

14 months agoupstream: be really strict with fds reserved for communication with the
djm@openbsd.org [Sat, 1 Jun 2024 07:03:37 +0000 (07:03 +0000)] 
upstream: be really strict with fds reserved for communication with the

separate sshd-session process - reserve them early and fatal if we can't
dup2(2) them later. The pre-split fallback to re-reading the configuration
files is not possible, so sshd-session absolutely requires the fd the
configuration is passed over to be in order.

ok deraadt@

OpenBSD-Commit-ID: 308a98ef3c8a6665ebf92c7c9a0fc9600ccd7065

14 months agodepend
Damien Miller [Fri, 31 May 2024 09:12:26 +0000 (19:12 +1000)] 
depend

14 months agorename need_privsep to need_chroot
Damien Miller [Fri, 31 May 2024 09:11:14 +0000 (19:11 +1000)] 
rename need_privsep to need_chroot

privsep is mandatory, chroot is optional (disabled when running
sshd as non-root)

14 months agoremove remaining use_privsep mention
Damien Miller [Fri, 31 May 2024 09:05:34 +0000 (19:05 +1000)] 
remove remaining use_privsep mention

14 months agoupstream: warn when -r (deprecated option to disable re-exec) is
djm@openbsd.org [Fri, 31 May 2024 09:01:08 +0000 (09:01 +0000)] 
upstream: warn when -r (deprecated option to disable re-exec) is

passed

OpenBSD-Commit-ID: 73145ef5150edbe3ce7889f0844ed8fa6155f551

14 months agoupstream: typos
djm@openbsd.org [Fri, 31 May 2024 08:49:35 +0000 (08:49 +0000)] 
upstream: typos

OpenBSD-Commit-ID: edfa72eb06bfa65da30fabf7d2fe76d2d33f77bf

14 months agoupstream: don't need sys/queue.h here
djm@openbsd.org [Mon, 27 May 2024 01:52:26 +0000 (01:52 +0000)] 
upstream: don't need sys/queue.h here

OpenBSD-Commit-ID: dd137396828171eb19e4911581812ca58de6c578

14 months agoupstream: remove references to SSH1 and DSA server keys
naddy@openbsd.org [Sun, 26 May 2024 20:35:12 +0000 (20:35 +0000)] 
upstream: remove references to SSH1 and DSA server keys

OpenBSD-Commit-ID: 57cc1c98d4f998981473734f144b904af7d178a2

14 months agoupstream: remove unused struct fwd_perm_list, no decl with complete
jsg@openbsd.org [Thu, 23 May 2024 23:47:16 +0000 (23:47 +0000)] 
upstream: remove unused struct fwd_perm_list, no decl with complete

type ok djm@

OpenBSD-Commit-ID: 416fb3970b7e73c76d2963c4f00cf96f2b2ee2fb

14 months agoupstream: Do not pass -Werror twice when building with clang.
naddy@openbsd.org [Wed, 22 May 2024 15:24:55 +0000 (15:24 +0000)] 
upstream: Do not pass -Werror twice when building with clang.

OpenBSD-Commit-ID: 5f378c38ad8976d507786dc4db9283a879ec8cd0

14 months agoupstream: Do not pass -Werror if building with gcc 3, for asn1.h
miod@openbsd.org [Wed, 22 May 2024 11:49:36 +0000 (11:49 +0000)] 
upstream: Do not pass -Werror if building with gcc 3, for asn1.h

and bio.h cause (admittedly bogus) warnings with gcc 3.

OpenBSD-Commit-ID: fb39324748824cb0387e9d67c41d1bef945c54ea

14 months agoupstream: this test has been broken since 2014, and has been
djm@openbsd.org [Wed, 22 May 2024 04:20:00 +0000 (04:20 +0000)] 
upstream: this test has been broken since 2014, and has been

testing the same key exchange algorithm repeatedly instead of testing all of
them. Spotted by nreilly AT blackberry.com in bz3692

Who broke the test? me.

OpenBSD-Regress-ID: 48f4f5946276f975667141957d25441b3c9a50e2

14 months agoupstream: Add missing kex-names.c source file required since the
anton@openbsd.org [Sun, 19 May 2024 19:10:01 +0000 (19:10 +0000)] 
upstream: Add missing kex-names.c source file required since the

ssh split.

OpenBSD-Regress-ID: ca666223f828fc4b069cb9016bff1eb50faf9fbb

14 months agoupstream: remove duplicate copy of relink kit for sshd-session
naddy@openbsd.org [Fri, 17 May 2024 14:42:00 +0000 (14:42 +0000)] 
upstream: remove duplicate copy of relink kit for sshd-session

OpenBSD-Commit-ID: 6d2ded4cd91d4d727c2b26e099b91ea935bed504