]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
8 months agoCreate replacement time.h if needed.
Darren Tucker [Fri, 5 Sep 2025 07:55:33 +0000 (17:55 +1000)] 
Create replacement time.h if needed.

Remove #ifdef HAVE_TIME_H wrapper.  ok djm@

8 months agoCreate replacement sys/stat.h if needed.
Darren Tucker [Fri, 5 Sep 2025 07:50:18 +0000 (17:50 +1000)] 
Create replacement sys/stat.h if needed.

Remove #ifdef HAVE_SYS_STAT_H wrapper.  ok djm@

8 months agoCreate replacement sys/time.h if needed.
Darren Tucker [Fri, 5 Sep 2025 07:44:07 +0000 (17:44 +1000)] 
Create replacement sys/time.h if needed.

Remove #ifdef HAVE_SYS_TIME_H wrapper.  ok djm@

8 months agoCreate replacement ifaddrs.h if needed.
Darren Tucker [Fri, 5 Sep 2025 07:31:15 +0000 (17:31 +1000)] 
Create replacement ifaddrs.h if needed.

Remove #ifdef HAVE_IFADDRS_H wrapper.  ok djm@

8 months agoCreate replacement util.h if needed.
Darren Tucker [Fri, 5 Sep 2025 07:27:43 +0000 (17:27 +1000)] 
Create replacement util.h if needed.

Remove #ifdef HAVE_UTIL_H wrapper.  ok djm@

8 months agoCreate replacement paths.h if needed.
Darren Tucker [Fri, 5 Sep 2025 07:24:50 +0000 (17:24 +1000)] 
Create replacement paths.h if needed.

Remove #ifdef HAVE_PATHS_H wrapper.  ok djm@

8 months agoCreate replacement poll.h if needed.
Darren Tucker [Fri, 5 Sep 2025 07:17:52 +0000 (17:17 +1000)] 
Create replacement poll.h if needed.

Remove #ifdef HAVE_POLL_H wrapper.  ok djm@

8 months agoFill in missing system header files.
Darren Tucker [Fri, 5 Sep 2025 07:06:14 +0000 (17:06 +1000)] 
Fill in missing system header files.

Create replacement header files inside openbsd-compat for common headers
that are missing on a given platform.  Usually these are just empty,
but in some cases they'll include the equivalent file.  This avoids
having to wrap those includes in '#ifdef HAVE_FOO_H' and reduces the
diff vs OpenBSD.

If we create any such headers, add the path to includes.

Initially just stdint.h, more to follow.

ok djm@

8 months agoupstream: repair test after changes to percent expansion of usernames
djm@openbsd.org [Thu, 4 Sep 2025 03:04:44 +0000 (03:04 +0000)] 
upstream: repair test after changes to percent expansion of usernames

on the commandline.

Test more cases that should/shouldn't expand and lightly test
username validity checks.

OpenBSD-Regress-ID: ad4c12c70bdf1f959abfebd1637ecff1b49a484c

8 months agoupstream: unit tests for sshbuf_equals and sshbuf_dtourlb64; ok
djm@openbsd.org [Thu, 4 Sep 2025 00:37:10 +0000 (00:37 +0000)] 
upstream: unit tests for sshbuf_equals and sshbuf_dtourlb64; ok

deraadt@

OpenBSD-Regress-ID: bab54e2d4caa813036a63ee67e92c93e6712a5b9

8 months agoupstream: unit tests for a bunch of misc.c functions; ok deraadt@
djm@openbsd.org [Thu, 4 Sep 2025 00:34:17 +0000 (00:34 +0000)] 
upstream: unit tests for a bunch of misc.c functions; ok deraadt@

OpenBSD-Regress-ID: 886cf142605405e777ee77a96b48694dc2e9235d

8 months agoupstream: fix sshbuf_dtourlb64() to not choke on empty buffers;
djm@openbsd.org [Thu, 4 Sep 2025 00:32:31 +0000 (00:32 +0000)] 
upstream: fix sshbuf_dtourlb64() to not choke on empty buffers;

previously it incorrectly returned an error in this situation; ok deraadt

OpenBSD-Commit-ID: e62773d6e8cb95a19aab54f0af0edbcd47b345c0

8 months agoupstream: fix rtrim() function to not attempt to delete whitespace
djm@openbsd.org [Thu, 4 Sep 2025 00:31:49 +0000 (00:31 +0000)] 
upstream: fix rtrim() function to not attempt to delete whitespace

inside a string, just at the end. ok deraadt@

OpenBSD-Commit-ID: d44deaa43580cd88de978dd5509b14e905b67b84

8 months agoupstream: don't allow \0 characters in url-encoded strings.
djm@openbsd.org [Thu, 4 Sep 2025 00:30:06 +0000 (00:30 +0000)] 
upstream: don't allow \0 characters in url-encoded strings.

Suggested by David Leadbeater, ok deraadt@

OpenBSD-Commit-ID: c92196cef0f970ceabc1e8007a80b01e9b7cd49c

8 months agoupstream: Improve rules for %-expansion of username.
djm@openbsd.org [Thu, 4 Sep 2025 00:29:09 +0000 (00:29 +0000)] 
upstream: Improve rules for %-expansion of username.

Usernames passed on the commandline will no longer be subject to
% expansion. Some tools invoke ssh with connection information
(i.e. usernames and host names) supplied from untrusted sources.
These may contain % expansion sequences which could yield
unexpected results.

Since openssh-9.6, all usernames have been subject to validity
checking. This change tightens the validity checks by refusing
usernames that include control characters (again, these can cause
surprises when supplied adversarially).

This change also relaxes the validity checks in one small way:
usernames supplied via the configuration file as literals (i.e.
include no % expansion characters) are not subject to these
validity checks. This allows usernames that contain arbitrary
characters to be used, but only via configuration files. This
is done on the basis that ssh's configuration is trusted.

Pointed out by David Leadbeater, ok deraadt@

OpenBSD-Commit-ID: e2f0c871fbe664aba30607321575e7c7fc798362

8 months agomissing header
Damien Miller [Tue, 2 Sep 2025 23:42:39 +0000 (09:42 +1000)] 
missing header

8 months agoupstream: simplify algorithm list functions using xextendf(); ok
djm@openbsd.org [Tue, 2 Sep 2025 11:08:34 +0000 (11:08 +0000)] 
upstream: simplify algorithm list functions using xextendf(); ok

dtucker@

OpenBSD-Commit-ID: ffc5f8d0c25b95705a8a66c8b634f98d23bd92dc

8 months agoupstream: unit test for xextendf()
djm@openbsd.org [Tue, 2 Sep 2025 11:04:58 +0000 (11:04 +0000)] 
upstream: unit test for xextendf()

OpenBSD-Regress-ID: ddb3b4db1a52dda23696b967470882fe2b9c3af7

8 months agoupstream: fix comment on sshbuf_froms() - it *returns* an error
djm@openbsd.org [Tue, 2 Sep 2025 09:41:23 +0000 (09:41 +0000)] 
upstream: fix comment on sshbuf_froms() - it *returns* an error

code, the allocated buffer is passed via argument

OpenBSD-Commit-ID: b2b0a76df71328f39c3e2ad941a4d87085d8335d

8 months agoupstream: GssStrictAcceptor was missing from sshd -T output; fix
djm@openbsd.org [Tue, 2 Sep 2025 09:40:19 +0000 (09:40 +0000)] 
upstream: GssStrictAcceptor was missing from sshd -T output; fix

OpenBSD-Commit-ID: 6014049ccfedc48a208e37d5488ade6bdc2d1c44

8 months agoportable-specific comment grammer/spelling fixes
Damien Miller [Tue, 2 Sep 2025 09:38:39 +0000 (19:38 +1000)] 
portable-specific comment grammer/spelling fixes

8 months agoupstream: grammar and typos in comments
djm@openbsd.org [Tue, 2 Sep 2025 09:34:48 +0000 (09:34 +0000)] 
upstream: grammar and typos in comments

OpenBSD-Commit-ID: de954daffcd0147ce142d55e8a374810cd19d7ed

8 months agoreplace remaining manual logging of __func__
Damien Miller [Tue, 2 Sep 2025 09:30:07 +0000 (19:30 +1000)] 
replace remaining manual logging of __func__

Use the appropriate log macro that prepends the function name
(e.g. logit_f/debug2_f/etc).

8 months agoupstream: replace remaining cases where we manually included __func__
djm@openbsd.org [Tue, 2 Sep 2025 09:26:21 +0000 (09:26 +0000)] 
upstream: replace remaining cases where we manually included __func__

in a debug or error log with the respective *_f log variant

OpenBSD-Commit-ID: 46a280d78bcc0bc98f28e65a30b613366600328f

8 months agoupstream: test MaxStatups idempotency; ok dtucker@
djm@openbsd.org [Mon, 1 Sep 2025 23:55:29 +0000 (23:55 +0000)] 
upstream: test MaxStatups idempotency; ok dtucker@

OpenBSD-Regress-ID: b5d713c2709000fa5e41d82c0cf8627e13cb43f9

8 months agoupstream: benchmark more diffie-hellman-group* KEXs
djm@openbsd.org [Thu, 21 Aug 2025 05:55:30 +0000 (05:55 +0000)] 
upstream: benchmark more diffie-hellman-group* KEXs

use current KEX names, i.e. remove the "@openssh.com" where the KEX
has been standardised

OpenBSD-Regress-ID: a67e9da4efd9a971d39cb2481093f836046f9b7f

8 months agoupstream: fix previous
djm@openbsd.org [Tue, 2 Sep 2025 01:03:43 +0000 (01:03 +0000)] 
upstream: fix previous

OpenBSD-Commit-ID: 09d95dfb5e064a1d0e74afba8d77474cc1d110a4

8 months agoupstream: Make MaxStartups and PerSourceNetBlockSize first-match-wins
djm@openbsd.org [Mon, 1 Sep 2025 23:53:16 +0000 (23:53 +0000)] 
upstream: Make MaxStartups and PerSourceNetBlockSize first-match-wins

as advertised. bz3859 reported by jan.v.hofmann; ok dtucker

OpenBSD-Commit-ID: 08f7786f1b3b4a05a106cdbd2dc5f1f2d8299447

9 months agoupstream: remove experimental support for XMSS keys;
djm@openbsd.org [Fri, 29 Aug 2025 03:50:38 +0000 (03:50 +0000)] 
upstream: remove experimental support for XMSS keys;

ok deraadt markus

OpenBSD-Commit-ID: 38eaf4df6189acad9e46eddf7cf32d7f6d07df35

9 months agoupstream: ssh_config.5: say "post-quantum" instead of "post quantum
caspar@openbsd.org [Mon, 18 Aug 2025 18:39:33 +0000 (18:39 +0000)] 
upstream: ssh_config.5: say "post-quantum" instead of "post quantum

safe", and rephrase the sentence to make it easier to read.

Input djm@, input and OK deraadt@, OK dtucker@

OpenBSD-Commit-ID: c3ee4d1cafdcfc20cc0d2f086021efce4b19c075

9 months agoupstream: Delete unused accessor function
job@openbsd.org [Mon, 18 Aug 2025 09:16:36 +0000 (09:16 +0000)] 
upstream: Delete unused accessor function

OK dtucker@

OpenBSD-Commit-ID: 93b59ac088fb254e1189729ece5bb9656d6e810b

9 months agoFix pledge(2) special casing
Damien Miller [Mon, 18 Aug 2025 07:00:26 +0000 (17:00 +1000)] 
Fix pledge(2) special casing

Unbreaks non-OpenBSD platforms

9 months agoMatch version instead of groups in connect-bigconf
Damien Miller [Mon, 18 Aug 2025 06:47:23 +0000 (16:47 +1000)] 
Match version instead of groups in connect-bigconf

The connect-bigconf makes a giant config file to test config passing
between the sshd subprocesses. Previously it used a bunch of "Match
group" lines to construct a large file. However checking group
membership can be expensive (e.g. if a large groups database is
present or if group lookup is remote via NSS). This could be slow
enough to exceed LoginGraceTime.

This switches it to "Match version" which is just a string compare
and does just as well for making a giant nonsense config file.

9 months agodepend
Damien Miller [Mon, 18 Aug 2025 06:47:00 +0000 (16:47 +1000)] 
depend

9 months agocheck for setsockopt IP_TOS in OpenBSD pledge
Damien Miller [Mon, 18 Aug 2025 06:45:15 +0000 (16:45 +1000)] 
check for setsockopt IP_TOS in OpenBSD pledge

OpenBSD has recently relaxed the pledge(2) sandbox to allow some
setsockopt options to be changed without the "inet" promise.

This adds compatibility for OpenBSD that predates this relaxation.

9 months agoupstream: cast
djm@openbsd.org [Mon, 18 Aug 2025 04:50:35 +0000 (04:50 +0000)] 
upstream: cast

OpenBSD-Commit-ID: d69bd2328513c2dcd99f4f346b77e2bd90cf1964

9 months agoupstream: missing set_log_handler() call in ssh-auth.c, exposed after
djm@openbsd.org [Mon, 18 Aug 2025 04:38:21 +0000 (04:38 +0000)] 
upstream: missing set_log_handler() call in ssh-auth.c, exposed after

last commit

OpenBSD-Commit-ID: 09f5c3cf33c18b8ad321edbf96c30ae3deada2b0

9 months agodepend
Damien Miller [Mon, 18 Aug 2025 04:22:32 +0000 (14:22 +1000)] 
depend

9 months agowrap SIGINFO in ifdef
Damien Miller [Mon, 18 Aug 2025 04:22:18 +0000 (14:22 +1000)] 
wrap SIGINFO in ifdef

9 months agoupstream: Make ssh(1) and sshd(8) set IP QoS (aka IP_TOS, IPV6_TCLASS)
djm@openbsd.org [Mon, 18 Aug 2025 03:43:01 +0000 (03:43 +0000)] 
upstream: Make ssh(1) and sshd(8) set IP QoS (aka IP_TOS, IPV6_TCLASS)

continually at runtime based on what sessions/channels are open.

Previously, ssh(1) and sshd(8) would pick a QoS value when they
were started and use it for the whole connection. This could
produce suboptimal choices for the QoS value, e.g. for multiplexed
sessions that started interactive but picked up a sftp client,
or sessions that moved large amounts of data via port forwarding.

Now the QoS value will change to the non-interactive IPQoS whenever
a "non-interactive" channel is open; basically any channel that lacks
a tty other than agent forwarding.

This is important now that the default interactive IPQoS is EF
(Expedited Forwarding), as many networks are configured to allow
only relatively small amounts of traffic of this class and they will
aggressively deprioritise the entire connection if this is exceeded.

NB. because ssh(1) and sshd(8) now change IP_TOS/IPV6_TCLASS
continually via setsockopt(), this commit requires a recent pledge(2)
change that landed recently in the OpenBSD kernel. Please ensure
you have updated to a kernel from within the last two weeks before
updating OpenSSH.

with job@ deraadt@

OpenBSD-Commit-ID: 325fc41717eecdf5e4b534bfa8d66817425b840f

9 months agoupstream: SIGINFO handler for sshd(8) to dump active
djm@openbsd.org [Mon, 18 Aug 2025 03:29:11 +0000 (03:29 +0000)] 
upstream: SIGINFO handler for sshd(8) to dump active

channels/sessions ok deraadt@

OpenBSD-Commit-ID: 9955cb6d157c6d7aa23a819e8ef61b1edabc8b7d

9 months agoupstream: SIGINFO handler for ssh(1) to dump active
djm@openbsd.org [Mon, 18 Aug 2025 03:28:36 +0000 (03:28 +0000)] 
upstream: SIGINFO handler for ssh(1) to dump active

channels/sessions ok deraadt@

OpenBSD-Commit-ID: 12f88a5044bca40ef5f41ff61b1755d0e25df901

9 months agoupstream: add channel_report_open() to report (to logs) open
djm@openbsd.org [Mon, 18 Aug 2025 03:28:02 +0000 (03:28 +0000)] 
upstream: add channel_report_open() to report (to logs) open

channels; ok deraadt@ (as part of bigger diff)

OpenBSD-Commit-ID: 7f691e25366c5621d7ed6f7f9018d868f7511c0d

9 months agoupstream: make -E a no-op in sshd-auth. Redirecting logging to a
djm@openbsd.org [Mon, 18 Aug 2025 01:59:53 +0000 (01:59 +0000)] 
upstream: make -E a no-op in sshd-auth. Redirecting logging to a

file doesn't work in this program as logging already goes via the parent
sshd-session process. ok dtucker@

OpenBSD-Commit-ID: 73325b9e69364117c18305f896c620a3abcf4f87

9 months agoallow some socket syscalls in seccomp sandbox
Damien Miller [Mon, 18 Aug 2025 03:46:37 +0000 (13:46 +1000)] 
allow some socket syscalls in seccomp sandbox

Allow getsockname(2), getpeername(2) and getsockopt(2).

Also allow setsockopt(2) but only IP_TOS and IPV6_TCLASS.

Note that systems that use the older socketcall(2) mux syscall will
not have IP_TOS and IPV6_TCLASS allowlisted. On these platforms,
these calls will be soft-blocked (i.e. will fail rather than
terminate the whole process with a sandbox violation).

Needed for upcoming IPQoS change; ok dtucker@

9 months agohandle futex_time64 properly in seccomp sandbox
Damien Miller [Mon, 18 Aug 2025 03:44:53 +0000 (13:44 +1000)] 
handle futex_time64 properly in seccomp sandbox

Previously we only allowed __NR_futex, but some 32-bit systems
apparently support __NR_futex_time64. We had support for this
in the sandbox, but because of a macro error only __NR_futex was
allowlisted.

ok dtucker@

9 months agoupstream: Cast serial no for %lld to prevent compiler warnings on some
dtucker@openbsd.org [Thu, 14 Aug 2025 10:03:44 +0000 (10:03 +0000)] 
upstream: Cast serial no for %lld to prevent compiler warnings on some

platforms.

OpenBSD-Commit-ID: afadd741622f16c6733d461c0d6053ed52868a57

9 months agoupstream: Cast serial no for %lld to prevent compiler warnings on some
dtucker@openbsd.org [Thu, 14 Aug 2025 09:44:39 +0000 (09:44 +0000)] 
upstream: Cast serial no for %lld to prevent compiler warnings on some

platforms.

OpenBSD-Commit-ID: 46c6063284d318f7e4dc922479a3e394c94b0588

9 months agoupstream: Cast serial no for %lld to prevent compiler warnings on some
dtucker@openbsd.org [Thu, 14 Aug 2025 09:26:53 +0000 (09:26 +0000)] 
upstream: Cast serial no for %lld to prevent compiler warnings on some

platforms.

OpenBSD-Commit-ID: 15644234b58abc9c6da2994f0422a5aa344a9e89

9 months agoupstream: fix typo, ok markus dtucker
sthen@openbsd.org [Tue, 12 Aug 2025 11:09:48 +0000 (11:09 +0000)] 
upstream: fix typo, ok markus dtucker

OpenBSD-Commit-ID: 8f223da7633752162c64a659c6cf55202703d870

9 months agoupstream: Handle localtime_r() failure by return "UNKNOWN-TIME"
deraadt@openbsd.org [Mon, 11 Aug 2025 14:37:43 +0000 (14:37 +0000)] 
upstream: Handle localtime_r() failure by return "UNKNOWN-TIME"

which is only used in user-visible contexts.  freebsd 288773 shows their
localtime_r() has failed at least once for unknown reason. discussed with djm

OpenBSD-Commit-ID: 68f4c92d46b2578d4594b0ed940958d597fd61ac

9 months agoupstream: ssh(1): add a warning when the connection negotiates a
djm@openbsd.org [Mon, 11 Aug 2025 10:55:38 +0000 (10:55 +0000)] 
upstream: ssh(1): add a warning when the connection negotiates a

non-post quantum safe key agreement algorithm.

Controlled via a new WarnWeakCrypto ssh_config option, defaulting
to on. This option might grow additional weak crypto warnings in
the future.

More details at https://openssh.com/pq.html

mostly by deraadt@ feedback dtucker@ ok deraadt@

OpenBSD-Commit-ID: 974ff243a1eccceac6a1a9d8fab3bcc89d74a2a4

9 months agoupstream: all state related to the ssh connection should live in
djm@openbsd.org [Wed, 6 Aug 2025 23:44:09 +0000 (23:44 +0000)] 
upstream: all state related to the ssh connection should live in

struct ssh or struct packet_state; one static int escaped this rule, so move
it to struct packet_state now.

ok millert tb

OpenBSD-Commit-ID: bd6737168bf61a836ffbdc99ee4803468db90a53

9 months agoupstream: Improve sentence. ok djm@
dtucker@openbsd.org [Wed, 6 Aug 2025 11:22:53 +0000 (11:22 +0000)] 
upstream: Improve sentence. ok djm@

OpenBSD-Commit-ID: 9c481ddd6bad110af7e530ba90db41f6d5fe2273

9 months agoupstream: when refusing a certificate for user authentication, log
djm@openbsd.org [Wed, 6 Aug 2025 04:53:04 +0000 (04:53 +0000)] 
upstream: when refusing a certificate for user authentication, log

enough information to identify the certificate in addition to the reason why
it was being denied. Makes debugging certificate authz problems a bit easier.

ok dlg@

OpenBSD-Commit-ID: 4c4621b2e70412754b3fe7540af8f4bf02b722b1

9 months agoupstream: Use the operating system default DSCP marking for
job@openbsd.org [Tue, 5 Aug 2025 09:08:16 +0000 (09:08 +0000)] 
upstream: Use the operating system default DSCP marking for

non-interactive traffic

It seems the CS1 traffic class mark is considered ambiguous and therefore
somewhat unhelpful (see RFC 8622 for more considerations). But, the new
'LE' scavenger class (also proposed in RFC 8622) offers high probability
of excessive delays & high packet loss, which would be inappropriate
for use with, for example, X11 forwardings. In fact, it is not known to
SSH what's appropriate because SSH is not aware of the content of what
passing through session forwardings. Therefore, no marking is appropriate.
Non-interactive traffic simply is best effort.

OK djm@ deraadt@

OpenBSD-Commit-ID: db1da1a432ecd53fc28feb84287aedb6bec80b01

9 months agoupstream: a bunch of the protocol extensions we support now have RFCs 553/head
djm@openbsd.org [Tue, 5 Aug 2025 04:00:15 +0000 (04:00 +0000)] 
upstream: a bunch of the protocol extensions we support now have RFCs

and I-Ds that are more complete and detailed than what we have in the
PROTOCOL.* files. Refer to these when possible instead of documenting them
here.

OpenBSD-Commit-ID: 4fa5b0fcf5d5f24093d33d9e82c7ca4850d50d70

9 months agoupstream: Deprecate support for IPv4 type-of-service (TOS) IPQoS
job@openbsd.org [Thu, 31 Jul 2025 11:23:39 +0000 (11:23 +0000)] 
upstream: Deprecate support for IPv4 type-of-service (TOS) IPQoS

keywords

Type of Service (ToS) was deprecated in the late nineties and replaced
with the Differentiated Services architecture. Diffserv has significant
advantages for operators because this mechanism offers more granularity.

OpenSSH switched its default IPQoS from ToS to DSCP values in 2018.

IPQoS configurations with 'lowdelay', 'reliability', or 'throughput' will be
ignored and instead the system default QoS settings apply. Additionally, a
debug message is logged about the deprecation with a suggestion to use DSCP.

with/OK deraadt@ sthen@ djm@

OpenBSD-Commit-ID: 40c8c0c5cb20151a348728703536af2ec1c754ba

9 months agoupstream: Set default IPQoS for interactive sessions to Expedited
job@openbsd.org [Thu, 31 Jul 2025 09:38:41 +0000 (09:38 +0000)] 
upstream: Set default IPQoS for interactive sessions to Expedited

Forwarding (EF)

Marking interactive session data with DSCP value EF (RFC3246, RFC3247)
helps inform the network on relative priority compared to other traffic.
This is especially useful for differentiated treatment over wireless media.

Following the reconciled IETF Diffserv to IEEE 802.11 mappings (RFC 8325),
traffic marked with DSCP value EF maps to User Priority 6 in QoS Control,
in turn mapping to the high priority WMM AC_VO access category.

OK djm@

OpenBSD-Commit-ID: aadda7b9da794d70d7c6b381a861a0610afce1b3

9 months agoDisable security key tests for bigendian interop
Darren Tucker [Sat, 2 Aug 2025 04:49:00 +0000 (14:49 +1000)] 
Disable security key tests for bigendian interop

9 months agoComment out atime restore test.
Darren Tucker [Sat, 2 Aug 2025 02:51:42 +0000 (12:51 +1000)] 
Comment out atime restore test.

This works on filesystems mounted 'noatime', but on others the stat()
resets atime causing the test to fail.

10 months agoReplace fbsd64ppc VM with physical host.
Darren Tucker [Fri, 1 Aug 2025 09:29:00 +0000 (19:29 +1000)] 
Replace fbsd64ppc VM with physical host.

Run 64bit bigendian interop test on NetBSD arm64be instead.

10 months agoupstream: Plug leak in case where sigp is passed as NULL. Coverity CID
dtucker@openbsd.org [Wed, 30 Jul 2025 10:17:13 +0000 (10:17 +0000)] 
upstream: Plug leak in case where sigp is passed as NULL. Coverity CID

483725, ok djm@

OpenBSD-Commit-ID: 47cf7b399c84e102b670b9f97ab6926c9a7256b5

10 months agoupstream: unbreak WITH_OPENSSL=no builds, also allowing ed25519
djm@openbsd.org [Wed, 30 Jul 2025 04:27:42 +0000 (04:27 +0000)] 
upstream: unbreak WITH_OPENSSL=no builds, also allowing ed25519

keys to be used via PKCS#11 when OpenSSH is built without libcrypto.

OpenBSD-Commit-ID: ecf26fdf7591bf2c98bac5136fbc36e0b59c3fc2

10 months agoupstream: fix variable name in disabled code
djm@openbsd.org [Wed, 30 Jul 2025 04:19:17 +0000 (04:19 +0000)] 
upstream: fix variable name in disabled code

OpenBSD-Commit-ID: 5612e979575d5da933c8b720d296423fd84392f5

10 months agomore ec/ed25519 fixing
Damien Miller [Sat, 26 Jul 2025 09:19:46 +0000 (19:19 +1000)] 
more ec/ed25519 fixing

10 months agorepair build for libcrypto without ed25519 support
Damien Miller [Sat, 26 Jul 2025 04:27:53 +0000 (14:27 +1000)] 
repair build for libcrypto without ed25519 support

10 months agoupstream: regression tests for Ed25519 keys in PKCS#11 tokens
djm@openbsd.org [Sat, 26 Jul 2025 01:53:31 +0000 (01:53 +0000)] 
upstream: regression tests for Ed25519 keys in PKCS#11 tokens

OpenBSD-Regress-ID: 50067c0716abfea3a526b4a0c8f1fe15e7665c0f

10 months agoupstream: Support ed25519 keys hosted on PKCS#11 tokens.
djm@openbsd.org [Sat, 26 Jul 2025 01:51:44 +0000 (01:51 +0000)] 
upstream: Support ed25519 keys hosted on PKCS#11 tokens.

Tested on Yubikeys and against SoftHSM2.

feedback/ok tb@

OpenBSD-Commit-ID: 90ddb6529f2e12e98e8bba21d8592e60579ce2e4

10 months agoupstream: update our PKCS#11 API header to v3.0;
djm@openbsd.org [Fri, 25 Jul 2025 13:06:07 +0000 (13:06 +0000)] 
upstream: update our PKCS#11 API header to v3.0;

feedback/ok tb@

OpenBSD-Commit-ID: e67fa6a26e515c2b1fb7b0d1519d138aafb3e017

10 months agoanother attempt at fixing !EC builds
Damien Miller [Fri, 25 Jul 2025 13:04:33 +0000 (23:04 +1000)] 
another attempt at fixing !EC builds

10 months agoupstream: Don't snprintf a NULL since not all platforms support it.
dtucker@openbsd.org [Fri, 25 Jul 2025 11:50:45 +0000 (11:50 +0000)] 
upstream: Don't snprintf a NULL since not all platforms support it.

OpenBSD-Commit-ID: 6e0c268e40047e96fab6bc56dc340580b537183b

10 months agounbreak !EC builds
Damien Miller [Fri, 25 Jul 2025 06:21:43 +0000 (16:21 +1000)] 
unbreak !EC builds

10 months agoupstream: test code now needs to link ssh-pkcs11-client.c any time
djm@openbsd.org [Thu, 24 Jul 2025 06:04:47 +0000 (06:04 +0000)] 
upstream: test code now needs to link ssh-pkcs11-client.c any time

sshkey.c is included

OpenBSD-Regress-ID: 9d07188eae9a96801c3150b3433bb220626d4443

10 months agoupdate clang-16 -> clang-19
Damien Miller [Fri, 25 Jul 2025 02:47:17 +0000 (12:47 +1000)] 
update clang-16 -> clang-19

10 months agoinclude ssh-pkcs11-client.o as common dep
Damien Miller [Fri, 25 Jul 2025 02:46:59 +0000 (12:46 +1000)] 
include ssh-pkcs11-client.o as common dep

10 months agoremove vestigial stub
Damien Miller [Fri, 25 Jul 2025 02:46:10 +0000 (12:46 +1000)] 
remove vestigial stub

10 months agoupstream: this should include stdlib.h explicitly
djm@openbsd.org [Thu, 24 Jul 2025 23:27:04 +0000 (23:27 +0000)] 
upstream: this should include stdlib.h explicitly

OpenBSD-Commit-ID: 1c0cc5c3838344b33ae4ab7aa62c01530357bf29

10 months agoupstream: less stale reference to PKCS#1 1.5 hash OIDs; feedback
djm@openbsd.org [Thu, 24 Jul 2025 06:59:51 +0000 (06:59 +0000)] 
upstream: less stale reference to PKCS#1 1.5 hash OIDs; feedback

from tb@

OpenBSD-Commit-ID: 9fda77978491a130a7b77d87d40c79277b796721

10 months agoupstream: factor out encoding of a raw ed25519 signature into its
djm@openbsd.org [Thu, 24 Jul 2025 06:12:08 +0000 (06:12 +0000)] 
upstream: factor out encoding of a raw ed25519 signature into its

ssh form into a separate function

OpenBSD-Commit-ID: 3711c6d6b52dde0bd1f17884da5cddb8716f1b64

10 months agoupstream: Help OpenSSH's PKCS#11 support kick its meth habit.
djm@openbsd.org [Thu, 24 Jul 2025 05:44:55 +0000 (05:44 +0000)] 
upstream: Help OpenSSH's PKCS#11 support kick its meth habit.

The PKCS#11 code in OpenSSH used the libcrypto public key method API
(e.g. the delightfully named RSA_meth_free()) to delegate signing
operations to external keys. This had one advantage - that it was
basically transparent to callers, but also had a big disadvantage -
that we'd manually have to track the method implementations, their
state and their relationships to the underlying PKCS#11 objects.

This rips this out and replaces it with explicit delegation to
PKCS#11 code for externally hosted keys via the ssh-pkcs11-helper
subprocess. This is very similar to how we handle FIDO keys in
OpenSSH (i.e. via ssh-sk-helper). All we need to track now is a
much simpler mapping of public key -> helper subprocess.

Kicking our libcrypto meth dependency also makes it much easier
to support Ed25519 keys in PKCS#11, which will happen in a subsequent
commit.

feedback / ok tb@

OpenBSD-Commit-ID: a5a1eaf57971cf15e0cdc5a513e313541c8a35f0

10 months agoRemove DEBUG_ACTIONS variable.
Darren Tucker [Thu, 24 Jul 2025 12:02:49 +0000 (22:02 +1000)] 
Remove DEBUG_ACTIONS variable.

If needed it can be set in github if needed.

10 months agoupstream: add a ssh_config RefuseConnection option that, when
djm@openbsd.org [Wed, 23 Jul 2025 05:07:19 +0000 (05:07 +0000)] 
upstream: add a ssh_config RefuseConnection option that, when

encountered while processing an active section in a configuration file,
terminates ssh(1) with an error message that contains the argument to the
option.

This may be useful for expressing reminders or warnings in config
files, for example:

Match host foo
       RefuseConnection "foo is deprecated, use splork instead"

ok djg

OpenBSD-Commit-ID: 5b0072fcd08ad3932ab21e27bbaa66b008d44237

10 months agoupstream: Add missing inter-library dependencies to LDADD and
miod@openbsd.org [Sat, 12 Jul 2025 05:28:33 +0000 (05:28 +0000)] 
upstream: Add missing inter-library dependencies to LDADD and

DPADD. ok tb@ deraadt@

OpenBSD-Commit-ID: a05e13a7e2c0b65bb4b47184fef731243431c6ff

10 months agoAdd gnome-ssh-askpass4 for GNOME 40+
Jan Tojnar [Thu, 18 May 2023 14:30:35 +0000 (16:30 +0200)] 
Add gnome-ssh-askpass4 for GNOME 40+

GTK 3 has been in maintenance mode for a while now, and it is on the road
to being abandoned. As a result, the dialogue looks out of place on modern
systems.

We could port it to GTK 4 but without the program being registered as an
application (i.e. having a .desktop file), GNOME Shell would ask for
permission to grab input every time.

Let’s instead use the GNOME Shell’s native prompt through the unstable
Gcr API.

10 months agolet ga_init() fail gracefully if getgrouplist does
Damien Miller [Sat, 12 Jul 2025 00:20:27 +0000 (17:20 -0700)] 
let ga_init() fail gracefully if getgrouplist does

Apparently getgrouplist() can fail on OSX for when passed a non-existent
group name. Other platforms seem to return a group list consisting of
the numeric gid passed to the function.

This makes ga_init() handle this failure case gracefully, where it will
return success but with an empty group list array.

bz3848; ok dtucker@

10 months agoupstream: add a "Match Group NoSuchGroup" to exercise groupaccess.c
djm@openbsd.org [Fri, 11 Jul 2025 23:26:59 +0000 (23:26 +0000)] 
upstream: add a "Match Group NoSuchGroup" to exercise groupaccess.c

OpenBSD-Regress-ID: 7ff58e6f0eb21eb9064dd0cfa78c3b6f34b5f713

10 months agomore diagnostics when getgrouplist fails
Damien Miller [Fri, 11 Jul 2025 22:36:49 +0000 (15:36 -0700)] 
more diagnostics when getgrouplist fails

10 months agoupstream: Fix mistracking of MaxStartups process exits in some
djm@openbsd.org [Fri, 4 Jul 2025 09:51:01 +0000 (09:51 +0000)] 
upstream: Fix mistracking of MaxStartups process exits in some

situations. At worst, this can cause all MaxStartups slots to fill and sshd
to refuse new connections.

Diagnosis by xnor; ok dtucker@

OpenBSD-Commit-ID: 10273033055552557196730f898ed6308b36a78d

10 months agoAdd include for gssapi definitions.
Darren Tucker [Sat, 5 Jul 2025 10:50:50 +0000 (20:50 +1000)] 
Add include for gssapi definitions.

Patch from dbelyavs at redhat.com via bz#3846.

10 months agoupstream: add a regress test for configurations > 256KB
djm@openbsd.org [Fri, 4 Jul 2025 07:52:17 +0000 (07:52 +0000)] 
upstream: add a regress test for configurations > 256KB

mostly by Dmitry Belyavskiy

OpenBSD-Regress-ID: fcedb249e4cf2447e078a839877f99730ee79024

10 months agoupstream: the messaging layer between sshd-session and sshd-auth had a
djm@openbsd.org [Fri, 4 Jul 2025 07:47:35 +0000 (07:47 +0000)] 
upstream: the messaging layer between sshd-session and sshd-auth had a

maximum message size of 256KB. Some people apparently have configurations
larger than this and would hit this limit.

Worse, there was no good logging that could help diagnose what was
going wrong.

So this bumps the maximum message size to 4MB and implements an early
check (usable via the sshd -t test mode) that will report it to the
user where it is hopefully more visible.

bz3808, reported by Dmitry Belyavskiy, ok dtucker@

OpenBSD-Commit-ID: 69c303fb68cbd1a4735936835d67a71e7b57f63b

10 months agoupstream: mux: fix incorrect return value check in local forward
djm@openbsd.org [Fri, 4 Jul 2025 00:17:55 +0000 (00:17 +0000)] 
upstream: mux: fix incorrect return value check in local forward

cancellation

channel_cancel_lport_listener() returns 1 on success and 0 on failure.
The previous code incorrectly checked for `== -1`, a value the function
never returns, so failure was not detected and the "port not found"
error message was never shown when cancelling dynamic or local port
forwards.

From: Boris Tonofa <b.tonofa@ideco.ru>

OpenBSD-Commit-ID: 3e9d2252a4d0bd318d4f25e2b518afb44acea170

11 months agowrap some autoconf macros in AC_CACHE_CHECK
Damien Miller [Wed, 2 Jul 2025 03:47:38 +0000 (13:47 +1000)] 
wrap some autoconf macros in AC_CACHE_CHECK

This allows skipping/overriding the OSSH_CHECK_CFLAG_COMPILE and
OSSH_CHECK_CFLAG_LINK macros used to discover supported compiler
or linker flags. E.g.

  $ ./configure ossh_cv_cflag__fzero_call_used_regs_used=no
  [...]
  checking if cc supports compile flag -ftrapv and linking succeeds... yes
  checking if cc supports compile flag -fzero-call-used-regs=used and linking succeeds... (cached) no
  checking if cc supports compile flag -ftrivial-auto-var-init=zero... yes

Patch from Colin Watson, ok dtucker@

11 months agoupstream: Add shebang path to askpass script. Required for exec on
dtucker@openbsd.org [Sun, 29 Jun 2025 08:20:21 +0000 (08:20 +0000)] 
upstream: Add shebang path to askpass script. Required for exec on

some platforms (musl, probably others).

OpenBSD-Regress-ID: 35cdeed12ae701afcb812f800c04d817325cd22a

11 months agoupstream: Check dropbear server version for required features.
dtucker@openbsd.org [Sun, 29 Jun 2025 05:35:00 +0000 (05:35 +0000)] 
upstream: Check dropbear server version for required features.

Dropbear added the '-D' flag in version 2025.87.  We need that for the
dropbear-server test, so skip on older versions.

OpenBSD-Regress-ID: 9db0b84edd54d3c00ab17db1dc6d62af4644c550

11 months agoEncrypt temporary password we're setting.
Darren Tucker [Sun, 29 Jun 2025 04:34:48 +0000 (14:34 +1000)] 
Encrypt temporary password we're setting.

Now that we want to actually use the random password for tests, we need
to correctly encrypt it, instead of just setting it to a random string
that's not the "locked" value.

11 months agoFix env again.
Darren Tucker [Sun, 29 Jun 2025 01:27:17 +0000 (11:27 +1000)] 
Fix env again.

11 months agoMove env again.
Darren Tucker [Sun, 29 Jun 2025 01:24:42 +0000 (11:24 +1000)] 
Move env again.

11 months agoMove env to where it (hopefully) belongs.
Darren Tucker [Sun, 29 Jun 2025 01:22:00 +0000 (11:22 +1000)] 
Move env to where it (hopefully) belongs.