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

Spotted by Colin Watson

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

OpenSSH 9.2 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.

2 years agocrank versions in RPM specs V_9_2_P1
Damien Miller [Thu, 2 Feb 2023 12:21:54 +0000 (23:21 +1100)] 
crank versions in RPM specs

2 years agoupdate version in README
Damien Miller [Thu, 2 Feb 2023 12:21:45 +0000 (23:21 +1100)] 
update version in README

2 years agoadapt compat_kex_proposal() test to portable
Damien Miller [Thu, 2 Feb 2023 12:17:49 +0000 (23:17 +1100)] 
adapt compat_kex_proposal() test to portable

2 years agoupstream: test compat_kex_proposal(); by dtucker@
djm@openbsd.org [Thu, 2 Feb 2023 12:12:52 +0000 (12:12 +0000)] 
upstream: test compat_kex_proposal(); by dtucker@

OpenBSD-Regress-ID: 0e404ee264db546f9fdbf53390689ab5f8d38bf2

2 years agoupstream: Check if we can copy sshd or need to use sudo to do so
dtucker@openbsd.org [Thu, 19 Jan 2023 07:53:45 +0000 (07:53 +0000)] 
upstream: Check if we can copy sshd or need to use sudo to do so

during reexec test. Skip test if neither can work.  Patch from anton@, tweaks
from me.

OpenBSD-Regress-ID: 731b96ae74d02d5744e1f1a8e51d09877ffd9b6d

2 years agoupstream: openssh-9.2
djm@openbsd.org [Thu, 2 Feb 2023 12:10:22 +0000 (12:10 +0000)] 
upstream: openssh-9.2

OpenBSD-Commit-ID: f7389f32413c74d6e2055f05cf65e7082de03923

2 years agoupstream: fix double-free caused by compat_kex_proposal(); bz3522
djm@openbsd.org [Thu, 2 Feb 2023 12:10:05 +0000 (12:10 +0000)] 
upstream: fix double-free caused by compat_kex_proposal(); bz3522

by dtucker@, ok me

OpenBSD-Commit-ID: 2bfc37cd2d41f67dad64c17a64cf2cd3806a5c80

2 years agoSkip connection-timeout test on minix3.
Darren Tucker [Wed, 1 Feb 2023 06:17:26 +0000 (17:17 +1100)] 
Skip connection-timeout test on minix3.

Minix 3's Unix domain sockets don't seem to work the way we expect, so
skip connection-timeout test on that platform.  While there, group
together all similarly skipped tests and explicitly comment.

2 years agofix libfido2 detection without pkg-config
Damien Miller [Wed, 1 Feb 2023 01:12:05 +0000 (12:12 +1100)] 
fix libfido2 detection without pkg-config

Place libfido2 before additional libraries (that it may depend upon)
and not after. bz3530 from James Zhang; ok dtucker@

2 years agoupstream: delete useless dependency
deraadt@openbsd.org [Wed, 18 Jan 2023 20:56:36 +0000 (20:56 +0000)] 
upstream: delete useless dependency

OpenBSD-Commit-ID: e1dc11143f83082e3154d6094f9136d0dc2637ad

2 years agoupstream: Create and install sshd random relink kit.
deraadt@openbsd.org [Wed, 18 Jan 2023 20:43:15 +0000 (20:43 +0000)] 
upstream: Create and install sshd random relink kit.

../Makefile.inc and Makfile are concatenated for reuse, which hopefully won't
be too fragile, we'll see if we need a different approach. The resulting sshd
binary is tested with the new sshd -V option before installation.  As the
binary layout is now semi-unknown (meaning relative, fixed, and gadget
offsets are not precisely known), change the filesystem permissions to 511 to
prevent what I call "logged in BROP". I have ideas for improving this further
but this is a first step ok djm

OpenBSD-Commit-ID: 1e0a2692b7e20b126dda60bf04999d1d30d959d8

2 years agoupstream: tweak previous; ok djm
jmc@openbsd.org [Wed, 18 Jan 2023 06:55:32 +0000 (06:55 +0000)] 
upstream: tweak previous; ok djm

OpenBSD-Commit-ID: df71ce4180c58202dfdc1d92626cfe900b91b7c3

2 years agoSkip connection-timeout test under Valgrind.
Darren Tucker [Tue, 31 Jan 2023 08:35:44 +0000 (19:35 +1100)] 
Skip connection-timeout test under Valgrind.

Valgrind slows things down so much that the timeout test fails.  Skip
this test until we figure out if we can make it work.

2 years agoSkip connection-timeout when missing FD passing.
Darren Tucker [Wed, 25 Jan 2023 10:58:40 +0000 (21:58 +1100)] 
Skip connection-timeout when missing FD passing.

This tests uses multiplexing which uses file descriptor passing, so
skip it if we don't have that.  Fixes test failures on Cygwin.

2 years agoupstream: when restoring non-blocking mode to stdio fds, restore
djm@openbsd.org [Wed, 18 Jan 2023 02:00:10 +0000 (02:00 +0000)] 
upstream: when restoring non-blocking mode to stdio fds, restore

exactly the flags that ssh started with and don't just clobber them with
zero, as this could also remove the append flag from the set;

bz3523; ok dtucker@

OpenBSD-Commit-ID: 1336b03e881db7564a4b66014eb24c5230e9a0c0

2 years agoupstream: Add a -V (version) option to sshd like the ssh client
millert@openbsd.org [Wed, 18 Jan 2023 01:50:21 +0000 (01:50 +0000)] 
upstream: Add a -V (version) option to sshd like the ssh client

has. OK markus@ deraadt@

OpenBSD-Commit-ID: abe990ec3e636fb040132aab8cbbede98f0c413e

2 years agoupstream: For "ssh -V" always exit 0, there is no need to check opt
millert@openbsd.org [Tue, 17 Jan 2023 18:52:44 +0000 (18:52 +0000)] 
upstream: For "ssh -V" always exit 0, there is no need to check opt

again. This was missed when the fallthrough in the switch case above it was
removed.  OK deraadt@

OpenBSD-Commit-ID: 5583e5d8f6d62a8a4215cfa95a69932f344c8120

2 years agoupstream: also check that an active session inhibits
djm@openbsd.org [Tue, 17 Jan 2023 10:15:10 +0000 (10:15 +0000)] 
upstream: also check that an active session inhibits

UnusedConnectionTimeout idea markus@

OpenBSD-Regress-ID: 55c0fb61f3bf9e092b0a53f9041d3d2012f14003

2 years agoupstream: regression test for UnusedConnectionTimeout
djm@openbsd.org [Tue, 17 Jan 2023 10:02:34 +0000 (10:02 +0000)] 
upstream: regression test for UnusedConnectionTimeout

OpenBSD-Regress-ID: 7f29001374a68e71e5e078f69e4520cf4bcca084

2 years agoupstream: unbreak test: cannot access shell positional parameters
djm@openbsd.org [Mon, 16 Jan 2023 04:11:29 +0000 (04:11 +0000)] 
upstream: unbreak test: cannot access shell positional parameters

past $9 without wrapping the position in braces (i.e. need ${10}, etc.)

OpenBSD-Regress-ID: 3750ec98d5d409ce6a93406fedde6f220d2ea2ac

2 years agoupstream: Add a sshd_config UnusedConnectionTimeout option to terminate
djm@openbsd.org [Tue, 17 Jan 2023 09:44:48 +0000 (09:44 +0000)] 
upstream: Add a sshd_config UnusedConnectionTimeout option to terminate

client connections that have no open channels for some length of time. This
complements the recently-added ChannelTimeout option that terminates inactive
channels after a timeout.

ok markus@

OpenBSD-Commit-ID: ca983be74c0350364c11f8ba3bd692f6f24f5da9

2 years agoupstream: adapt to ed25519 changes in src/usr.bin/ssh
djm@openbsd.org [Sun, 15 Jan 2023 23:35:10 +0000 (23:35 +0000)] 
upstream: adapt to ed25519 changes in src/usr.bin/ssh

OpenBSD-Regress-ID: 4b3e7ba7ee486ae8a0b4790f8112eded2bb7dcd5

2 years agoupstream: update OpenSSH's Ed25519 code to the last version of SUPERCOP
djm@openbsd.org [Sun, 15 Jan 2023 23:05:32 +0000 (23:05 +0000)] 
upstream: update OpenSSH's Ed25519 code to the last version of SUPERCOP

(20221122) and change the import approach to the same one we use for
Streamlined NTRUPrime: use a shell script to extract the bits we need from
SUPERCOP, make some minor adjustments and squish them all into a single file.

ok tb@ tobhe@

OpenBSD-Commit-ID: 1bc0fd624cb6af440905b8ba74ac7c03311b8e3b

2 years agoAllow writev is seccomp sandbox.
Darren Tucker [Sat, 14 Jan 2023 11:02:44 +0000 (22:02 +1100)] 
Allow writev is seccomp sandbox.

This seems to be used by recent glibcs at least in some configurations.
From bz#3512, ok djm@

2 years agoupstream: Shell syntax fix. From ren mingshuai vi github PR#369.
dtucker@openbsd.org [Sat, 14 Jan 2023 10:05:54 +0000 (10:05 +0000)] 
upstream: Shell syntax fix. From ren mingshuai vi github PR#369.

OpenBSD-Regress-ID: 6696b2eeefe128099fc3d7ea9f23252cc35156f9

2 years agoupstream: Instead of skipping the all-tokens test if we don't have
dtucker@openbsd.org [Sat, 14 Jan 2023 09:57:08 +0000 (09:57 +0000)] 
upstream: Instead of skipping the all-tokens test if we don't have

OpenSSL (since we use it to compute the hash), put the hash at the end and
just omit it if we don't have it.  Prompted by bz#3521.

OpenBSD-Regress-ID: c79ecba64250ed3b6417294b6c965e6b12ca5eea

2 years agoupstream: fix double phrase in previous;
jmc@openbsd.org [Fri, 13 Jan 2023 07:13:40 +0000 (07:13 +0000)] 
upstream: fix double phrase in previous;

OpenBSD-Commit-ID: 671e6c8dc5e9230518b2bbfa143daaa88adc66c2

2 years agoupstream: Document "UserKnownHostsFile none". ok djm@
dtucker@openbsd.org [Fri, 13 Jan 2023 03:16:29 +0000 (03:16 +0000)] 
upstream: Document "UserKnownHostsFile none". ok djm@

OpenBSD-Commit-ID: f695742d39e34ecdcc3c861c3739a84648a4bce5

2 years agoRetry package installation 3 times.
Darren Tucker [Fri, 13 Jan 2023 12:02:34 +0000 (23:02 +1100)] 
Retry package installation 3 times.

When setting up the CI environment, retry package installation 3 times
before going up.  Should help prevent spurious failures during
infrastructure issues.

2 years agoupstream: Move scp path setting to a helper function. The previous
dtucker@openbsd.org [Fri, 13 Jan 2023 04:47:34 +0000 (04:47 +0000)] 
upstream: Move scp path setting to a helper function. The previous

commit to add scp to the test sshd's path causes the t-envpass test to fail
when the test scp is given using a fully qualified path.  Put this in a
helper function and only call it from the scp tests.

OpenBSD-Regress-ID: 7533dc1c4265c1de716abb062957994195b36df4

2 years agoupstream: Add scp's path to test sshd's PATH.
dtucker@openbsd.org [Fri, 13 Jan 2023 04:23:00 +0000 (04:23 +0000)] 
upstream: Add scp's path to test sshd's PATH.

If the scp we're testing is fully qualified (eg it's not in the system
PATH) then add its path to the under-test sshd's PATH so we can find
it. Prompted by bz#3518.

OpenBSD-Regress-ID: 7df4f5a0be3aa135495b7e5a6719d3cbc26cc4c0

2 years agoRemove skipping test when scp not in path.
Darren Tucker [Fri, 13 Jan 2023 04:49:48 +0000 (15:49 +1100)] 
Remove skipping test when scp not in path.

An upcoming change renders this obsolete by adding scp's path to the
test sshd's PATH, and removing this first will make the subsequent sync
easier.

2 years agoupstream: Add a "Host" line to the output of ssh -G showing the
dtucker@openbsd.org [Fri, 13 Jan 2023 02:58:20 +0000 (02:58 +0000)] 
upstream: Add a "Host" line to the output of ssh -G showing the

original host arg. Inspired by patch from vincent at bernat.ch via bz#3343,
ok djm@

OpenBSD-Commit-ID: 59c0f60a222113a44d0650cd394376e3beecc883

2 years agoupstream: avoid printf("%s", NULL) if using ssh
djm@openbsd.org [Fri, 13 Jan 2023 02:44:02 +0000 (02:44 +0000)] 
upstream: avoid printf("%s", NULL) if using ssh

-oUserKnownHostsFile=none and a hostkey in one of the system known hosts file
changes; ok dtucker@

OpenBSD-Commit-ID: 7ca87614bfc6da491315536a7f2301434a9fe614

2 years agoupstream: clamp the minimum buffer lengths and number of inflight
djm@openbsd.org [Wed, 11 Jan 2023 05:39:38 +0000 (05:39 +0000)] 
upstream: clamp the minimum buffer lengths and number of inflight

requests too

OpenBSD-Commit-ID: c4965f62fa0ba850940fd66ae3f60cf516bbcd56

2 years agoupstream: ignore bogus upload/download buffer lengths in the limits
djm@openbsd.org [Wed, 11 Jan 2023 05:36:50 +0000 (05:36 +0000)] 
upstream: ignore bogus upload/download buffer lengths in the limits

extension

OpenBSD-Commit-ID: c5b023e0954693ba9a5376e4280c739b5db575f8

2 years agoupstream: remove whitespace at EOL from code extracted from SUPERCOP
djm@openbsd.org [Wed, 11 Jan 2023 02:13:52 +0000 (02:13 +0000)] 
upstream: remove whitespace at EOL from code extracted from SUPERCOP

OpenBSD-Commit-ID: 1ec524ff2fbb9387d731601437c82008f35a60f4

2 years agoupstream: rewrite this test to use a multiplexed ssh session so we can
djm@openbsd.org [Wed, 11 Jan 2023 00:51:27 +0000 (00:51 +0000)] 
upstream: rewrite this test to use a multiplexed ssh session so we can

control its lifecycle without risk of race conditions; fixes some of the
Github integration tests for openssh-portable

OpenBSD-Regress-ID: 5451cad59ba0d43ae9eeda48ec80f54405fee969

2 years agoremove buffer len workaround for NetBSD 4.x
Damien Miller [Wed, 11 Jan 2023 00:45:17 +0000 (11:45 +1100)] 
remove buffer len workaround for NetBSD 4.x

Switching to from pipes to a socketpair for communicating with the
ssh process avoids the (kernel bug?) problem.

2 years agoadd back use of pipes in scp.c under USE_PIPES
Damien Miller [Wed, 11 Jan 2023 00:44:19 +0000 (11:44 +1100)] 
add back use of pipes in scp.c under USE_PIPES

This matches sftp.c which prefers socketpair but uses pipes on
some older platforms.

2 years agoupstream: Switch scp from using pipes to a socketpair for
millert@openbsd.org [Tue, 10 Jan 2023 23:22:15 +0000 (23:22 +0000)] 
upstream: Switch scp from using pipes to a socketpair for

communication with it's ssh sub-processes.  We no longer need to reserve two
descriptors to ensure that we don't end up using fd 0-2 unexpectedly, that is
handled by sanitise_stdfd() in main(). Based on an original diff from djm@.
OK deraadt@ djm@

OpenBSD-Commit-ID: b80c372faac462471e955ddeab9480d668a2e48d

2 years agoupstream: tweak previous; ok djm
jmc@openbsd.org [Fri, 6 Jan 2023 08:44:11 +0000 (08:44 +0000)] 
upstream: tweak previous; ok djm

OpenBSD-Commit-ID: 229c493452766d70a78b0f02f6ff9894f9028858

2 years agotry to improve logging for dynamic-forward test
Damien Miller [Mon, 9 Jan 2023 05:33:56 +0000 (16:33 +1100)] 
try to improve logging for dynamic-forward test

previously the logs from the ssh used to exercise the forwarding
channel would clobber the logs from the ssh actually doing the
forwarding

2 years agoSkip dynamic-forward test on minix3.
Darren Tucker [Sat, 7 Jan 2023 12:24:50 +0000 (23:24 +1100)] 
Skip dynamic-forward test on minix3.

This test relies on loopback addresses which minix does not have.
Previously the test would not run at all since it also doesn't have
netcat, but now we use our own netcat it tries and fails.

2 years agodon't test IPv6 addresses if platform lacks support
Damien Miller [Sun, 8 Jan 2023 01:08:59 +0000 (12:08 +1100)] 
don't test IPv6 addresses if platform lacks support

2 years agoupstream: When OpenSSL is not available, skip parts of percent test
dtucker@openbsd.org [Fri, 6 Jan 2023 12:33:33 +0000 (12:33 +0000)] 
upstream: When OpenSSL is not available, skip parts of percent test

that require it. Based on github pr#368 from ren mingshuai.

OpenBSD-Regress-ID: 49a375b2cf61ccb95b52e75e2e025cd10988ebb2

2 years agoUse our own netcat for dynamic-forward test.
Darren Tucker [Sat, 7 Jan 2023 12:01:11 +0000 (23:01 +1100)] 
Use our own netcat for dynamic-forward test.

That way we can be surer about its behaviour rather than trying to
second-guess the behaviour of various netcat implementations.

2 years agoUse autoconf to find openssl binary.
Darren Tucker [Sat, 7 Jan 2023 03:30:43 +0000 (14:30 +1100)] 
Use autoconf to find openssl binary.

It's possible to install an OpenSSL in a path not in the system's
default library search path.  OpenSSH can still use this (eg if you
specify an rpath) but the openssl binary there may not work.  If one is
available on the system path just use that.

2 years agoCheck openssl_bin path is executable before using.
Darren Tucker [Fri, 6 Jan 2023 23:34:18 +0000 (10:34 +1100)] 
Check openssl_bin path is executable before using.

2 years agoSet OPENSSL_BIN from OpenSSL directory.
Darren Tucker [Fri, 6 Jan 2023 12:19:07 +0000 (23:19 +1100)] 
Set OPENSSL_BIN from OpenSSL directory.

2 years agoupstream: Save debug logs from ssh for debugging purposes.
dtucker@openbsd.org [Fri, 6 Jan 2023 08:50:33 +0000 (08:50 +0000)] 
upstream: Save debug logs from ssh for debugging purposes.

OpenBSD-Regress-ID: 109e40b06de1c006a3b8e0d8745b790b2c5870a0

2 years agoupstream: regression test for ChannelTimeout
djm@openbsd.org [Fri, 6 Jan 2023 08:07:39 +0000 (08:07 +0000)] 
upstream: regression test for ChannelTimeout

OpenBSD-Regress-ID: 280bfbefcfa415428ad744e43f69a8dede8ad685

2 years agoupstream: fix typo in verbose logging
djm@openbsd.org [Fri, 6 Jan 2023 07:18:18 +0000 (07:18 +0000)] 
upstream: fix typo in verbose logging

OpenBSD-Regress-ID: 0497cdb66e003b2f50ed77291a9104fba2e017e9

2 years agoupstream: unit tests for misc.c:ptimeout_* API
djm@openbsd.org [Fri, 6 Jan 2023 02:59:50 +0000 (02:59 +0000)] 
upstream: unit tests for misc.c:ptimeout_* API

OpenBSD-Regress-ID: 01f8fb12d08e5aaadd4bd4e71f456b6588be9a94

2 years agoupstream: Copy bytes from the_banana[] rather than banana()
tb@openbsd.org [Wed, 4 Jan 2023 22:48:57 +0000 (22:48 +0000)] 
upstream: Copy bytes from the_banana[] rather than banana()

Fixes test failure due to segfault seen on arm64 with xonly snap.

ok djm

OpenBSD-Regress-ID: 86e2aa4bbd1dff1bc4ebb2969c0d6474485be046

2 years agounbreak scp on NetBSD 4.x
Damien Miller [Fri, 6 Jan 2023 08:13:36 +0000 (19:13 +1100)] 
unbreak scp on NetBSD 4.x

e555d5cad5 effectively increased the default copy buffer size for SFTP
transfers. This caused NetBSD 4.x to hang during the "copy local file to
remote file in place" scp.sh regression test.

This puts back the original 32KB copy buffer size until we can properly
figure out why.

lots of debugging assistance from dtucker@

2 years agoupstream: Implement channel inactivity timeouts
djm@openbsd.org [Fri, 6 Jan 2023 02:47:18 +0000 (02:47 +0000)] 
upstream: Implement channel inactivity timeouts

This adds a sshd_config ChannelTimeouts directive that allows channels that
have not seen traffic in a configurable interval to be automatically closed.
Different timeouts may be applied to session, X11, agent and TCP forwarding
channels.

Note: this only affects channels over an opened SSH connection and not
the connection itself. Most clients close the connection when their channels
go away, with a notable exception being ssh(1) in multiplexing mode.

ok markus dtucker

OpenBSD-Commit-ID: ae8bba3ed9d9f95ff2e2dc8dcadfa36b48e6c0b8

2 years agoupstream: Add channel_set_xtype()
djm@openbsd.org [Fri, 6 Jan 2023 02:42:34 +0000 (02:42 +0000)] 
upstream: Add channel_set_xtype()

This sets an "extended" channel type after channel creation (e.g.
"session:subsystem:sftp") that will be used for setting channel inactivity
timeouts.

ok markus dtucker

OpenBSD-Commit-ID: 42564aa92345045b4a74300528f960416a15d4ca

2 years agoupstream: tweak channel ctype names
djm@openbsd.org [Fri, 6 Jan 2023 02:41:49 +0000 (02:41 +0000)] 
upstream: tweak channel ctype names

These are now used by sshd_config:ChannelTimeouts to specify timeouts by
channel type, so force them all to use a similar format without whitespace.

ok dtucker markus

OpenBSD-Commit-ID: 66834765bb4ae14f96d2bb981ac98a7dae361b65

2 years agoupstream: Add channel_force_close()
djm@openbsd.org [Fri, 6 Jan 2023 02:39:59 +0000 (02:39 +0000)] 
upstream: Add channel_force_close()

This will forcibly close an open channel by simulating read/write errors,
draining the IO buffers and calling the detach function.

Previously the detach function was only ever called during channel garbage
collection, but there was no way to signal the user of a channel (e.g.
session.c) that its channel was being closed deliberately (vs. by the
usual state-machine logic). So this adds an extra "force" argument to the
channel cleanup callback to indicate this condition.

ok markus dtucker

OpenBSD-Commit-ID: 23052707a42bdc62fda2508636e624afd466324b

2 years agoupstream: replace manual poll/ppoll timeout math with ptimeout API
djm@openbsd.org [Fri, 6 Jan 2023 02:38:23 +0000 (02:38 +0000)] 
upstream: replace manual poll/ppoll timeout math with ptimeout API

feedback markus / ok markus dtucker

OpenBSD-Commit-ID: c5ec4f2d52684cdb788cd9cbc1bcf89464014be2

2 years agoupstream: add ptimeout API for keeping track of poll/ppoll
djm@openbsd.org [Fri, 6 Jan 2023 02:37:04 +0000 (02:37 +0000)] 
upstream: add ptimeout API for keeping track of poll/ppoll

timeouts; ok dtucker markus

OpenBSD-Commit-ID: 3335268ca135b3ec15a947547d7cfbb8ff929ead

2 years agoupstream: suppress "Connection closed" message when in quiet mode
djm@openbsd.org [Thu, 5 Jan 2023 05:49:13 +0000 (05:49 +0000)] 
upstream: suppress "Connection closed" message when in quiet mode

OpenBSD-Commit-ID: 8a3ab7176764da55f60bfacfeae9b82d84e3908f

2 years agoupstream: regression test for PermitRemoteOpen
djm@openbsd.org [Mon, 2 Jan 2023 07:03:57 +0000 (07:03 +0000)] 
upstream: regression test for PermitRemoteOpen

OpenBSD-Regress-ID: 8271aafbf5c21950cd5bf966f08e585cebfe630c

2 years agoupstream: fix bug in PermitRemoteOpen which caused it to ignore its
djm@openbsd.org [Mon, 2 Jan 2023 07:03:30 +0000 (07:03 +0000)] 
upstream: fix bug in PermitRemoteOpen which caused it to ignore its

first argument unless it was one of the special keywords "any" or "none".

Reported by Georges Chaudy in bz3515; ok dtucker@

OpenBSD-Commit-ID: c5678a39f1ff79993d5ae3cfac5746a4ae148ea5

2 years agoupstream: spelling fixes; from paul tagliamonte amendments to his
jmc@openbsd.org [Mon, 26 Dec 2022 19:16:03 +0000 (19:16 +0000)] 
upstream: spelling fixes; from paul tagliamonte amendments to his

diff are noted on tech

OpenBSD-Commit-ID: d776dd03d0b882ca9c83b84f6b384f6f9bd7de4a

2 years agoupstream: Mention that scp uses the SFTP protocol and remove
djm@openbsd.org [Fri, 16 Dec 2022 07:13:22 +0000 (07:13 +0000)] 
upstream: Mention that scp uses the SFTP protocol and remove

reference to legacy flag. Spotted by, feedback and ok jmc@

OpenBSD-Commit-ID: 9dfe04966f52e941966b46c7a2972147f95281b3

2 years agoupstream: Clear signal mask early in main(); sshd may have been
djm@openbsd.org [Fri, 16 Dec 2022 06:56:47 +0000 (06:56 +0000)] 
upstream: Clear signal mask early in main(); sshd may have been

started with one or more signals masked (sigprocmask(2) is not cleared
on fork/exec) and this could interfere with various things, e.g. the
login grace timer.

Execution environments that fail to clear the signal mask before running
sshd are clearly broken, but apparently they do exist.

Reported by Sreedhar Balasubramanian; ok dtucker@

OpenBSD-Commit-ID: 77078c0b1c53c780269fc0c416f121d05e3010ae

2 years agoupstream: add -X to usage();
jmc@openbsd.org [Fri, 16 Dec 2022 06:52:48 +0000 (06:52 +0000)] 
upstream: add -X to usage();

OpenBSD-Commit-ID: 1bdc3df7de11d766587b0428318336dbffe4a9d0

2 years agoupstream: add a -X option to both scp(1) and sftp(1) to allow
djm@openbsd.org [Fri, 16 Dec 2022 03:40:03 +0000 (03:40 +0000)] 
upstream: add a -X option to both scp(1) and sftp(1) to allow

control over some SFTP protocol knobs: the copy buffer length and
the number of inflight requests, both of which are used during
upload/download.

Previously these could be controlled in sftp(1) using the -b/-R options.
This makes them available in both SFTP protocol clients using the same
option character sequence.

ok dtucker@

OpenBSD-Commit-ID: 27502bffc589776f5da1f31df8cb51abe9a15f1c

2 years agoupstream: The idiomatic way of coping with signed char vs unsigned
deraadt@openbsd.org [Thu, 15 Dec 2022 18:20:39 +0000 (18:20 +0000)] 
upstream: The idiomatic way of coping with signed char vs unsigned

char (which did not come from stdio read functions) in the presence of
ctype macros, is to always cast to (unsigned char).  casting to (int)
for a "macro" which is documented to take int, is weird.  And sadly wrong,
because of the sing extension risk.. same diff from florian

OpenBSD-Commit-ID: 65b9a49a68e22ff3a0ebd593f363e9f22dd73fea

2 years agoSimply handling of SSH_CONNECTION PAM env var.
Darren Tucker [Mon, 19 Dec 2022 07:49:51 +0000 (18:49 +1100)] 
Simply handling of SSH_CONNECTION PAM env var.

Prompted by bz#3508: there's no need to cache the value of
sshpam_conninfo so remove the global.  While there, add check of
return value from pam_putenv.  ok djm@

2 years agoAdd tests for LibreSSL 3.7.0 and OpenSSL 1.1.1s.
Darren Tucker [Mon, 19 Dec 2022 07:42:34 +0000 (18:42 +1100)] 
Add tests for LibreSSL 3.7.0 and OpenSSL 1.1.1s.

2 years agoUse sudo when resetting perms on directories.
Darren Tucker [Sun, 18 Dec 2022 10:36:25 +0000 (21:36 +1100)] 
Use sudo when resetting perms on directories.

2 years agoSet group perms on regress dir.
Darren Tucker [Sun, 18 Dec 2022 10:19:33 +0000 (21:19 +1100)] 
Set group perms on regress dir.

This ensures that the tests don't fail due to StrictMode checks.

2 years agoFetch regress logs from obj dir.
Darren Tucker [Sun, 18 Dec 2022 10:13:42 +0000 (21:13 +1100)] 
Fetch regress logs from obj dir.

2 years agoobsdsnap test VMs runs-on libvirt too.
Darren Tucker [Tue, 13 Dec 2022 09:59:54 +0000 (20:59 +1100)] 
obsdsnap test VMs runs-on libvirt too.

2 years agoRun upstream obsdsnap tests on ephemeral runners.
Darren Tucker [Tue, 13 Dec 2022 09:55:37 +0000 (20:55 +1100)] 
Run upstream obsdsnap tests on ephemeral runners.

2 years agoMove obsdsnap test VMs to ephemeral runners.
Darren Tucker [Tue, 13 Dec 2022 09:48:56 +0000 (20:48 +1100)] 
Move obsdsnap test VMs to ephemeral runners.

2 years agouse calloc for allocating arc4random structs
Damien Miller [Fri, 9 Dec 2022 07:00:21 +0000 (18:00 +1100)] 
use calloc for allocating arc4random structs

ok dtucker

2 years agoupstream: Warn if no host keys for hostbased auth can be loaded.
dtucker@openbsd.org [Fri, 9 Dec 2022 00:22:29 +0000 (00:22 +0000)] 
upstream: Warn if no host keys for hostbased auth can be loaded.

OpenBSD-Commit-ID: 2a0a13132000cf8d3593133c1b49768aa3c95977

2 years agoupstream: Add server debugging for hostbased auth.
dtucker@openbsd.org [Fri, 9 Dec 2022 00:17:40 +0000 (00:17 +0000)] 
upstream: Add server debugging for hostbased auth.

auth_debug_add queues messages about the auth process which is sent to
the client after successful authentication.  This also sends those to
the server debug log to aid in debugging.  From bz#3507, ok djm@

OpenBSD-Commit-ID: 46ff67518cccf9caf47e06393e2a121ee5aa258a

2 years agoupstream: remove '?' from getopt(3) loops
cheloha@openbsd.org [Sun, 4 Dec 2022 23:50:49 +0000 (23:50 +0000)] 
upstream: remove '?' from getopt(3) loops

userspace: remove vestigial '?' cases from top-level getopt(3) loops

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument.  We can
handle this case with the "default" failure case with no loss of
legibility.  Hence, remove all the redundant "case '?':" lines.

Prompted by dlg@.  With help from dlg@ and millert@.

Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2
ok naddy@ millert@ dlg@

OpenBSD-Commit-ID: b2f89346538ce4f5b33ab8011a23e0626a67e66e

2 years agoupstream: Fix comment typo.
dtucker@openbsd.org [Wed, 7 Dec 2022 11:45:43 +0000 (11:45 +0000)] 
upstream: Fix comment typo.

OpenBSD-Regress-ID: 3b04faced6511bb5e74648c6a4ef4bf2c4decf03

2 years agoAdd SANDBOX_DEBUG to the kitchensink test build.
Darren Tucker [Wed, 7 Dec 2022 07:58:25 +0000 (18:58 +1100)] 
Add SANDBOX_DEBUG to the kitchensink test build.

2 years agodisable SANDBOX_SECCOMP_FILTER_DEBUG
Damien Miller [Wed, 7 Dec 2022 07:38:25 +0000 (18:38 +1100)] 
disable SANDBOX_SECCOMP_FILTER_DEBUG

It was mistakenly enabled in 2580916e4872

Reported by Peter sec-openssh-com.22.fichtner AT 0sg.net

2 years agoUpdate autotools
Rose [Tue, 29 Nov 2022 20:12:54 +0000 (15:12 -0500)] 
Update autotools

Regenerate config files using latest autotools

2 years agoFix typo in comment. Spotted by tim@
Darren Tucker [Tue, 6 Dec 2022 01:22:36 +0000 (12:22 +1100)] 
Fix typo in comment.  Spotted by tim@

2 years agoupstream: Remove duplicate includes.
dtucker@openbsd.org [Sun, 4 Dec 2022 11:03:11 +0000 (11:03 +0000)] 
upstream: Remove duplicate includes.

 Patch from AtariDreams via github PR#364.

OpenBSD-Commit-ID: b9186638a05cb8b56ef7c0de521922b6723644ea

2 years agoupstream: make struct sshbuf private
djm@openbsd.org [Fri, 2 Dec 2022 04:40:27 +0000 (04:40 +0000)] 
upstream: make struct sshbuf private

and remove an unused field; ok dtucker

OpenBSD-Commit-ID: c7a3d77c0b8c153d463398606a8d57569186a0c3

2 years agoRestore ssh-agent permissions on exit.
Darren Tucker [Fri, 2 Dec 2022 00:43:36 +0000 (11:43 +1100)] 
Restore ssh-agent permissions on exit.

...enough that subsequent builds can overwrite ssh-agent if necessary.

2 years agoupstream: Clean up ssh-add and ssh-agent logs.
dtucker@openbsd.org [Thu, 1 Dec 2022 02:22:13 +0000 (02:22 +0000)] 
upstream: Clean up ssh-add and ssh-agent logs.

OpenBSD-Regress-ID: 9eda8e4c3714d7f943ab2e73ed58a233bd29cd2c

2 years agoupstream: Log output of ssh-agent and ssh-add
dtucker@openbsd.org [Thu, 1 Dec 2022 02:19:29 +0000 (02:19 +0000)] 
upstream: Log output of ssh-agent and ssh-add

This should  make debugging easier.

OpenBSD-Regress-ID: 5974b02651f428d7e1079b41304c498ca7e306c8

2 years agoupstream: Add void to client_repledge args to fix compiler warning. ok djm@
dtucker@openbsd.org [Tue, 29 Nov 2022 22:41:14 +0000 (22:41 +0000)] 
upstream: Add void to client_repledge args to fix compiler warning. ok djm@

OpenBSD-Commit-ID: 7e964a641ce4a0a0a11f047953b29929d7a4b866

2 years agoupstream: tighten pledge(2) after session establishment
djm@openbsd.org [Mon, 28 Nov 2022 01:38:22 +0000 (01:38 +0000)] 
upstream: tighten pledge(2) after session establishment

feedback, ok & testing in snaps deraadt@

OpenBSD-Commit-ID: aecf4d49d28586dfbcc74328d9333398fef9eb58

2 years agoupstream: New EnableEscapeCommandline ssh_config(5) option
djm@openbsd.org [Mon, 28 Nov 2022 01:37:36 +0000 (01:37 +0000)] 
upstream: New EnableEscapeCommandline ssh_config(5) option

This option (default "no") controls whether the ~C escape is available.
Turning it off by default means we will soon be able to use a stricter
default pledge(2) in the client.

feedback deraadt@ dtucker@; tested in snaps for a while

OpenBSD-Commit-ID: 7e277595d60acb8263118dcb66554472257b387a

2 years agoupstream: In channel_request_remote_forwarding the parameters for
mbuhl@openbsd.org [Fri, 18 Nov 2022 19:47:40 +0000 (19:47 +0000)] 
upstream: In channel_request_remote_forwarding the parameters for

permission_set_add are leaked as they are also duplicated in the call. Found
by CodeChecker. ok djm

OpenBSD-Commit-ID: 4aef50fa9be7c0b138188814c8fe3dccc196f61e

2 years agoUse -fzero-call-used-regs=used on clang 15.
Darren Tucker [Wed, 30 Nov 2022 00:23:11 +0000 (11:23 +1100)] 
Use -fzero-call-used-regs=used on clang 15.

clang 15 seems to have a problem with -fzero-call-used-reg=all which
causes spurious "incorrect signature" failures with ED25519.  On those
versions, use -fzero-call-used-regs=used instead.  (We may add exceptions
later if specific versions prove to be OK).  Also move the GCC version
check to match.

Initial investigation by Daniel Pouzzner (douzzer at mega nu), workaround
suggested by Bill Wendling (morbo at google com).  bz#3475, ok djm@