Commit Graph

12538 Commits

Author SHA1 Message Date
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
naddy@openbsd.org beccb7319c
upstream: remove duplicate copy of relink kit for sshd-session
OpenBSD-Commit-ID: 6d2ded4cd91d4d727c2b26e099b91ea935bed504
2024-05-22 14:21:38 +10:00
jsg@openbsd.org dcd79fa141
upstream: remove prototypes with no matching function; ok djm@
OpenBSD-Commit-ID: 6d9065dadea5f14a01bece0dbfe2fba1be31c693
2024-05-22 14:21:13 +10:00
jsg@openbsd.org 6454a05e7c
upstream: remove externs for removed vars; ok djm@
OpenBSD-Commit-ID: f51ea791d45c15d4927eb4ae7d877ccc1e5a2aab
2024-05-22 14:20:46 +10:00
deraadt@openbsd.org f3e4db4601
upstream: -Werror was turned on (probably just for development),
and this is a simple way to satisfy older gcc.

OpenBSD-Commit-ID: 7f698df54384b437ce33ab7405f0b86c87019e86
2024-05-22 14:20:46 +10:00
Damien Miller 24a1f3e5ad
attempt at updating RPM specs for sshd-session 2024-05-17 14:50:43 +10:00
djm@openbsd.org 17b566eeb7
upstream: g/c unused variable
OpenBSD-Commit-ID: aa6ef0778a1f1bde0d73efba72a777c48d2bd010
2024-05-17 14:42:49 +10:00
jsg@openbsd.org 01fb82eb2a
upstream: spelling; ok djm@
OpenBSD-Commit-ID: bdea29bb3ed2a5a7782999c4c663b219d2270483
2024-05-17 14:42:49 +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
djm@openbsd.org 92e5589031
upstream: fix incorrect debug option name introduce in previous
commit

OpenBSD-Commit-ID: 66d69e22b1c072c694a7267c847f212284614ed3
2024-05-17 14:41:38 +10:00
deraadt@openbsd.org 4ad72878af
upstream: construct and install a relink-kit for sshd-session ok
djm

OpenBSD-Commit-ID: 8b3820adb4da4e139c4b3cffbcc0bde9f08bf0c6
2024-05-17 14:41:37 +10:00
Damien Miller 02e679a2cb
Makefile support for sshd-session 2024-05-17 14:41:37 +10:00
djm@openbsd.org c0416035c5
upstream: missing files from previous
OpenBSD-Commit-ID: 4b7be4434d8799f02365552b641a7a70a7ebeb2f
2024-05-17 14:41:35 +10:00
djm@openbsd.org 03e3de416e
upstream: Start the process of splitting sshd into separate
binaries. This step splits sshd into a listener and a session binary. More
splits are planned.

After this changes, the listener binary will validate the configuration,
load the hostkeys, listen on port 22 and manage MaxStartups only. All
session handling will be performed by a new sshd-session binary that the
listener fork+execs.

This reduces the listener process to the minimum necessary and sets us
up for future work on the sshd-session binary.

feedback/ok markus@ deraadt@

NB. if you're updating via source, please restart sshd after installing,
otherwise you run the risk of locking yourself out.

OpenBSD-Commit-ID: 43c04a1ab96cdbdeb53d2df0125a6d42c5f19934
2024-05-17 14:41:35 +10:00
djm@openbsd.org 1c0d813579
upstream: simplify exit message handling, which was more complicated
than it needed to be because of unexpunged ssh1 remnants. ok markus@

OpenBSD-Commit-ID: 8b0cd2c0dee75fb053718f442aa89510b684610b
2024-05-10 18:41:01 +10:00
tobias@openbsd.org cbbbf76aa6
upstream: remove SSH1 leftovers
Authored with Space Meyer <git at the-space dot agency>

ok djm

OpenBSD-Commit-ID: 81db602e4cb407baae472689db1c222ed7b2afa3
2024-05-08 14:57:48 +10:00
tobias@openbsd.org bc5dcb8ab9
upstream: never close stdin
The sanitise_stdfd call makes sure that standard file descriptors are
open (if they were closed, they are connected with /dev/null).

Do not close stdin in any case to prevent error messages when stdin is
read multiple times and to prevent later usage of fd 0 for connections,
e.g.

echo localhost | ssh-keyscan -f - -f -

While at it, make stdin-related error messages nicer.

Authored with Max Kunzelmann <maxdev at posteo dot de>

ok djm

OpenBSD-Commit-ID: 48e9b7938e2fa2f9bd47e6de6df66a31e0b375d3
2024-05-08 14:57:47 +10:00
Damien Miller 6a42b70e56
sync getrrsetbyname.c with recent upstream changes 2024-05-08 09:43:59 +10:00
djm@openbsd.org 385ecb31e1
upstream: fix home-directory extension implementation, it always
returned the current user's home directory contrary to the spec.

Patch from Jakub Jelen via GHPR477

OpenBSD-Commit-ID: 5afd775eab7f9cbe222d7fbae4c793de6c3b3d28
2024-04-30 16:24:22 +10:00
djm@openbsd.org 14e2b16bc6
upstream: flush stdout after writing "sftp>" prompt when not using
editline.

From Alpine Linux via GHPR480

OpenBSD-Commit-ID: 80bdc7ffe0358dc090eb9b93e6dedb2b087b24cd
2024-04-30 16:17:20 +10:00
djm@openbsd.org 2e69a72405
upstream: stricter validation of messaging socket fd number; disallow
usage of stderr. Based on GHPR492 by RealHurrison

OpenBSD-Commit-ID: 73dbbe82ea16f73ce1d044d3232bc869ae2f2ce8
2024-04-30 15:53:26 +10:00
djm@openbsd.org da757b022b
upstream: add missing reserved fields to key constraint protocol
documentation.

from Wiktor Kwapisiewicz via GHPR487

OpenBSD-Commit-ID: 0dfb69998cfdb3fa00cbb0e7809e7d2f6126e3df
2024-04-30 15:46:39 +10:00
Damien Miller 16d0b82fa0
depend 2024-04-30 12:39:34 +10:00
djm@openbsd.org 66aaa678db
upstream: correctly restore sigprocmask around ppoll() reported
by Tõivo Leedjärv; ok deraadt@

OpenBSD-Commit-ID: c0c0f89de5294a166578f071eade2501929c4686
2024-04-30 12:23:10 +10:00
djm@openbsd.org 80fb0eb215
upstream: add explict check for server hostkey type against
HostkeyAlgorithms. Allows HostkeyAlgorithms to disable implicit fallback from
certificate keys to plain keys. ok markus@

OpenBSD-Commit-ID: 364087e4a395ff9b2f42bf3aefdb2090bb23643a
2024-04-30 12:22:35 +10:00
jsg@openbsd.org 5b28096d31
upstream: correct indentation; no functional change ok tb@
OpenBSD-Commit-ID: dd9702fd43de546bc6a3f4f025c74d6f3692a0d4
2024-04-30 12:22:10 +10:00
semarie@openbsd.org fd3cb8a827
upstream: set right mode on ssh-agent at boot-time
which sthen@
ok deraadt@

OpenBSD-Commit-ID: 662b5056a2c6171563e1626f9c69f27862b5e7af
2024-04-30 12:17:35 +10:00
deraadt@openbsd.org 54343a260e
upstream: Oops, incorrect hex conversion spotted by claudio.
While here try to improve how it reads a bit better.  Surprising the
regression tests didn't spot this error, maybe it fails to roundtrip the
values.

OpenBSD-Commit-ID: 866cfcc1955aef8f3fc32da0b70c353a1b859f2e
2024-04-30 12:16:54 +10:00
deraadt@openbsd.org ec78c31409
upstream: for parse_ipqos(), use strtonum() instead of mostly
idiomatic strtoul(), but wow it's so gross. ok djm

OpenBSD-Commit-ID: cec14a76af2eb7b225300c80fc0e21052be67b05
2024-04-30 12:16:53 +10:00
deraadt@openbsd.org 8176e1a6c2
upstream: can shortcut by returning strtonum() value directly; ok
djm

OpenBSD-Commit-ID: 7bb2dd3d6d1f288dac14247d1de446e3d7ba8b8e
2024-04-30 12:16:52 +10:00
deraadt@openbsd.org 9f543d7022
upstream: rewrite convtime() to use a isdigit-scanner and
strtonum() instead of strange strtoul can might be fooled by garage
characters. passes regress/usr.bin/ssh/unittests/misc ok djm

OpenBSD-Commit-ID: 4b1ef826bb16047aea3f3bdcb385b72ffd450abc
2024-04-30 12:16:52 +10:00
claudio@openbsd.org 8673137f78
upstream: Remove unused ptr[3] char array in pkcs11_decode_hex.
OK deraadt@

OpenBSD-Commit-ID: 3d14433e39fd558f662d3b0431c4c555ef920481
2024-04-30 12:16:51 +10:00
deraadt@openbsd.org c7fec708f3
upstream: Replace non-idiomatic strtoul(, 16) to parse a region
of 2-character hex sequences with a low-level replacement designed just for
the task. ok djm

OpenBSD-Commit-ID: 67bab8b8a4329a19a0add5085eacd6f4cc215e85
2024-04-30 12:16:51 +10:00
deraadt@openbsd.org 019a5f483b
upstream: Use strtonum() instead of severely non-idomatic
strtoul() In particular this will now reject trailing garbage, ie.
'12garbage'. ok djm

OpenBSD-Commit-ID: c82d95e3ccbfedfc91a8041c2f8bf0cf987d1501
2024-04-30 12:16:50 +10:00
deraadt@openbsd.org 8231ca046f
upstream: also create a relink kit for ssh-agent, since it is a
long-running setgid program carrying keys with some (not very powerful)
communication channels. solution for testing the binary from dtucker.
agreement from djm. Will add it into /etc/rc in a few days.

OpenBSD-Commit-ID: 2fe8d707ae35ba23c7916adcb818bb5b66837ba0
2024-04-30 12:16:50 +10:00
deraadt@openbsd.org bf7bf50bd6
upstream: new-style relink kit for sshd. The old scheme created
a Makefile by concatenating two Makefiles and was incredibly fragile.  In the
new way a narrow-purposed install.sh script is created and shipped with the
objects. A recently commited /etc/rc script understands these files.

OpenBSD-Commit-ID: ef9341d5a50f0d33e3a6fbe995e92964bc7ef2d3
2024-04-30 12:16:19 +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
Darren Tucker 2eded551ba
Merge flags for OpenSSL 3.x versions.
OpenSSL has moved to 3.4 which we don't currently accept.  Based on
the OpenSSL versioning policy[0] it looks like all of the 3.x versions
should work with OpenSSH, so remove the distinction in configure and
accept all of them.

[0] https://openssl.org/policies/general/versioning-policy.html
2024-04-25 13:20:19 +10:00
Darren Tucker 8673245918
Remove 9.6 branch from status page. 2024-04-25 13:19:03 +10:00
Darren Tucker 70d4304974
Update LibreSSL and OpenSSL versions tested.
Update LibreSSL versions to current releases (3.8.4 & 3.9.1).
Add newly-released OpenSSL 3.3.0, and add tests against the 3.1 and
3.3 branches.
2024-04-25 13:16:58 +10:00
90 88351eca17
Fix missing header for systemd notification 2024-04-06 08:16:25 +11:00
Damien Miller 08f579231c
notify systemd on listen and reload
Standalone implementation that does not depend on libsystemd.
With assistance from Luca Boccassi, and feedback/testing from Colin
Watson. bz2641
2024-04-03 14:40:32 +11:00
Darren Tucker 43e7c1c07c
Port changes from selfhosted to upstream tests.
Should get them working again.
2024-03-31 22:26:45 +11:00
Darren Tucker 281ea25a44
Check if OpenSSL implementation supports DSA.
If --enable/disable-dsa-keys is not specified, set based on what OpenSSL
supports.  If specified as enabled, but not supported by OpenSSL error
out.  ok djm@
2024-03-30 18:22:09 +11:00
djm@openbsd.org 2d2c068de8
upstream: in OpenSSH private key format, correct type for subsequent
private keys in blob. From Jakub Jelen via GHPR430

OpenBSD-Commit-ID: d17dbf47554de2d752061592f95b5d772baab50b
2024-03-30 16:57:32 +11:00
Eero Häkkinen c2c0bdd3e9
Expose SSH_AUTH_INFO_0 always to PAM auth modules.
This changes SSH_AUTH_INFO_0 to be exposed to PAM auth modules also
when a password authentication method is in use and not only
when a keyboard-interactive authentication method is in use.
2024-03-30 16:48:04 +11:00
Darren Tucker 02c5ad2312
Rearrange selfhosted VM scheduling.
Instead of trying to infer the type of the self hosted tests in each of
the driver scripts (inconsistently...), set one of the following
variables to "true" in the workflow:

VM: tests run in a virtual machine.
EPHEMERAL: tests run on an ephemeral virtual machine.
PERSISTENT: tests run on a persistent virtual machine
REMOTE: tests run on a physical remote host.

EPHEMERAL VMs can have multiple instances of any given VM can exist
simultaneously and are run by a runner pool.  The other types have a
dedicated runner instance and can only run a single test at a time.

Other settings:
SSHFS: We need to sshfs mount over the repo so the workflow can collect
	build artifacts.  This also implies the tests must be run over ssh.
DEBUG_ACTIONS: enable "set -x" in scripts for debugging.
2024-03-30 16:40:07 +11:00
Damien Miller cd8a72707c
add new token-based signing key for dtucker@
Verified in person and via signature with old key.
Will remove old key in a bit.
2024-03-30 16:05:59 +11:00
Alkaid 8d0e46c1dd
Fix OpenSSL ED25519 support detection
Wrong function signature in configure.ac prevents openssh from enabling
the recently new support for ED25519 priv keys in PEM PKCS8 format.
2024-03-30 15:36:18 +11:00