]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
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.

2 years agoupstream: fix regression in OpenSSH 9.4 (mux.c r1.99) that caused
djm@openbsd.org [Fri, 18 Aug 2023 01:37:41 +0000 (01:37 +0000)] 
upstream: fix regression in OpenSSH 9.4 (mux.c r1.99) that caused

multiplexed sessions to ignore SIGINT under some circumstances. Reported by /
feedback naddy@, ok dtucker@

OpenBSD-Commit-ID: 4d5c6c894664f50149153fd4764f21f43e7d7e5a

2 years agoupstream: defence-in-depth MaxAuthTries check in monitor; ok markus
djm@openbsd.org [Wed, 16 Aug 2023 16:14:11 +0000 (16:14 +0000)] 
upstream: defence-in-depth MaxAuthTries check in monitor; ok markus

OpenBSD-Commit-ID: 65a4225dc708e2dae71315adf93677edace46c21

2 years agoupstream: add message number of SSH2_MSG_NEWCOMPRESS defined in RFC8308
djm@openbsd.org [Mon, 14 Aug 2023 03:37:00 +0000 (03:37 +0000)] 
upstream: add message number of SSH2_MSG_NEWCOMPRESS defined in RFC8308

OpenBSD-Commit-ID: 6c984171c96ed67effd7b5092f3d3975d55d6028

2 years agoAdd obsd72 and obsd73 test targets.
Darren Tucker [Sun, 13 Aug 2023 05:01:27 +0000 (15:01 +1000)] 
Add obsd72 and obsd73 test targets.

2 years agoupstream: better debug logging of sessions' exit status
djm@openbsd.org [Thu, 10 Aug 2023 23:05:48 +0000 (23:05 +0000)] 
upstream: better debug logging of sessions' exit status

OpenBSD-Commit-ID: 82237567fcd4098797cbdd17efa6ade08e1a36b0

2 years agoupstream: drop a wayward comma, ok jmc@
naddy@openbsd.org [Thu, 10 Aug 2023 14:37:32 +0000 (14:37 +0000)] 
upstream: drop a wayward comma, ok jmc@

OpenBSD-Commit-ID: 5c11fbb9592a29b37bbf36f66df50db9d38182c6

2 years agodepend
Damien Miller [Thu, 10 Aug 2023 01:10:22 +0000 (11:10 +1000)] 
depend

2 years agoupdate versions in RPM specs
Damien Miller [Thu, 10 Aug 2023 01:05:42 +0000 (11:05 +1000)] 
update versions in RPM specs

2 years agoupdate version in README
Damien Miller [Thu, 10 Aug 2023 01:05:14 +0000 (11:05 +1000)] 
update version in README

2 years agoupstream: openssh-9.4
djm@openbsd.org [Thu, 10 Aug 2023 01:01:07 +0000 (01:01 +0000)] 
upstream: openssh-9.4

OpenBSD-Commit-ID: 71fc1e01a4c4ea061b252bd399cda7be757e6e35

2 years agoOnly include unistd.h once.
Darren Tucker [Thu, 10 Aug 2023 01:30:24 +0000 (11:30 +1000)] 
Only include unistd.h once.

2 years agowrap poll.h include in HAVE_POLL_H
Damien Miller [Wed, 9 Aug 2023 23:08:49 +0000 (09:08 +1000)] 
wrap poll.h include in HAVE_POLL_H

2 years agoupstream: Apply ConnectTimeout to multiplexing local socket
dtucker@openbsd.org [Fri, 4 Aug 2023 06:32:40 +0000 (06:32 +0000)] 
upstream: Apply ConnectTimeout to multiplexing local socket

connections.  If the multiplex socket exists but the connection times out,
ssh will fall back to a direct connection the same way it would if the socket
did not exist at all.  ok djm@

OpenBSD-Commit-ID: 2fbe1a36d4a24b98531b2d298a6557c8285dc1b4

2 years agoFix RNG seeding for OpenSSL w/out self seeding.
Darren Tucker [Thu, 3 Aug 2023 09:35:33 +0000 (19:35 +1000)] 
Fix RNG seeding for OpenSSL w/out self seeding.

When sshd is built with an OpenSSL that does not self-seed, it would
fail in the preauth privsep process while handling a new connection.
Sanity checked by djm@

2 years agoupstream: CheckHostIP has defaulted to 'no' for a while; make the
djm@openbsd.org [Wed, 2 Aug 2023 23:04:38 +0000 (23:04 +0000)] 
upstream: CheckHostIP has defaulted to 'no' for a while; make the

commented- out config option match. From Ed Maste

OpenBSD-Commit-ID: e66e934c45a9077cb1d51fc4f8d3df4505db58d9

2 years agoupstream: remove unnecessary if statement.
dtucker@openbsd.org [Tue, 1 Aug 2023 08:15:04 +0000 (08:15 +0000)] 
upstream: remove unnecessary if statement.

github PR#422 from eyalasulin999, ok djm@

OpenBSD-Commit-ID: 2b6b0dde4407e039f58f86c8d2ff584a8205ea55

2 years agoupstream: %C is a callable macro in mdoc(7)
jmc@openbsd.org [Fri, 28 Jul 2023 05:42:36 +0000 (05:42 +0000)] 
upstream: %C is a callable macro in mdoc(7)

so, as we do for %D, escape it;

OpenBSD-Commit-ID: 538cfcddbbb59dc3a8739604319491dcb8e0c0c9

2 years agoupstream: don't need to start a command here; use ssh -N instead.
djm@openbsd.org [Fri, 28 Jul 2023 05:33:15 +0000 (05:33 +0000)] 
upstream: don't need to start a command here; use ssh -N instead.

Fixes failure on cygwin spotted by Darren

OpenBSD-Regress-ID: ff678a8cc69160a3b862733d935ec4a383f93cfb

2 years agoupstream: add LTESTS_FROM variable to allow skipping of tests up to
djm@openbsd.org [Wed, 17 May 2023 05:52:01 +0000 (05:52 +0000)] 
upstream: add LTESTS_FROM variable to allow skipping of tests up to

a specific point. e.g. "make LTESTS_FROM=t-sftp" will only run the sftp.sh
test and subsequent ones. ok dtucker@

OpenBSD-Regress-ID: 07f653de731def074b29293db946042706fcead3

2 years agoupstream: test ChrootDirectory in Match block
djm@openbsd.org [Fri, 12 May 2023 06:37:42 +0000 (06:37 +0000)] 
upstream: test ChrootDirectory in Match block

OpenBSD-Regress-ID: a6150262f39065939f025e546af2a346ffe674c1

2 years agoupstream: better error messages
djm@openbsd.org [Fri, 12 May 2023 06:36:27 +0000 (06:36 +0000)] 
upstream: better error messages

OpenBSD-Regress-ID: 55e4186604e80259496d841e690ea2090981bc7a

2 years agoupstream: don't incorrectly truncate logged strings retrieved from
djm@openbsd.org [Thu, 27 Jul 2023 22:26:49 +0000 (22:26 +0000)] 
upstream: don't incorrectly truncate logged strings retrieved from

PKCS#11 modules; based on GHPR406 by Jakub Jelen; ok markus

OpenBSD-Commit-ID: 7ed1082f23a13b38c373008f856fd301d50012f9

2 years agoupstream: make sshd_config AuthorizedPrincipalsCommand and
djm@openbsd.org [Thu, 27 Jul 2023 22:25:17 +0000 (22:25 +0000)] 
upstream: make sshd_config AuthorizedPrincipalsCommand and

AuthorizedKeysCommand accept the %D (routing domain) and a new %C (connection
address/port 4-tuple) as expansion sequences; ok markus

OpenBSD-Commit-ID: ee9a48bf1a74c4ace71b69de69cfdaa2a7388565

2 years agoupstream: increase default KDF work-factor for OpenSSH format
djm@openbsd.org [Thu, 27 Jul 2023 22:23:05 +0000 (22:23 +0000)] 
upstream: increase default KDF work-factor for OpenSSH format

private keys from 16 to 24; { feedback ok } x { deraadt markus }

OpenBSD-Commit-ID: a3afb1383f8ff0a49613d449f02395d9e8d4a9ec

2 years agoPrefer OpenSSL's SHA256 in sk-dummy.so
Darren Tucker [Wed, 26 Jul 2023 16:25:09 +0000 (02:25 +1000)] 
Prefer OpenSSL's SHA256 in sk-dummy.so

Previously sk-dummy.so used libc's (or compat's) SHA256 since it may be
built without OpenSSL.  In many cases, however, including both libc's
and OpenSSL's headers together caused conflicting definitions.

We tried working around this (on OpenSSL <1.1 you could define
OPENSSL_NO_SHA, NetBSD had USE_LIBC_SHA2, various #define hacks) with
varying levels of success.  Since OpenSSL >=1.1 removed OPENSSL_NO_SHA
and including most OpenSSL headers would bring sha.h in, even if it
wasn't used directly this was a constant hassle.

Admit defeat and use OpenSSL's SHA256 unless we aren't using OpenSSL at
all.  ok djm@

2 years agoRetire dfly58 test VM. Add dfly64.
Darren Tucker [Thu, 27 Jul 2023 00:29:44 +0000 (10:29 +1000)] 
Retire dfly58 test VM.  Add dfly64.

2 years agoupstream: make ssh -f (fork after authentication) work properly in
djm@openbsd.org [Wed, 26 Jul 2023 23:06:00 +0000 (23:06 +0000)] 
upstream: make ssh -f (fork after authentication) work properly in

multiplexed cases (inc. ControlPersist). bz3589 bz3589 Based on patches by
Peter Chubb; ok dtucker@

OpenBSD-Commit-ID: a7a2976a54b93e6767dc846b85647e6ec26969ac

2 years agoupstream: man page typos; ok jmc@
naddy@openbsd.org [Sun, 23 Jul 2023 20:04:45 +0000 (20:04 +0000)] 
upstream: man page typos; ok jmc@

OpenBSD-Commit-ID: e6ddfef94b0eb867ad88abe07cedc8ed581c07f0

2 years agoupstream: tweak the allow-remote-pkcs11 text;
jmc@openbsd.org [Thu, 20 Jul 2023 05:43:39 +0000 (05:43 +0000)] 
upstream: tweak the allow-remote-pkcs11 text;

OpenBSD-Commit-ID: bc965460a89edf76865b7279b45cf9cbdebd558a

2 years agoHandle a couple more OpenSSL no-ecc cases.
Darren Tucker [Tue, 25 Jul 2023 03:00:22 +0000 (13:00 +1000)] 
Handle a couple more OpenSSL no-ecc cases.

ok djm@

2 years agodepend
Damien Miller [Thu, 20 Jul 2023 02:53:44 +0000 (12:53 +1000)] 
depend

2 years agoBring back OPENSSL_HAS_ECC to ssh-pkcs11-client
Damien Miller [Thu, 20 Jul 2023 02:53:21 +0000 (12:53 +1000)] 
Bring back OPENSSL_HAS_ECC to ssh-pkcs11-client

2 years agoupstream: Separate ssh-pkcs11-helpers for each p11 module
djm@openbsd.org [Wed, 19 Jul 2023 14:03:45 +0000 (14:03 +0000)] 
upstream: Separate ssh-pkcs11-helpers for each p11 module

Make ssh-pkcs11-client start an independent helper for each provider,
providing better isolation between modules and reliability if a single
module misbehaves.

This also implements reference counting of PKCS#11-hosted keys,
allowing ssh-pkcs11-helper subprocesses to be automatically reaped
when no remaining keys reference them. This fixes some bugs we have
that make PKCS11 keys unusable after they have been deleted, e.g.
https://bugzilla.mindrot.org/show_bug.cgi?id=3125

ok markus@

OpenBSD-Commit-ID: 0ce188b14fe271ab0568f4500070d96c5657244e

2 years agoupstream: Ensure FIDO/PKCS11 libraries contain expected symbols
djm@openbsd.org [Wed, 19 Jul 2023 14:02:27 +0000 (14:02 +0000)] 
upstream: Ensure FIDO/PKCS11 libraries contain expected symbols

This checks via nlist(3) that candidate provider libraries contain one
of the symbols that we will require prior to dlopen(), which can cause
a number of side effects, including execution of constructors.

Feedback deraadt; ok markus

OpenBSD-Commit-ID: 1508a5fbd74e329e69a55b56c453c292029aefbe

2 years agoupstream: Disallow remote addition of FIDO/PKCS11 provider
djm@openbsd.org [Wed, 19 Jul 2023 13:56:33 +0000 (13:56 +0000)] 
upstream: Disallow remote addition of FIDO/PKCS11 provider

libraries to ssh-agent by default.

The old behaviour of allowing remote clients from loading providers
can be restored using `ssh-agent -O allow-remote-pkcs11`.

Detection of local/remote clients requires a ssh(1) that supports
the `session-bind@openssh.com` extension. Forwarding access to a
ssh-agent socket using non-OpenSSH tools may circumvent this control.

ok markus@

OpenBSD-Commit-ID: 4c2bdf79b214ae7e60cc8c39a45501344fa7bd7c

2 years agoupstream: terminate process if requested to load a PKCS#11 provider
djm@openbsd.org [Wed, 19 Jul 2023 13:55:53 +0000 (13:55 +0000)] 
upstream: terminate process if requested to load a PKCS#11 provider

that isn't a PKCS#11 provider; from / ok markus@

OpenBSD-Commit-ID: 39532cf18b115881bb4cfaee32084497aadfa05c

2 years agoagent_fuzz doesn't want stdint.h conditionalised
Damien Miller [Wed, 19 Jul 2023 02:07:18 +0000 (12:07 +1000)] 
agent_fuzz doesn't want stdint.h conditionalised

2 years agoconditionalise stdint.h inclusion on HAVE_STDINT_H
Damien Miller [Tue, 18 Jul 2023 05:41:12 +0000 (15:41 +1000)] 
conditionalise stdint.h inclusion on HAVE_STDINT_H

fixes build on AIX5 at least

2 years agoconditionalise match localnetwork on ifaddrs.h
Damien Miller [Tue, 18 Jul 2023 05:30:45 +0000 (15:30 +1000)] 
conditionalise match localnetwork on ifaddrs.h

Fixes build breakage on platforms that lack getifaddrs()

2 years agoupstream: missing match localnetwork negation check
djm@openbsd.org [Mon, 17 Jul 2023 06:16:33 +0000 (06:16 +0000)] 
upstream: missing match localnetwork negation check

OpenBSD-Commit-ID: 9a08ed8dae27d3f38cf280f1b28d4e0ff41a737a

2 years agoupstream: - add -P to usage() - sync the arg name to -J in usage()
jmc@openbsd.org [Mon, 17 Jul 2023 05:41:53 +0000 (05:41 +0000)] 
upstream: - add -P to usage() - sync the arg name to -J in usage()

with that in ssh.1 - reformat usage() to match what "man ssh" does on 80width

OpenBSD-Commit-ID: 5235dd7aa42e5bf90ae54579d519f92fc107036e

2 years agoupstream: -P before -p in SYNOPSIS;
jmc@openbsd.org [Mon, 17 Jul 2023 05:38:10 +0000 (05:38 +0000)] 
upstream: -P before -p in SYNOPSIS;

OpenBSD-Commit-ID: 535f5257c779e26c6a662a038d241b017f8cab7c

2 years agoupstream: configuation -> configuration
jsg@openbsd.org [Mon, 17 Jul 2023 05:36:14 +0000 (05:36 +0000)] 
upstream: configuation -> configuration

OpenBSD-Commit-ID: 4776ced33b780f1db0b2902faec99312f26a726b

2 years agoupstream: move other RCSIDs to before their respective license blocks
djm@openbsd.org [Mon, 17 Jul 2023 05:26:38 +0000 (05:26 +0000)] 
upstream: move other RCSIDs to before their respective license blocks

too no code change

OpenBSD-Commit-ID: ef5bf46b57726e4260a63b032b0b5ac3b4fe9cd4

2 years agoupstream: Move RCSID to before license block and away from #includes,
djm@openbsd.org [Mon, 17 Jul 2023 05:22:30 +0000 (05:22 +0000)] 
upstream: Move RCSID to before license block and away from #includes,

where it caused merge conflict in -portable for each commit :(

OpenBSD-Commit-ID: 756ebac963df3245258b962e88150ebab9d5fc20

2 years agoupstream: return SSH_ERR_KRL_BAD_MAGIC when a KRL doesn't contain a
djm@openbsd.org [Mon, 17 Jul 2023 05:20:15 +0000 (05:20 +0000)] 
upstream: return SSH_ERR_KRL_BAD_MAGIC when a KRL doesn't contain a

valid magic number and not SSH_ERR_MESSAGE_INCOMPLETE; the former is needed
to fall back to text revocation lists in some cases; fixes t-cert-hostkey.

OpenBSD-Commit-ID: 5c670a6c0f027e99b7774ef29f18ba088549c7e1

2 years agoavoid AF_LINK on platforms that don't define it
Damien Miller [Mon, 17 Jul 2023 04:56:14 +0000 (14:56 +1000)] 
avoid AF_LINK on platforms that don't define it

2 years agoupstream: Add support for configuration tags to ssh(1).
djm@openbsd.org [Mon, 17 Jul 2023 04:08:31 +0000 (04:08 +0000)] 
upstream: Add support for configuration tags to ssh(1).

This adds a ssh_config(5) "Tag" directive and corresponding
"Match tag" predicate that may be used to select blocks of
configuration similar to the pf.conf(5) keywords of the same
name.

ok markus

OpenBSD-Commit-ID: dc08358e70e702b59ac3e591827e5a96141b06a3

2 years agoupstream: add a "match localnetwork" predicate.
djm@openbsd.org [Mon, 17 Jul 2023 04:04:36 +0000 (04:04 +0000)] 
upstream: add a "match localnetwork" predicate.

This allows matching on the addresses of available network interfaces
and may be used to vary the effective client configuration based on
network location (e.g. to use a ProxyJump when not on a particular
network).

ok markus@

OpenBSD-Commit-ID: cffb6ff9a3803abfc52b5cad0aa190c5e424c139

2 years agoupstream: remove vestigal support for KRL signatures
djm@openbsd.org [Mon, 17 Jul 2023 04:01:10 +0000 (04:01 +0000)] 
upstream: remove vestigal support for KRL signatures

When the KRL format was originally defined, it included support for
signing of KRL objects. However, the code to sign KRLs and verify KRL
signatues was never completed in OpenSSH.

Now, some years later, we have SSHSIG support in ssh-keygen that is
more general, well tested and actually works. So this removes the
semi-finished KRL signing/verification support from OpenSSH and
refactors the remaining code to realise the benefit - primarily, we
no longer need to perform multiple parsing passes over KRL objects.

ok markus@

OpenBSD-Commit-ID: 517437bab3d8180f695c775410c052340e038804

2 years agoupstream: Support for KRL extensions.
djm@openbsd.org [Mon, 17 Jul 2023 03:57:21 +0000 (03:57 +0000)] 
upstream: Support for KRL extensions.

This defines wire formats for optional KRL extensions and implements
parsing of the new submessages. No actual extensions are supported at
this point.

ok markus

OpenBSD-Commit-ID: ae2fcde9a22a9ba7f765bd4f36b3f5901d8c3fa7

2 years agoupstream: Include stdint.h for SIZE_MAX. Fixes OPENSSL=no build.
dtucker@openbsd.org [Fri, 14 Jul 2023 07:44:21 +0000 (07:44 +0000)] 
upstream: Include stdint.h for SIZE_MAX. Fixes OPENSSL=no build.

OpenBSD-Commit-ID: e7c31034a5434f2ead3579b13a7892960651e6b0

2 years agoFix typo in declaration of nmesg.
Darren Tucker [Fri, 14 Jul 2023 07:07:32 +0000 (17:07 +1000)] 
Fix typo in declaration of nmesg.

2 years agoportable-specific int overflow defence-in-depth
Damien Miller [Fri, 14 Jul 2023 05:34:47 +0000 (15:34 +1000)] 
portable-specific int overflow defence-in-depth

These too are unreachable, but we want the code to be safe regardless of
context. Reported by Yair Mizrahi @ JFrog

2 years agoupstream: add defence-in-depth checks for some unreachable integer
djm@openbsd.org [Fri, 14 Jul 2023 05:31:44 +0000 (05:31 +0000)] 
upstream: add defence-in-depth checks for some unreachable integer

overflows reported by Yair Mizrahi @ JFrog; feedback/ok millert@

OpenBSD-Commit-ID: 52af085f4e7ef9f9d8423d8c1840a6a88bda90bd

2 years agoupstream: misplaced debug message
djm@openbsd.org [Mon, 10 Jul 2023 04:51:26 +0000 (04:51 +0000)] 
upstream: misplaced debug message

OpenBSD-Commit-ID: d0f12af0a5067a756aa707bc39a83fa6f58bf7e5

2 years agoreplace deprecate selinux matchpathcon function
Damien Miller [Wed, 12 Jul 2023 01:41:19 +0000 (11:41 +1000)] 
replace deprecate selinux matchpathcon function

This function is apparently deprecated. Documentation on what is the
supposed replacement is is non-existent, so this follows the approach
glibc used https://sourceware.org/git/?p=glibc.git;a=patch;h=f278835f59

ok dtucker@

2 years agoupstream: minleft and maxsign are u_int so cast appropriately. Prompted
dtucker@openbsd.org [Thu, 6 Jul 2023 22:17:59 +0000 (22:17 +0000)] 
upstream: minleft and maxsign are u_int so cast appropriately. Prompted

by github PR#410, ok deraadt.

OpenBSD-Commit-ID: 0514cd51db3ec60239966622a0d3495b15406ddd

2 years agoupstream: add support for unix domain sockets to ssh -W
dlg@openbsd.org [Tue, 4 Jul 2023 03:59:21 +0000 (03:59 +0000)] 
upstream: add support for unix domain sockets to ssh -W

ok djm@ dtucker@

OpenBSD-Commit-ID: 3e6d47567b895c7c28855c7bd614e106c987a6d8

2 years agogss-serv.c: `MAXHOSTNAMELEN` -> `HOST_NAME_MAX`
David Seifert [Fri, 12 May 2023 12:06:01 +0000 (14:06 +0200)] 
gss-serv.c: `MAXHOSTNAMELEN` -> `HOST_NAME_MAX`

`MAXHOSTNAMELEN` is not defined in POSIX, which breaks on musl:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/gethostname.html

Bug: https://bugs.gentoo.org/834044