]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
39 hours agomention sntrup761x25519-sha512 in manpages V_9_4 anongit/V_9_4 github-selfhosted/V_9_4 github/V_9_4
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:16:25 +0000 (16:16 +1000)] 
support sntrup761x25519-sha512 alias

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

23 months 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).

23 months 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@

23 months 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.

23 months 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 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 agodepend V_9_4_P1
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 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

2 years agoUpdate runner OS version for hardenedmalloc test.
Darren Tucker [Thu, 22 Jun 2023 23:49:02 +0000 (09:49 +1000)] 
Update runner OS version for hardenedmalloc test.

Hardenedmalloc dropped support for "legacy glibc" versions in their
64dad0a69 so use a newer Ubuntu version for the runner for that test.

2 years agohandle sysconf(SC_OPEN_MAX) returning > INT_MAX;
Damien Miller [Thu, 22 Jun 2023 05:04:03 +0000 (15:04 +1000)] 
handle sysconf(SC_OPEN_MAX) returning > INT_MAX;

bz3581; ok dtucker

2 years agoupstream: better validate CASignatureAlgorithms in ssh_config and
djm@openbsd.org [Wed, 21 Jun 2023 05:10:26 +0000 (05:10 +0000)] 
upstream: better validate CASignatureAlgorithms in ssh_config and

sshd_config.

Previously this directive would accept certificate algorithm names, but
these were unusable in practice as OpenSSH does not support CA chains.

part of bz3577; ok dtucker@

OpenBSD-Commit-ID: a992d410c8a78ec982701bc3f91043dbdb359912

2 years agoupstream: make `ssh -Q CASignatureAlgorithms` only list signature
djm@openbsd.org [Wed, 21 Jun 2023 05:08:32 +0000 (05:08 +0000)] 
upstream: make `ssh -Q CASignatureAlgorithms` only list signature

algorithms that are valid for CA signing. Previous behaviour was to list all
signing algorithms, including certificate algorithms (OpenSSH certificates do
not support CA chains). part of bz3577; ok dtucker@

OpenBSD-Commit-ID: 99c2b072dbac0f44fd1f2269e3ff6c1b5d7d3e59

2 years agoupstream: handle rlimits > INT_MAX (rlim_t is u64); ok dtucker
djm@openbsd.org [Wed, 21 Jun 2023 05:06:04 +0000 (05:06 +0000)] 
upstream: handle rlimits > INT_MAX (rlim_t is u64); ok dtucker

bz3581

OpenBSD-Commit-ID: 31cf59c041becc0e5ccb0a77106f812c4cd1cd74

2 years agoupstream: prepare for support for connecting to unix domain sockets
djm@openbsd.org [Tue, 20 Jun 2023 23:59:33 +0000 (23:59 +0000)] 
upstream: prepare for support for connecting to unix domain sockets

using ssh -W by explicitly decoding PORT_STREAMLOCAL (a negative number) from
the u32 that's passed over the multiplexing socket; previously code would
just cast, which is UB.

OpenBSD-Commit-ID: e5ac5f40d354096c51e8c118a5c1b2d2b7a31384

2 years agoupstream: reset comment=NULL for each key in do_fingerprint();
djm@openbsd.org [Tue, 20 Jun 2023 00:05:09 +0000 (00:05 +0000)] 
upstream: reset comment=NULL for each key in do_fingerprint();

fixes "no comment" not showing on when running `ssh-keygen -l` on multiple
keys where one has a comment and other following keys do not. Patch from
Markus Kuhn via GHPR407, bz3580

OpenBSD-Commit-ID: 3cce84456fdcd67dc6b84e369f92c6686d111d9b

2 years agoupstream: Store timeouts as int, not u_int as they are limited to
millert@openbsd.org [Mon, 5 Jun 2023 13:24:36 +0000 (13:24 +0000)] 
upstream: Store timeouts as int, not u_int as they are limited to

INT_MAX. Fixes sign compare warnings systems with 32-bit time_t due to type
promotion.  OK djm@

OpenBSD-Commit-ID: 48081e9ad35705c5f1705711704a4c2ff94e87b7

2 years agofixup! if -s & -p specified, mention 'sftp -P' on
Philip Hands [Wed, 24 May 2023 17:41:14 +0000 (19:41 +0200)] 
fixup! if -s & -p specified, mention 'sftp -P' on

success

SSH-Copy-ID-Upstream: 32686e7c65b4fa2846e474d3315102dfa0f043b0

2 years agoMake ssh-copy-id(1) consistent with OpenSSH.
Darren Tucker [Tue, 3 Aug 2021 11:25:48 +0000 (21:25 +1000)] 
Make ssh-copy-id(1) consistent with OpenSSH.

This makes the ssh-copy-id man page more consistent with the rest of the
OpenSSH man pages:
- new sentence, new line
- no sentences >80
- N.B. -> NB
- zap unused .Pp
- zap trailing whitespace

Report from Debian via mindrot bz#3331, diff from jmc at openbsd.org.

SSH-Copy-ID-Upstream: d8974cfb6242316460ed22a1ccc662800a50c5d3

2 years agoif -s & -p specified, mention 'sftp -P' on success
Philip Hands [Wed, 24 May 2023 09:45:43 +0000 (11:45 +0200)] 
if -s & -p specified, mention 'sftp -P' on success

This was inspired by this:
 https://github.com/openssh/openssh-portable/pull/321
but I thought that it was better to not do the sed patching.

BTW the reason one can get away with using $SSH_OPTS throughout, despite
the lowercase -p in there, even if sftp is in use, is that the sftp call
is using the already-established ssh master connection, so the port was
passed to the earlier ssh.

SSH-Copy-ID-Upstream: 1c124d9bfafdbe28a00b683367ebf5750ce12eb2

2 years agodrop whitespace
Philip Hands [Tue, 23 May 2023 21:07:11 +0000 (23:07 +0200)] 
drop whitespace

SSH-Copy-ID-Upstream: e604fae1cdee35c18055d35dcec530cf12ef00ad

2 years agomake -x also apply to the target script
Philip Hands [Tue, 23 May 2023 18:52:13 +0000 (20:52 +0200)] 
make -x also apply to the target script

SSH-Copy-ID-Upstream: 3c4214704f427bd0654adf9b0fc079253db21cf4

2 years agoadd -t option to specify the target path
Philip Hands [Tue, 23 May 2023 14:46:42 +0000 (16:46 +0200)] 
add -t option to specify the target path

Allow the default target path (.ssh/authorized_files) to be over-riden

This was inspired by this MR from Panagiotis Cheilaris <philaris@cs.ntua.gr>

 https://gitlab.com/phil_hands/ssh-copy-id/-/merge_requests/8

SSH-Copy-ID-Upstream: a942a0e076874adb6d8b2f0fb76d6c7918190fcd

2 years agoFix test error for /bin/sh on Solaris 10 and older
Carlos Rodríguez Gili [Tue, 20 Apr 2021 17:23:57 +0000 (19:23 +0200)] 
Fix test error for /bin/sh on Solaris 10 and older

On Solaris 10 and older targets /bin/sh is not POSIX-compliant.
Test -z `...` fails with error 'sh: test: argument expected'.
Using quotes around backticks fixes this and doesn't break
POSIX compatibility.

SSH-Copy-ID-Upstream: 98394072a3f985b2650c1e8eab2fef84e38cc065

2 years agoRemove outdated comment
Jakub Jelen [Tue, 2 Mar 2021 21:34:05 +0000 (21:34 +0000)] 
Remove outdated comment

The commit b068122 removed the code dropping the trailing colon, but the comment stayed leaving the code confusing for future readers

SSH-Copy-ID-Upstream: 930d39f238117cd53810240ec989d0356aa1c1f6

2 years agoSpecial case OpenWrt instead of Dropbear.
Darren Tucker [Wed, 10 May 2023 08:50:46 +0000 (18:50 +1000)] 
Special case OpenWrt instead of Dropbear.

OpenWrt overrides the location of authorized_keys for root.  Currently we
assume that all Dropbear installations behave this way, which is not the
case.  Check for OpenWrt and root user before using that location instead
of assuming that for all Dropbear servers.  Prompted by Github PR#250.

SSH-Copy-ID-Upstream: 0e1f5d443a9967483c33945793107ae3f3e4af2d

2 years agossh-copy-id: add -x option (for debugging)
Philip Hands [Thu, 18 May 2023 16:20:55 +0000 (18:20 +0200)] 
ssh-copy-id: add -x option (for debugging)

This option causes the ssh-copy-id to run with set -x

SSH-Copy-ID-Upstream: a0ee367ea8c0a29c8b4515245e408d2d349e7844

2 years agoupdate copyright notices
Philip Hands [Thu, 18 May 2023 15:14:41 +0000 (17:14 +0200)] 
update copyright notices

SSH-Copy-ID-Upstream: c284ed33b361814ea48ff68cbd01ca525b2bf117

2 years agoupstream: fix AuthorizedPrincipalsCommand when AuthorizedKeysCommand
djm@openbsd.org [Wed, 24 May 2023 23:01:06 +0000 (23:01 +0000)] 
upstream: fix AuthorizedPrincipalsCommand when AuthorizedKeysCommand

appears previously in configuration. Reported by John Meyers in bz3574 ok
dtucker@

OpenBSD-Commit-ID: 1c92e4517284386703936e1d3abaa36cfacf1951

2 years agoupstream: Remove unused prototypes for ssh1 RSA functions.
dtucker@openbsd.org [Wed, 10 May 2023 10:04:20 +0000 (10:04 +0000)] 
upstream: Remove unused prototypes for ssh1 RSA functions.

From lengyijun via github PR#396.

OpenBSD-Commit-ID: 379a5afa8b7a0f3cba0c8a9bcceb4e5e33a5c1ef

2 years agomain(void) to prevent unused variable warning.
Darren Tucker [Tue, 9 May 2023 09:26:56 +0000 (19:26 +1000)] 
main(void) to prevent unused variable warning.

2 years agoRemove warning pragma since clang doesn't like it.
Darren Tucker [Tue, 9 May 2023 09:25:45 +0000 (19:25 +1000)] 
Remove warning pragma since clang doesn't like it.

2 years agoSuppress warning for snprintf truncation test.
Darren Tucker [Tue, 9 May 2023 07:13:33 +0000 (17:13 +1000)] 
Suppress warning for snprintf truncation test.

2 years agoUpdate OpenSSL compat test for 3.x.
Darren Tucker [Tue, 9 May 2023 07:12:50 +0000 (17:12 +1000)] 
Update OpenSSL compat test for 3.x.

2 years agoAdd macos13 PAM test target.
Darren Tucker [Mon, 8 May 2023 10:23:08 +0000 (20:23 +1000)] 
Add macos13 PAM test target.

2 years agoSkip agent-peereid test on macos13.
Darren Tucker [Mon, 8 May 2023 10:14:46 +0000 (20:14 +1000)] 
Skip agent-peereid test on macos13.

sudo -S nobody doesn't work on the github runners (probably a
permission issue) so skip that test.

2 years agoInclude config.guess in debug output.
Darren Tucker [Mon, 8 May 2023 10:14:28 +0000 (20:14 +1000)] 
Include config.guess in debug output.

2 years agoHandle OpenSSL >=3 ABI compatibility.
Darren Tucker [Mon, 8 May 2023 10:12:59 +0000 (20:12 +1000)] 
Handle OpenSSL >=3 ABI compatibility.

Beyond OpenSSL 3.0, the ABI compatibility guarantees are wider (only
major must match instead of major and minor in earlier versions).
bz#3548, ok djm@

2 years agoupstream: Import regenerated moduli.
dtucker@openbsd.org [Mon, 1 May 2023 08:57:29 +0000 (08:57 +0000)] 
upstream: Import regenerated moduli.

OpenBSD-Commit-ID: 3d5f811cfcaed8cc4a97e1db49ac61bdf118113c

2 years agoAdd macos-13 test target.
Darren Tucker [Mon, 1 May 2023 01:45:14 +0000 (11:45 +1000)] 
Add macos-13 test target.

Also flatten OS list for clarity.

2 years agoupstream: adjust ftruncate() logic to handle servers that reorder
djm@openbsd.org [Sun, 30 Apr 2023 22:54:22 +0000 (22:54 +0000)] 
upstream: adjust ftruncate() logic to handle servers that reorder

requests.

sftp/scp will ftruncate the destination file after a transfer completes,
to deal with the case where a longer destination file already existed.
We tracked the highest contiguous block transferred to deal with this
case, but our naive tracking doesn't deal with servers that reorder
requests - a misfeature strictly permitted by the protocol but seldom
implemented.

Adjust the logic to ftruncate() at the highest absolute block received
when the transfer is successful. feedback deraadt@ ok markus@

prompted by https://github.com/openssh/openssh-portable/commit/9b733#commitcomment-110679778

OpenBSD-Commit-ID: 4af7fac75958ad8507b4fea58706f3ff0cfddb1b

2 years agoupstream: Check for ProxyJump=none in CanonicalizeHostname logic.
djm@openbsd.org [Wed, 26 Apr 2023 01:36:03 +0000 (01:36 +0000)] 
upstream: Check for ProxyJump=none in CanonicalizeHostname logic.

Previously ssh would incorrectly refuse to canonicalise the hostname
if ProxyJump was explicitly set to "none" when CanonicalizeHostname=yes

bz3567; ok dtucker

OpenBSD-Commit-ID: 80a58e43c3a32f97361282f756ec8d3f37989efd

2 years agoupstream: remove duplicate signal.h include
jsg@openbsd.org [Wed, 12 Apr 2023 14:22:04 +0000 (14:22 +0000)] 
upstream: remove duplicate signal.h include

OpenBSD-Commit-ID: 30c0a34d74d91ddd0e6992525da70d3293392f70

2 years agoupstream: fix double words ok dtucker@
jsg@openbsd.org [Wed, 12 Apr 2023 08:53:54 +0000 (08:53 +0000)] 
upstream: fix double words ok dtucker@

OpenBSD-Commit-ID: 44d3223902fbce5276422bdc8063ab72a4078489

2 years agoTest against LibreSSL 3.7.2.
Darren Tucker [Tue, 11 Apr 2023 06:49:19 +0000 (16:49 +1000)] 
Test against LibreSSL 3.7.2.

2 years agoremove unused upper-case const strings in fmtfp
Damien Miller [Thu, 6 Apr 2023 04:33:10 +0000 (14:33 +1000)] 
remove unused upper-case const strings in fmtfp

no float format that uses upper-case is supported nor are hex floats.
ok dtucker

2 years agoupstream: simplify sshsig_find_principals() similar to what happened to
djm@openbsd.org [Thu, 6 Apr 2023 03:56:02 +0000 (03:56 +0000)] 
upstream: simplify sshsig_find_principals() similar to what happened to

sshsig_check_allowed_keys() in r1.31, removing some dead code

OpenBSD-Commit-ID: a493e628d4d6c08f878c276d998f4313ba61702d

2 years agoupstream: remove redundant ssh!=NULL check; we'd already
djm@openbsd.org [Thu, 6 Apr 2023 03:21:31 +0000 (03:21 +0000)] 
upstream: remove redundant ssh!=NULL check; we'd already

dereferenced it

OpenBSD-Commit-ID: 852bf12591ec5a9fb12dcbde9b1fd3945ad0df3c

2 years agoupstream: match_user() shouldn't be called with user==NULL unless
djm@openbsd.org [Thu, 6 Apr 2023 03:19:32 +0000 (03:19 +0000)] 
upstream: match_user() shouldn't be called with user==NULL unless

host and ipaddr are also NULL

OpenBSD-Commit-ID: fa3518346c21483e9e01a2e4b9436ae501daf8ea