Commit Graph

1241 Commits

Author SHA1 Message Date
djm@openbsd.org
de644b1831
upstream: test SIGUSR1 dropping all keys from ssh-agent
OpenBSD-Regress-ID: 8654b9aa8eb695b1499fffc408c25319592bf0e0
2024-10-24 14:29:59 +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
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
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
Damien Miller
0c1165fc78
avoid gcc warning in fuzz test 2024-09-15 13:30:13 +10:00
Damien Miller
7c07bec144
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.
2024-09-09 16:06:21 +10:00
djm@openbsd.org
d469d5f348
upstream: test mlkem768x25519-sha256
OpenBSD-Regress-ID: 7baf6bc39ae55648db1a2bfdc55a624954847611
2024-09-09 15:29:09 +10:00
Damien Miller
e66c0c5673
add basic fuzzers for our import of sntrup761 2024-09-04 15:36:22 +10:00
djm@openbsd.org
d19dea6330
upstream: regression test for Include variable expansion
OpenBSD-Regress-ID: 35477da3ba1abd9ca64bc49080c50a9c1350c6ca
2024-09-03 16:03:11 +10:00
djm@openbsd.org
16eaf9d401
upstream: fix test: -F is the argument to specify a non-default
ssh_config, not -f (this is sadly not a new bug)

OpenBSD-Regress-ID: 45a7bda4cf33f2cea218507d8b6a55cddbcfb322
2024-08-28 22:09:31 +10:00
dtucker@openbsd.org
7e75e3f57c
upstream: Use aes128-ctr for MAC tests since default has implicit MAC.
Also verify that the Cipher or MAC we intended to use is actually the one
selected during the test.

OpenBSD-Regress-ID: ff43fed30552afe23d1364526fe8cf88cbfafe1d
2024-08-22 20:32:21 +10:00
dtucker@openbsd.org
15ace435ea
upstream: Some awks won't match on the \r so delete it instead. Fixes
regress in portable on, eg Solaris.

OpenBSD-Regress-ID: 44a96d6d2f8341d89b7d5fff777502b92ac9e9ba
2024-08-21 21:01:50 +10:00
dtucker@openbsd.org
25c52f37a8
upstream: Use curve25519-sha256 kex where possible.
Except where we're explicitly testing a different kex, use
curve25519-sha256 since it's faster than the default and supported even
when configured without OpenSSL.  Add a check to ensure that the kex we
intended to test is the one we actually tested. Speeds test up by ~5%.

OpenBSD-Regress-ID: 3b27fcc2ae953cb08fd82a0d3155c498b226d6e0
2024-08-21 17:08:06 +10:00
dtucker@openbsd.org
3eb62b7ba4
upstream: Send only as much data as needed to trigger rekeying. Speeds
up tests by about 10% in the common case, hopefully more when instrumented
with something like valgrind.

OpenBSD-Regress-ID: 7bf9292b4803357efcf0baf7cfbdc8521f212da1
2024-08-21 09:24:44 +10:00
dtucker@openbsd.org
4442bbc2fc
upstream: Merge AEAD test into main test loop.
Removes 3 duplicate tests and speeds overall test up by about 1%.

OpenBSD-Regress-ID: 5e5c9ff3f7588091ed369e34ac28520490ad2619
2024-08-20 22:39:40 +10:00
dtucker@openbsd.org
829976a63f
upstream: Set a default RekeyLimit of 256k.
Used unless overridden by a command-line flag, which simplifies some of
the ssh command lines.

OpenBSD-Regress-ID: e7cffa57027088e10336e412b34113969f88cb87
2024-08-20 22:39:28 +10:00
dtucker@openbsd.org
57d02c9ea3
upstream: Add Compression=no to default ssh_config.
All of the rekey tests use it (otherwise the encrypted byte counts would
not match) so this lets us simplify the command lines.

OpenBSD-Regress-ID: dab7ce10f4cf6c68827eb8658141272aab3ea262
2024-08-20 22:39:14 +10:00
dtucker@openbsd.org
7254eb26f7
upstream: Remove duplicate curve25519-sha256 kex.
curve25519-sha256@libssh.org is the pre-standardization name for the same
thing, so remove it as a duplicate.  Speeds up test by a tiny amount.

OpenBSD-Regress-ID: 5a5ee5fa1595a6e140b1cc16040bedf5996a5715
2024-08-20 22:39:07 +10:00
dtucker@openbsd.org
749896b874
upstream: Unnest rekey param parsing test and use ssh not sshd.
ssh uses the same parsing code, now has "-G" to dump its config and is
slightly faster to start up.  This speeds up the test slightly (~5%) in the
common case but should help more during instrumented tests, eg under
valgrind, where startup costs are magnified.

OpenBSD-Regress-ID: 07c3acaf4c728e641033071f4441afc88141b0d0
2024-08-20 22:38:57 +10:00
djm@openbsd.org
339c4fc60a
upstream: adapt to EVP_PKEY conversion
OpenBSD-Regress-ID: 0e2d4efb0ed0e392e23cd8fda183fe56531ac446
2024-08-15 12:11:26 +10:00
djm@openbsd.org
63a94f99b9
upstream: test transfers in mux proxy mode too
OpenBSD-Regress-ID: 2edfc980628cfef3550649cab8d69fa23b5cd6c4
2024-08-15 12:08:34 +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
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
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
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
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
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
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
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
f1c42858b9
missing file for PerSourcePenalties regress test 2024-06-13 11:16:57 +10:00
djm@openbsd.org
b0a711c00b
upstream: fix PIDFILE handling, broken for SUDO=doas in last commit
here

OpenBSD-Regress-ID: 96fec579af228f87a036e94801eb294af9074625
2024-06-11 12:02:37 +10:00
djm@openbsd.org
9774b93857
upstream: regress test for PerSourcePenalties
OpenBSD-Regress-ID: a1af13d411b25a727742644459d26480b9a1b0f1
2024-06-07 05:54:32 +10:00
djm@openbsd.org
b8ebd86cef
upstream: make sure logs are saved from sshd run via start_sshd
OpenBSD-Regress-ID: de4ef0e32e3ab85ff3a6c36eb08d1909c0dd1b4a
2024-06-07 05:54:15 +10:00
djm@openbsd.org
d7b2070bda
upstream: simplify
OpenBSD-Regress-ID: 50316e0d1ae0c0a057a45af042253e54ce23d11c
2024-06-07 05:54:14 +10:00
djm@openbsd.org
e6ea3d2245
upstream: prepare for PerSourcePenalties being enabled by default
in future

OpenBSD-Regress-ID: 5236c6d1c823997aac5a35e2915da30f1903bec7
2024-06-07 05:52:59 +10:00
djm@openbsd.org
fc5dc09283
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
2024-05-22 14:21:50 +10:00
anton@openbsd.org
fd4816791b
upstream: Add missing kex-names.c source file required since the
ssh split.

OpenBSD-Regress-ID: ca666223f828fc4b069cb9016bff1eb50faf9fbb
2024-05-22 14:21:50 +10:00
djm@openbsd.org
b88b690e99
upstream: allow overriding the sshd-session binary path
OpenBSD-Regress-ID: 5058cd1c4b6ca1a15474e33546142931d9f964da
2024-05-17 14:41:39 +10:00
anton@openbsd.org
a68f80f251
upstream: Since ssh-agent(1) is only readable by root by now, use
ssh(1) while generating data in tests.

OpenBSD-Regress-ID: 24eb40de2e6b0ace185caaba35e2d470331ffe68
2024-05-17 14:41:39 +10:00
renmingshuai
00e6368892
Shell syntax fix (leftover from a sync).
Signed-off-by: renmingshuai <renmingshuai@huawei.com>
2024-04-25 13:33:39 +10:00
dtucker@openbsd.org
7844705b03
upstream: Use egrep instead of grep -E.
Some plaforms don't have the latter so this makes things easier
in -portable.

OpenBSD-Regress-ID: ff82260eb0db1f11130200b25d820cf73753bbe3
2024-03-29 22:01:20 +11:00