Commit Graph

13386 Commits

Author SHA1 Message Date
djm@openbsd.org 146c420d29
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
2024-07-01 14:32:45 +10:00
djm@openbsd.org 637e4dfea4
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
2024-07-01 14:32:39 +10:00
djm@openbsd.org c8cfe258ce
upstream: delete obsolete comment
OpenBSD-Commit-ID: 5fb04f298ed155053f3fbfdf0c6fe7cdf84bbfa2
2024-06-28 09:07:27 +10:00
djm@openbsd.org 94b9d37100
upstream: retire unused API
OpenBSD-Commit-ID: 3e30d7b0615e2707f6bbe70f61b1c2f72f78161b
2024-06-28 08:37:11 +10:00
jmc@openbsd.org 268c3a7f57
upstream: ssl(8) no longer contains a HISTORY section;
OpenBSD-Commit-ID: 83b7ff34433d79595e9c2a5d2a561a6660251245
2024-06-28 08:36:16 +10:00
djm@openbsd.org 12b6cc09ce
upstream: move child process waitpid() loop out of SIGCHLD handler;
ok deraadt

OpenBSD-Commit-ID: 65815a39564e431414aed7c5ace8076f4e9ca741
2024-06-28 08:36:15 +10:00
deraadt@openbsd.org d6bcd13297
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
2024-06-28 08:34:49 +10:00
deraadt@openbsd.org b8793e2b08
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
2024-06-28 08:34:49 +10:00
jmc@openbsd.org f23e9332c4
upstream: - uppercase start of sentence - correct sentence grammar
ok djm

OpenBSD-Commit-ID: 1ec4b0fdb633a43667f2c8fff1d600bd647dde25
2024-06-28 08:34:48 +10:00
djm@openbsd.org 1839e3eb71
upstream: mention SshdSessionPath option
OpenBSD-Commit-ID: c29734d36c21003973b15c1c9965c35f36cef30c
2024-06-28 08:34:48 +10:00
Darren Tucker 603193e32a
Rerun upstream tests on .sh file changes too. 2024-06-20 18:45:14 +10:00
dtucker@openbsd.org dbbf9337c1
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
2024-06-20 18:34:50 +10:00
dtucker@openbsd.org 8de2c8cebc
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
2024-06-20 18:34:35 +10:00
djm@openbsd.org e9b6471c59
upstream: stricter check for overfull tables in penalty record path
OpenBSD-Commit-ID: 7df01e648a0723418c554e64a9f2b6d38db060a6
2024-06-20 10:19:10 +10:00
djm@openbsd.org d9336d344e
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
2024-06-20 10:19:10 +10:00
naddy@openbsd.org 579d9adb70
upstream: remove one more mention of DSA
OpenBSD-Commit-ID: 8515f55a15f02836ba657df341415f63c60526ca
2024-06-20 10:19:09 +10:00
Darren Tucker 7089b5f843
Move -f to the place needed to restart sshd. 2024-06-19 23:09:05 +10:00
Darren Tucker d5f83cfd85
Need to supply "-f" to restart sshd. 2024-06-19 21:04:01 +10:00
dtucker@openbsd.org fad34b4ca2
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
2024-06-19 20:36:57 +10:00
dtucker@openbsd.org 5521060e35
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
2024-06-19 20:36:57 +10:00
dtucker@openbsd.org dbd3b833f6
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
2024-06-19 20:36:56 +10:00
Darren Tucker d6218504e1
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.
2024-06-19 20:36:54 +10:00
Darren Tucker 786a4465b6
Remove macos-11 runner.
Github is retiring them soon.
2024-06-19 20:36:53 +10:00
Damien Miller df1c72a55e
PAMServiceName may appear in a Match block 2024-06-19 09:35:23 +10:00
dtucker@openbsd.org de1c2e70e5
upstream: Re-enable ssh-dss tests
... if ssh is compiled with DSA support

OpenBSD-Regress-ID: bbfaf8c17f2b50a2d46ac35cb97af99b990c990d
2024-06-18 19:57:41 +10:00
anton@openbsd.org dabc2c7cf3
upstream: Stop using DSA in dropbear interop tests.
OpenBSD-Regress-ID: abfd4457d99d8cc1417fd22ca2c570270f74c1cf
2024-06-18 19:57:36 +10:00
Damien Miller 7614380127
missed a bit of DSA in the fuzzer 2024-06-18 12:29:45 +10:00
Damien Miller 3f9cc47da5
DSA support is disabled, so remove from fuzzers 2024-06-18 09:35:53 +10:00
Tess Gauthier 547baf4e29
Merge branch 'latestw_all' into sync-with-upstream-2 2024-06-17 15:00:49 -04:00
djm@openbsd.org 00eb95957d
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
2024-06-17 18:48:29 +10:00
djm@openbsd.org 5603befe11
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
2024-06-17 18:31:39 +10:00
Damien Miller b00331402f
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.
2024-06-17 17:02:18 +10:00
Damien Miller 1c207f456a
minix doesn't have loopback, so skip penalty tests
pointed out by dtucker@
2024-06-17 15:06:58 +10:00
djm@openbsd.org 48443d202e
upstream: same treatment for this test
OpenBSD-Regress-ID: d0cc9efca7833e673ea7b0cb3a679a3acee8d4c7
2024-06-16 21:55:26 +10:00
djm@openbsd.org 45562a95ea
upstream: penalty test is still a bit racy
OpenBSD-Regress-ID: 90c9ac224db454637baf1ebee5857e007321e824
2024-06-16 18:18:43 +10:00
djm@openbsd.org 8d0f7eb147
upstream: crank up penalty timeouts so this should work on even the
slowest of test builders

OpenBSD-Regress-ID: 70bda39c83e3fc9d0f3c1fad4542ed33e173d468
2024-06-15 14:03:03 +10:00
jmc@openbsd.org 93c75471a1
upstream: sort -q in the options list;
OpenBSD-Commit-ID: 6839b38378f38f754de638a5e988c13b4164cc7c
2024-06-15 14:02:54 +10:00
djm@openbsd.org dd7807bbe8
upstream: clarify KEXAlgorithms supported vs available. Inspired by
bz3701 from Colin Watson.

OpenBSD-Commit-ID: e698e69bea19bd52971d253f2b1094490c4701f7
2024-06-14 15:02:51 +10:00
djm@openbsd.org d172ad56df
upstream: ssh-keyscan -q man bits
OpenBSD-Commit-ID: ba28d0e1ac609a4c99c453e57e86560c79079db1
2024-06-14 15:01:55 +10:00
Damien Miller 092e4ff9cc
skip penalty-expire test in valgrind test env 2024-06-14 14:46:55 +10:00
djm@openbsd.org 2866ad08a9
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
2024-06-14 14:46:21 +10:00
Damien Miller b2c64bc170
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@
2024-06-14 14:20:54 +10:00
djm@openbsd.org 9f032a4dd1
upstream: don't redirect stderr for ssh-keyscan we expect to succeed
OpenBSD-Regress-ID: 8878b8eb4e070ed2e343166d3eb86db4a08a216c
2024-06-14 10:27:39 +10:00
djm@openbsd.org 1e84d0cf40
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
2024-06-14 10:27:34 +10:00
naddy@openbsd.org 3e806d0118
upstream: separate keywords with comma
OpenBSD-Commit-ID: d65a99666202a8188c4991c18d14374a229f7be5
2024-06-14 10:27:33 +10:00
djm@openbsd.org abfd1f7a3c
upstream: specify an algorithm for ssh-keyscan, otherwise it will make
multiple attempts simultaneously and confuse the test

OpenBSD-Regress-ID: 6e910f3315c4345053db1bf5cbf61826b194d0b9
2024-06-14 10:25:51 +10:00
Damien Miller a8fbe2f7d0
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.
2024-06-13 16:41:29 +10:00
Damien Miller bf204bd05c
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.
2024-06-13 15:02:26 +10:00
Damien Miller 425f79a837
typo in comment 2024-06-13 14:41:33 +10:00
Damien Miller afe10313c1
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.
2024-06-13 14:35:25 +10:00