]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
23 months agoStop using -fzero-call-used-regs=all
Darren Tucker [Tue, 21 Nov 2023 03:04:34 +0000 (14:04 +1100)] 
Stop using -fzero-call-used-regs=all

... since it seems to be problematic with several different versions of
clang.  Only use -fzero-call-used-regs=used which is less
problematic, except with Apple's clang where we don't use it at all.
bz#3629, ok djm@

23 months agoAllow for vendor prefix on clang version numbers.
Darren Tucker [Tue, 21 Nov 2023 03:02:18 +0000 (14:02 +1100)] 
Allow for vendor prefix on clang version numbers.

Correctly detects the version of OpenBSD's native clang, as well as
Apple's.  Spotted tb@, ok djm@.

23 months agoupstream: set errno=EAFNOSUPPORT when filtering addresses that don't
djm@openbsd.org [Mon, 20 Nov 2023 02:50:00 +0000 (02:50 +0000)] 
upstream: set errno=EAFNOSUPPORT when filtering addresses that don't

match AddressFamily; yields slightly better error message if no address
matches. bz#3526

OpenBSD-Commit-ID: 29cea900ddd8b04a4d1968da5c4a893be2ebd9e6

23 months agoupstream: when connecting via socket (the default case), filter
djm@openbsd.org [Wed, 15 Nov 2023 23:03:38 +0000 (23:03 +0000)] 
upstream: when connecting via socket (the default case), filter

addresses by AddressFamily if one was specified. Fixes the case where, if
CanonicalizeHostname is enabled, ssh may ignore AddressFamily. bz5326; ok
dtucker

OpenBSD-Commit-ID: 6c7d7751f6cd055126b2b268a7b64dcafa447439

23 months agoupstream: when deciding whether to enable keystroke timing
djm@openbsd.org [Wed, 15 Nov 2023 22:51:49 +0000 (22:51 +0000)] 
upstream: when deciding whether to enable keystroke timing

obfuscation, only consider enabling it when a channel with a tty is open.

Avoids turning on the obfucation when X11 forwarding only is in use,
which slows it right down. Reported by Roger Marsh

OpenBSD-Commit-ID: c292f738db410f729190f92de100c39ec931a4f1

23 months agoupstream: Make sure sftp_get_limits() only returns 0 if 'limits'
tobhe@openbsd.org [Mon, 13 Nov 2023 09:18:19 +0000 (09:18 +0000)] 
upstream: Make sure sftp_get_limits() only returns 0 if 'limits'

was initialized. This fixes a potential uninitialized use of 'limits' in
sftp_init() if sftp_get_limits() returned early because of an unexpected
message type.

ok djm@

OpenBSD-Commit-ID: 1c177d7c3becc1d71bc8763eecf61873a1d3884c

23 months agoTest current releases of LibreSSL and OpenSSL.
Darren Tucker [Mon, 13 Nov 2023 09:03:31 +0000 (20:03 +1100)] 
Test current releases of LibreSSL and OpenSSL.

Retire some of the older releases.

2 years agoupstream: Specify ssh binary to use
dtucker@openbsd.org [Wed, 1 Nov 2023 02:08:38 +0000 (02:08 +0000)] 
upstream: Specify ssh binary to use

... instead of relying on installed one.  Fixes test failures in -portable
when running tests prior to installation.

OpenBSD-Regress-ID: b6d6ba71c23209c616efc805a60d9a445d53a685

2 years agoPut long-running test targets on hipri runners.
Darren Tucker [Wed, 1 Nov 2023 02:11:31 +0000 (13:11 +1100)] 
Put long-running test targets on hipri runners.

Some of the selfhosted test targets take a long time to run for various
reasons, so label them for "libvirt-hipri" runners so that they can
start immediately.  This should reduce the time to complete all tests.

2 years agoupstream: add some tests of forced commands overriding Subsystem
djm@openbsd.org [Wed, 1 Nov 2023 00:29:46 +0000 (00:29 +0000)] 
upstream: add some tests of forced commands overriding Subsystem

directives

OpenBSD-Regress-ID: eb48610282f6371672bdf2a8b5d2aa33cfbd322b

2 years agoupstream: Don't try to use sudo inside sshd log wrapper.
dtucker@openbsd.org [Tue, 31 Oct 2023 04:15:40 +0000 (04:15 +0000)] 
upstream: Don't try to use sudo inside sshd log wrapper.

We still need to check if we're using sudo since we don't want to chown
unecessarily, as on some platforms this causes an error which pollutes
stderr. We also don't want to unnecessarily invoke sudo, since it's
running in the context of the proxycommand, on *other* platforms it
may not be able to authenticate, and if we're using SUDO then it should
already be privileged.

OpenBSD-Regress-ID: 70d58df7503db699de579a9479300e5f3735f4ee

2 years agoupstream: Only try to chmod logfile if we have sudo. If we don't have
dtucker@openbsd.org [Tue, 31 Oct 2023 02:58:45 +0000 (02:58 +0000)] 
upstream: Only try to chmod logfile if we have sudo. If we don't have

sudo then we won't need to chmod.

OpenBSD-Regress-ID: dbad2f5ece839658ef8af3376cb1fb1cabe2e324

2 years agoupstream: move PKCS#11 setup code to test-exec.sh so it can be reused
djm@openbsd.org [Mon, 30 Oct 2023 23:00:25 +0000 (23:00 +0000)] 
upstream: move PKCS#11 setup code to test-exec.sh so it can be reused

elsewhere

OpenBSD-Regress-ID: 1d29e6be40f994419795d9e660a8d07f538f0acb

2 years agoupstream: tidy and refactor PKCS#11 setup code
djm@openbsd.org [Mon, 30 Oct 2023 17:32:00 +0000 (17:32 +0000)] 
upstream: tidy and refactor PKCS#11 setup code

Replace the use of a perl script to delete the controlling TTY with a
SSH_ASKPASS script to directly load the PIN.

Move PKCS#11 setup code to functions in anticipation of it being used
elsewhere in additional tests.

Reduce stdout spam

OpenBSD-Regress-ID: 07705c31de30bab9601a95daf1ee6bef821dd262

2 years agoAdd obsd74 test VM and retire obsd69 and obsd70.
Darren Tucker [Mon, 30 Oct 2023 10:35:03 +0000 (21:35 +1100)] 
Add obsd74 test VM and retire obsd69 and obsd70.

2 years agoAdd OpenSSL 3.3.0 as a known dev version.
Darren Tucker [Mon, 30 Oct 2023 07:34:12 +0000 (18:34 +1100)] 
Add OpenSSL 3.3.0 as a known dev version.

2 years agoRestore nopasswd sudo rule on Mac OS X.
Darren Tucker [Mon, 30 Oct 2023 02:32:03 +0000 (13:32 +1100)] 
Restore nopasswd sudo rule on Mac OS X.

This seems to be missing from some (but not all) github runners, so
restore it if it seems to be missing.

2 years agoDon't exit early when setting up on Mac OS X.
Darren Tucker [Mon, 30 Oct 2023 02:26:52 +0000 (13:26 +1100)] 
Don't exit early when setting up on Mac OS X.

We probably need some of the other bits in there (specifically, setting
the perms on the home directory) so make it less of a special snowflake.

2 years agoupstream: Only try to chown logfiles that exist to prevent spurious
dtucker@openbsd.org [Sun, 29 Oct 2023 06:22:07 +0000 (06:22 +0000)] 
upstream: Only try to chown logfiles that exist to prevent spurious

errors.

OpenBSD-Regress-ID: f1b20a476734e885078c481f1324c9ea03af991e

2 years agoupstream: make use of bsd.regress.mk in extra and interop targets; ok
anton@openbsd.org [Thu, 26 Oct 2023 18:52:45 +0000 (18:52 +0000)] 
upstream: make use of bsd.regress.mk in extra and interop targets; ok

dtucker@

OpenBSD-Regress-ID: 7ea21b5f6fc4506165093b2123d88d20ff13a4f0

2 years agoupstream: Skip conch interop tests when not enabled instead of fatal.
dtucker@openbsd.org [Thu, 26 Oct 2023 12:44:07 +0000 (12:44 +0000)] 
upstream: Skip conch interop tests when not enabled instead of fatal.

OpenBSD-Regress-ID: b0abf81c24ac6c21f367233663228ba16fa96a46

2 years agoupstream: Import regenerated moduli.
dtucker@openbsd.org [Wed, 25 Oct 2023 05:38:08 +0000 (05:38 +0000)] 
upstream: Import regenerated moduli.

OpenBSD-Commit-ID: 95f5dd6107e8902b87dc5b005ef2b53f1ff378b8

2 years agoupstream: ssh conch interop tests requires a controlling terminal;
anton@openbsd.org [Wed, 25 Oct 2023 08:01:59 +0000 (08:01 +0000)] 
upstream: ssh conch interop tests requires a controlling terminal;

ok dtucker@

OpenBSD-Regress-ID: cbf2701bc347c2f19d907f113779c666f1ecae4a

2 years agoupstream: Use private key that is allowed by sshd defaults in conch
anton@openbsd.org [Mon, 23 Oct 2023 11:30:49 +0000 (11:30 +0000)] 
upstream: Use private key that is allowed by sshd defaults in conch

interop tests.

ok dtucker@

OpenBSD-Regress-ID: 3b7f65c8f409c328bcd4b704f60cb3d31746f045

2 years agoInstall Dropbear for interop testing.
Darren Tucker [Fri, 20 Oct 2023 09:43:00 +0000 (20:43 +1100)] 
Install Dropbear for interop testing.

2 years agoResync PuTTY and Conch path handling with upstream.
Darren Tucker [Fri, 20 Oct 2023 09:39:03 +0000 (20:39 +1100)] 
Resync PuTTY and Conch path handling with upstream.

Now that configure finds these for us we can remove these -portable
specific changes.

2 years agoHave configure find PuTTY and Conch binaries.
Darren Tucker [Fri, 20 Oct 2023 09:35:46 +0000 (20:35 +1100)] 
Have configure find PuTTY and Conch binaries.

This will let us remove some -portable specific changes from
test-exec.sh.

2 years agoupstream: Allow overriding the locations of the Dropbear binaries
dtucker@openbsd.org [Fri, 20 Oct 2023 07:37:07 +0000 (07:37 +0000)] 
upstream: Allow overriding the locations of the Dropbear binaries

similar to what we do for the PuTTY ones.

OpenBSD-Regress-ID: 7de0e00518fb0c8fdc5f243b7f82f523c936049c

2 years agoupstream: Add interop test with Dropbear.
dtucker@openbsd.org [Fri, 20 Oct 2023 06:56:45 +0000 (06:56 +0000)] 
upstream: Add interop test with Dropbear.

Right now this is only dbclient not the Dropbear server since it won't
currently run as a ProxyCommand.

OpenBSD-Regress-ID: 8cb898c414fcdb252ca6328896b0687acdaee496

2 years agoUpdate openssl-devel dependency in RPM spec.
Fabio Pedretti [Mon, 16 Oct 2023 09:59:53 +0000 (11:59 +0200)] 
Update openssl-devel dependency in RPM spec.

Since openssh 9.4p1, openssl >= 1.1.1 is required, so
build with --without-openssl elsewhere.
According to https://repology.org/project/openssl/versions
openssl 1.1.1 is available on fedora >= 29 and rhel >= 8.
Successfully build tested, installed and run on rhel 6

2 years agoRemove reference of dropped sshd.pam.old file
Fabio Pedretti [Mon, 16 Oct 2023 08:13:06 +0000 (10:13 +0200)] 
Remove reference of dropped sshd.pam.old file

The file was removed in openssh 8.8

2 years agoupstream: Move declaration of "len" into the block where it's used.
dtucker@openbsd.org [Mon, 16 Oct 2023 08:40:00 +0000 (08:40 +0000)] 
upstream: Move declaration of "len" into the block where it's used.

This lets us compile Portable with -Werror with when OpenSSL doesn't have
Ed25519 support.

OpenBSD-Commit-ID: e02e4b4af351946562a7caee905da60eff16ba29

2 years agorun t-extra regress tests
Damien Miller [Fri, 13 Oct 2023 04:15:05 +0000 (15:15 +1100)] 
run t-extra regress tests

This exposes the t-extra regress tests (including agent-pkcs11.sh) as
a new extra-tests target in the top level Makefile and runs them by
default. ok dtucker@

2 years agoDon't use make -j2.
Darren Tucker [Thu, 12 Oct 2023 11:01:23 +0000 (22:01 +1100)] 
Don't use make -j2.

While we have 2 cores available on github runners, not using it means
that the most recent log message is the actual failure, rather than
having to search back through the log for it.

2 years agoCorrect arg order for ED255519 AC_LINK_IFELSE test.
Darren Tucker [Thu, 12 Oct 2023 05:23:05 +0000 (16:23 +1100)] 
Correct arg order for ED255519 AC_LINK_IFELSE test.

2 years agoupstream: typos and extra debug trace calls
djm@openbsd.org [Thu, 12 Oct 2023 03:51:08 +0000 (03:51 +0000)] 
upstream: typos and extra debug trace calls

OpenBSD-Regress-ID: 98a2a6b9333743274359e3c0f0e65cf919a591d1

2 years agoupstream: ensure logs are owned by correct user; feedback/ok
djm@openbsd.org [Thu, 12 Oct 2023 03:48:53 +0000 (03:48 +0000)] 
upstream: ensure logs are owned by correct user; feedback/ok

dtucker@

OpenBSD-Regress-ID: c3297af8f07717f1d400a5d34529962f1a76b5a3

2 years agoupstream: 64 %-expansion keys ought to be enough for anybody; ok
djm@openbsd.org [Thu, 12 Oct 2023 03:36:32 +0000 (03:36 +0000)] 
upstream: 64 %-expansion keys ought to be enough for anybody; ok

dtucker (we just hit the previous limit in some cases)

OpenBSD-Commit-ID: 84070f8001ec22ff5d669f836b62f206e08c5787

2 years agoupstream: don't dereference NULL pointer when hashing jumphost
djm@openbsd.org [Thu, 12 Oct 2023 02:48:43 +0000 (02:48 +0000)] 
upstream: don't dereference NULL pointer when hashing jumphost

OpenBSD-Commit-ID: 251c0263e1759a921341c7efe7f1d4c73e1c70f4

2 years agoSolaris: prefer PRIV_XPOLICY to PRIV_LIMIT
Damien Miller [Thu, 12 Oct 2023 02:20:01 +0000 (13:20 +1100)] 
Solaris: prefer PRIV_XPOLICY to PRIV_LIMIT

If the system support PRIV_XPOLICY and one is set, then don't
modify PRIV_LIMIT. bz2833, patch from Ron Jordan, ok dtucker@

2 years agoupstream: add %j token that expands to the configured ProxyJump
djm@openbsd.org [Thu, 12 Oct 2023 02:18:18 +0000 (02:18 +0000)] 
upstream: add %j token that expands to the configured ProxyJump

hostname (or the empty string if this option is not being used). bz3610, ok
dtucker

OpenBSD-Commit-ID: ce9983f7efe6a178db90dc5c1698df025df5e339

2 years agoupstream: release GSS OIDs only at end of authentication; bz2982,
djm@openbsd.org [Thu, 12 Oct 2023 02:15:53 +0000 (02:15 +0000)] 
upstream: release GSS OIDs only at end of authentication; bz2982,

ok dtucker@

OpenBSD-Commit-ID: 0daa41e0525ae63cae4483519ecaa37ac485d94c

2 years agoupstream: mask SIGINT/TERM/QUIT/HUP before checking quit_pending
djm@openbsd.org [Thu, 12 Oct 2023 02:12:53 +0000 (02:12 +0000)] 
upstream: mask SIGINT/TERM/QUIT/HUP before checking quit_pending

and use ppoll() to unmask them in the mainloop. Avoids race condition between
signaling ssh to exit and polling. bz3531; ok dtucker

OpenBSD-Commit-ID: 5c14e1aabcddedb95cdf972283d9c0d5083229e7

2 years agoupstream: sync usage() with ssh.1; spotted by kn@
djm@openbsd.org [Wed, 11 Oct 2023 23:23:58 +0000 (23:23 +0000)] 
upstream: sync usage() with ssh.1; spotted by kn@

OpenBSD-Commit-ID: 191a85639477dcb5fa1616d270d93b7c8d5c1dfd

2 years agoupstream: ssh -Q does not make sense with other command-line options,
djm@openbsd.org [Wed, 11 Oct 2023 23:14:33 +0000 (23:14 +0000)] 
upstream: ssh -Q does not make sense with other command-line options,

so give it its own line in the manpage

OpenBSD-Commit-ID: 00a747f0655c12122bbb77c2796be0013c105361

2 years agoupstream: add ChannelTimeout support to the client, mirroring the
djm@openbsd.org [Wed, 11 Oct 2023 22:42:26 +0000 (22:42 +0000)] 
upstream: add ChannelTimeout support to the client, mirroring the

same option in the server. ok markus@

OpenBSD-Commit-ID: 55630b26f390ac063980cfe7ad8c54b03284ef02

2 years agoupstream: add support for reading ED25519 private keys in PEM PKCS8
djm@openbsd.org [Wed, 11 Oct 2023 22:41:05 +0000 (22:41 +0000)] 
upstream: add support for reading ED25519 private keys in PEM PKCS8

format; ok markus@ tb@

OpenBSD-Commit-ID: 01b85c91757e6b057e9b23b8a23f96415c3c7174

2 years agoupstream: mention "none" is a valid argument to IdentityFile; bz3080
djm@openbsd.org [Wed, 11 Oct 2023 06:40:54 +0000 (06:40 +0000)] 
upstream: mention "none" is a valid argument to IdentityFile; bz3080

OpenBSD-Commit-ID: 1b4fb590ef731099349a7d468b77f02b240ac926

2 years agoupstream: in olde rcp/scp protocol mode, when rejecting a path from the
djm@openbsd.org [Wed, 11 Oct 2023 05:42:08 +0000 (05:42 +0000)] 
upstream: in olde rcp/scp protocol mode, when rejecting a path from the

server as not matching the glob that the client sent, log (at debug level)
the received pathname as well as the list of possible expected paths expanded
from the glob. bz2966

OpenBSD-Commit-ID: 0bd8db8a595334ca86bca8f36e23fc0395315765

2 years agoupstream: s/%.100s/%s/ in SSH- banner construction as there's no
djm@openbsd.org [Wed, 11 Oct 2023 04:46:29 +0000 (04:46 +0000)] 
upstream: s/%.100s/%s/ in SSH- banner construction as there's no

reason to limit its size: the version string bring included is a compile time
constant going into an allocated banner string.

OpenBSD-Commit-ID: 0ef73304b9bf3e534c60900cd84ab699f859ebcd

2 years agoupstream: Garbage collect cipher_get_keyiv_len()
tb@openbsd.org [Tue, 10 Oct 2023 06:49:54 +0000 (06:49 +0000)] 
upstream: Garbage collect cipher_get_keyiv_len()

This is a compat20 leftover, unused since 2017.

ok djm

OpenBSD-Commit-ID: 91fa5497c9dc6883064624ac27813a567883fdce

2 years agoupstream: Reserve a range of "local extension" message numbers that
djm@openbsd.org [Tue, 10 Oct 2023 03:57:45 +0000 (03:57 +0000)] 
upstream: Reserve a range of "local extension" message numbers that

OpenSSH promises not to use (comment change only)

OpenBSD-Commit-ID: e61795b453d4892d2c99ce1039112c4a00250e03

2 years agoupstream: typo in error message
djm@openbsd.org [Fri, 6 Oct 2023 03:32:15 +0000 (03:32 +0000)] 
upstream: typo in error message

OpenBSD-Regress-ID: 6a8edf0dc39941298e3780b147b10c0a600b4fee

2 years agoupstream: Perform the softhsm2 setup as discrete steps rather than
djm@openbsd.org [Fri, 6 Oct 2023 03:25:14 +0000 (03:25 +0000)] 
upstream: Perform the softhsm2 setup as discrete steps rather than

as a long shell pipeline. Makes it easier to figure out what has happened
when it breaks.

OpenBSD-Regress-ID: b3f1292115fed65765d0a95414df16e27772d81c

2 years agoupstream: REGRESS_FAIL_EARLY defaults to yes now. So no need to
claudio@openbsd.org [Sun, 24 Sep 2023 08:14:13 +0000 (08:14 +0000)] 
upstream: REGRESS_FAIL_EARLY defaults to yes now. So no need to

overload the value here anymore. OK tb@ bluhm@

OpenBSD-Regress-ID: f063330f1bebbcd373100afccebc91a965b14496

2 years agoupstream: spelling fix;
jmc@openbsd.org [Wed, 4 Oct 2023 05:42:10 +0000 (05:42 +0000)] 
upstream: spelling fix;

OpenBSD-Commit-ID: 493f95121567e5ab0d9dd1150f873b5535ca0195

2 years agocrank version numbers V_9_5_P1
Damien Miller [Wed, 4 Oct 2023 04:34:10 +0000 (15:34 +1100)] 
crank version numbers

2 years agoupstream: openssh-9.5
djm@openbsd.org [Wed, 4 Oct 2023 04:04:09 +0000 (04:04 +0000)] 
upstream: openssh-9.5

OpenBSD-Commit-ID: 5e0af680480bd3b6f5560cf840ad032d48fd6b16

2 years agoupstream: add some cautionary text about % token expansion and
djm@openbsd.org [Wed, 4 Oct 2023 04:03:50 +0000 (04:03 +0000)] 
upstream: add some cautionary text about % token expansion and

shell metacharacters; based on report from vinci AT protonmail.ch

OpenBSD-Commit-ID: aa1450a54fcee2f153ef70368d90edb1e7019113

2 years agoupstream: fix link to agent draft; spotted by Jann Horn
djm@openbsd.org [Tue, 3 Oct 2023 23:56:10 +0000 (23:56 +0000)] 
upstream: fix link to agent draft; spotted by Jann Horn

OpenBSD-Commit-ID: ff5bda21a83ec013db683e282256a85201d2dc4b

2 years agouse portable provider allowlist path in manpage
Damien Miller [Tue, 3 Oct 2023 23:54:04 +0000 (10:54 +1100)] 
use portable provider allowlist path in manpage

spotted by Jann Horn

2 years agoupstream: typo; from Jim Spath
deraadt@openbsd.org [Tue, 19 Sep 2023 20:37:07 +0000 (20:37 +0000)] 
upstream: typo; from Jim Spath

OpenBSD-Commit-ID: 2f5fba917b5d4fcf93d9e0b0756c7f63189e228e

2 years agoupstream: rename remote_glob() -> sftp_glob() to match other API
djm@openbsd.org [Sun, 10 Sep 2023 23:12:32 +0000 (23:12 +0000)] 
upstream: rename remote_glob() -> sftp_glob() to match other API

OpenBSD-Commit-ID: d9dfb3708d824ec02970a84d96cf5937e0887229

2 years agoupstream: typo in comment
djm@openbsd.org [Sun, 10 Sep 2023 03:51:55 +0000 (03:51 +0000)] 
upstream: typo in comment

OpenBSD-Commit-ID: 69285e0ce962a7c6b0ab5f17a293c60a0a360a18

2 years agoUse zero-call-used-regs=used with Apple compilers.
Darren Tucker [Sun, 10 Sep 2023 05:45:38 +0000 (15:45 +1000)] 
Use zero-call-used-regs=used with Apple compilers.

Apple's versions of clang have version numbers that do not match the
corresponding upstream clang versions.  Unfortunately, they do still
have the clang-15 zero-call-used-regs=all bug, so for now use the value
that doesn't result in segfaults.  We could allowlist future versions
that are known to work.  bz#3584 (and probably also our github CI
failures).

2 years agoupstream: randomise keystroke obfuscation intervals and average
djm@openbsd.org [Sun, 10 Sep 2023 03:25:53 +0000 (03:25 +0000)] 
upstream: randomise keystroke obfuscation intervals and average

interval rate. ok dtucker@

OpenBSD-Commit-ID: 05f61d051ab418fcfc4857ff306e420037502382

2 years agoupstream: fix sizeof(*ptr) instead sizeof(ptr) in realloc (pointer here
djm@openbsd.org [Fri, 8 Sep 2023 06:34:24 +0000 (06:34 +0000)] 
upstream: fix sizeof(*ptr) instead sizeof(ptr) in realloc (pointer here

is char**, so harmless); spotted in CID 416964

OpenBSD-Commit-ID: c61caa4a5a667ee20bb1042098861e6c72c69002

2 years agoupstream: regress test recursive remote-remote directories copies where
djm@openbsd.org [Fri, 8 Sep 2023 06:10:57 +0000 (06:10 +0000)] 
upstream: regress test recursive remote-remote directories copies where

the directory contains a symlink to another directory.

also remove errant `set -x` that snuck in at some point

OpenBSD-Regress-ID: 1c94a48bdbd633ef2285954ee257725cd7bc456f

2 years agoupstream: fix recursive remote-remote copies of directories that
djm@openbsd.org [Fri, 8 Sep 2023 06:10:02 +0000 (06:10 +0000)] 
upstream: fix recursive remote-remote copies of directories that

contain symlinks to other directories (similar to bz3611)

OpenBSD-Commit-ID: 7e19d2ae09b4f941bf8eecc3955c9120171da37f

2 years agoupstream: regress test for recursive copies of directories containing
djm@openbsd.org [Fri, 8 Sep 2023 05:50:57 +0000 (05:50 +0000)] 
upstream: regress test for recursive copies of directories containing

symlinks to other directories. bz3611, ok dtucker@

OpenBSD-Regress-ID: eaa4c29cc5cddff4e72a16bcce14aeb1ecfc94b9

2 years agoupstream: the sftp code was one of my first contributions to
djm@openbsd.org [Fri, 8 Sep 2023 05:56:13 +0000 (05:56 +0000)] 
upstream: the sftp code was one of my first contributions to

OpenSSH and it shows - the function names are terrible.

Rename do_blah() to sftp_blah() to make them less so.

Completely mechanical except for sftp_stat() and sftp_lstat() which
change from returning a pointer to a static variable (error-prone) to
taking a pointer to a caller-provided receiver.

OpenBSD-Commit-ID: eb54d6a72d0bbba4d623e2175cf5cc4c75dc2ba4

2 years agoupstream: fix scp in SFTP mode recursive upload and download of
djm@openbsd.org [Fri, 8 Sep 2023 05:50:12 +0000 (05:50 +0000)] 
upstream: fix scp in SFTP mode recursive upload and download of

directories that contain symlinks to other directories. In scp mode, the
links would be followed, but in SFTP mode they were not. bz3611, ok dtucker@

OpenBSD-Commit-ID: 9760fda668eaa94a992250d7670dfbc62a45197c

2 years agoupstream: regression test for override of subsystem in match blocks
djm@openbsd.org [Wed, 6 Sep 2023 23:36:09 +0000 (23:36 +0000)] 
upstream: regression test for override of subsystem in match blocks

OpenBSD-Regress-ID: 5f8135da3bfda71067084c048d717b0e8793e87c

2 years agoupstream: allow override of Sybsystem directives in sshd Match
djm@openbsd.org [Wed, 6 Sep 2023 23:35:35 +0000 (23:35 +0000)] 
upstream: allow override of Sybsystem directives in sshd Match

blocks

OpenBSD-Commit-ID: 3911d18a826a2d2fe7e4519075cf3e57af439722

2 years agoupstream: allocate the subsystems array as necessary and remove the
djm@openbsd.org [Wed, 6 Sep 2023 23:26:37 +0000 (23:26 +0000)] 
upstream: allocate the subsystems array as necessary and remove the

fixed limit of subsystems. Saves a few kb of memory in the server and makes
it more like the other options.

OpenBSD-Commit-ID: e683dfca6bdcbc3cc339bb6c6517c0c4736a547f

2 years agoupstream: preserve quoting of Subsystem commands and arguments.
djm@openbsd.org [Wed, 6 Sep 2023 23:23:53 +0000 (23:23 +0000)] 
upstream: preserve quoting of Subsystem commands and arguments.

This may change behaviour of exotic configurations, but the most common
subsystem configuration (sftp-server) is unlikely to be affected.

OpenBSD-Commit-ID: 8ffa296aeca981de5b0945242ce75aa6dee479bf

2 years agoupstream: downgrade duplicate Subsystem directives from being a
djm@openbsd.org [Wed, 6 Sep 2023 23:21:36 +0000 (23:21 +0000)] 
upstream: downgrade duplicate Subsystem directives from being a

fatal error to being a debug message to match behaviour with just about all
other directives.

OpenBSD-Commit-ID: fc90ed2cc0c18d4eb8e33d2c5e98d25f282588ce

2 years agoupstream: handle cr+lf (instead of just cr) in sshsig signature
djm@openbsd.org [Wed, 6 Sep 2023 23:18:15 +0000 (23:18 +0000)] 
upstream: handle cr+lf (instead of just cr) in sshsig signature

files

OpenBSD-Commit-ID: 647460a212b916540016d066568816507375fd7f

2 years agoupstream: Generate Ed25519 keys when invoked without arguments
job@openbsd.org [Mon, 4 Sep 2023 10:29:58 +0000 (10:29 +0000)] 
upstream: Generate Ed25519 keys when invoked without arguments

Ed25519 public keys are very convenient due to their small size.
OpenSSH has supported Ed25519 since version 6.5 (January 2014).

OK djm@ markus@ sthen@ deraadt@

OpenBSD-Commit-ID: f498beaad19c8cdcc357381a60df4a9c69858b3f

2 years agoupstream: trigger keystroke timing obfucation only if the channels
djm@openbsd.org [Mon, 4 Sep 2023 00:08:14 +0000 (00:08 +0000)] 
upstream: trigger keystroke timing obfucation only if the channels

layer enqueud some data in the last poll() cycle; this avoids triggering the
obfuscatior for non-channels data like ClientAlive probes and also fixes a
related problem were the obfucations would be triggered on fully quiescent
connections.

Based on / tested by naddy@

OpenBSD-Commit-ID: d98f32dc62d7663ff4660e4556e184032a0db123

2 years agoupstream: avoid bogus "obfuscate_keystroke_timing: stopping ..."
djm@openbsd.org [Mon, 4 Sep 2023 00:04:02 +0000 (00:04 +0000)] 
upstream: avoid bogus "obfuscate_keystroke_timing: stopping ..."

debug messages when keystroke timing obfuscation was never started; spotted
by naddy@

OpenBSD-Commit-ID: 5c270d35f7d2974db5c1646e9c64188f9393be31

2 years agoupstream: make channel_output_poll() return a flag indicating
djm@openbsd.org [Mon, 4 Sep 2023 00:01:46 +0000 (00:01 +0000)] 
upstream: make channel_output_poll() return a flag indicating

whether channel data was enqueued. Will be used to improve keystroke timing
obfuscation. Problem spotted by / tested by naddy@

OpenBSD-Commit-ID: f9776c7b0065ba7c3bbe50431fd3b629f44314d0

2 years agoupstream: set interactive mode for ControlPersist sessions if they
djm@openbsd.org [Sun, 3 Sep 2023 23:59:32 +0000 (23:59 +0000)] 
upstream: set interactive mode for ControlPersist sessions if they

originally requested a tty; enables keystroke timing obfuscation for most
ControlPersist sessions. Spotted by naddy@

OpenBSD-Commit-ID: 72783a26254202e2f3f41a2818a19956fe49a772

2 years agoSet LLONG_MAX for C89 test.
Darren Tucker [Thu, 31 Aug 2023 13:02:35 +0000 (23:02 +1000)] 
Set LLONG_MAX for C89 test.

If we don't have LLONG_MAX, configure will figure out that it can get it
by setting -std=gnu99, at which point we won't be testing C89 any more.
To avoid this, feed it in via CFLAGS.

2 years agoupstream: make PerSourceMaxStartups first-match-wins; ok dtucker@
djm@openbsd.org [Tue, 29 Aug 2023 02:50:10 +0000 (02:50 +0000)] 
upstream: make PerSourceMaxStartups first-match-wins; ok dtucker@

OpenBSD-Commit-ID: dac0c24cb709e3c595b8b4f422a0355dc5a3b4e7

2 years agoupstream: descriptive text shouldn't be under .Cm
djm@openbsd.org [Mon, 28 Aug 2023 09:52:09 +0000 (09:52 +0000)] 
upstream: descriptive text shouldn't be under .Cm

OpenBSD-Commit-ID: b1afaeb456a52bc8a58f4f9f8b2f9fa8f6bf651b

2 years agoupstream: limit artificial login delay to a reasonable maximum (5s)
djm@openbsd.org [Mon, 28 Aug 2023 09:48:11 +0000 (09:48 +0000)] 
upstream: limit artificial login delay to a reasonable maximum (5s)

and don't delay at all for the "none" authentication mechanism. Patch by
Dmitry Belyavskiy in bz3602 with polish/ok dtucker@

OpenBSD-Commit-ID: 85b364676dd84cf1de0e98fc2fbdcb1a844ce515

2 years agoupstream: add spacing for punctuation when macro args;
jmc@openbsd.org [Mon, 28 Aug 2023 05:32:28 +0000 (05:32 +0000)] 
upstream: add spacing for punctuation when macro args;

OpenBSD-Commit-ID: e80343c16ce0420b2aec98701527cf90371bd0db

2 years agoupstream: explicit long long type in timing calculations (doesn't
djm@openbsd.org [Mon, 28 Aug 2023 04:06:52 +0000 (04:06 +0000)] 
upstream: explicit long long type in timing calculations (doesn't

matter, since the range is pre-clamped)

OpenBSD-Commit-ID: f786ed902d04a5b8ecc581d068fea1a79aa772de

2 years agoupstream: Add keystroke timing obfuscation to the client.
djm@openbsd.org [Mon, 28 Aug 2023 03:31:16 +0000 (03:31 +0000)] 
upstream: Add keystroke timing obfuscation to the client.

This attempts to hide inter-keystroke timings by sending interactive
traffic at fixed intervals (default: every 20ms) when there is only a
small amount of data being sent. It also sends fake "chaff" keystrokes
for a random interval after the last real keystroke. These are
controlled by a new ssh_config ObscureKeystrokeTiming keyword/

feedback/ok markus@

OpenBSD-Commit-ID: 02231ddd4f442212820976068c34a36e3c1b15be

2 years agoupstream: Introduce a transport-level ping facility
djm@openbsd.org [Mon, 28 Aug 2023 03:28:43 +0000 (03:28 +0000)] 
upstream: Introduce a transport-level ping facility

This adds a pair of SSH transport protocol messages SSH2_MSG_PING/PONG
to implement a ping capability. These messages use numbers in the "local
extensions" number space and are advertised using a "ping@openssh.com"
ext-info message with a string version number of "0".

ok markus@

OpenBSD-Commit-ID: b6b3c4cb2084c62f85a8dc67cf74954015eb547f

2 years agoupstream: Log errors in kex_exchange_identification() with level
tobhe@openbsd.org [Mon, 21 Aug 2023 21:16:18 +0000 (21:16 +0000)] 
upstream: Log errors in kex_exchange_identification() with level

verbose instead of error to reduce preauth log spam. All of those get logged
with a more generic error message by sshpkt_fatal().

feedback from sthen@
ok djm@

OpenBSD-Commit-ID: bd47dab4695b134a44c379f0e9a39eed33047809

2 years agoupstream: correct math for ClientAliveInterval that caused the
djm@openbsd.org [Mon, 21 Aug 2023 04:59:54 +0000 (04:59 +0000)] 
upstream: correct math for ClientAliveInterval that caused the

probes to be sent less frequently than configured; from Dawid Majchrzak

OpenBSD-Commit-ID: 641153e7c05117436ddfc58267aa267ca8b80038

2 years agoInclude Portable version in sshd version string.
Darren Tucker [Fri, 25 Aug 2023 04:48:02 +0000 (14:48 +1000)] 
Include Portable version in sshd version string.

bz#3608, ok djm@

2 years agoobsd-arm64 host is real hardware...
Darren Tucker [Mon, 21 Aug 2023 09:47:58 +0000 (19:47 +1000)] 
obsd-arm64 host is real hardware...

so put in the correct config location.

2 years agoAdd OpenBSD ARM64 test host.
Darren Tucker [Mon, 21 Aug 2023 08:38:36 +0000 (18:38 +1000)] 
Add OpenBSD ARM64 test host.

2 years agoAdd test for zlib development branch.
Darren Tucker [Mon, 21 Aug 2023 08:05:26 +0000 (18:05 +1000)] 
Add test for zlib development branch.

2 years agoupstream: want stdlib.h for free(3)
djm@openbsd.org [Mon, 21 Aug 2023 04:36:46 +0000 (04:36 +0000)] 
upstream: want stdlib.h for free(3)

OpenBSD-Commit-ID: 743af3c6e3ce5e6cecd051668f0327a01f44af29

2 years agoFix zlib version check for 1.3 and future version.
Darren Tucker [Fri, 18 Aug 2023 21:39:08 +0000 (07:39 +1000)] 
Fix zlib version check for 1.3 and future version.

bz#3604.

2 years agoAdd 9.4 branch to CI status page.
Darren Tucker [Mon, 14 Aug 2023 01:10:08 +0000 (11:10 +1000)] 
Add 9.4 branch to CI status page.