]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
11 months agodepend
Damien Miller [Mon, 18 Aug 2025 06:47:00 +0000 (16:47 +1000)] 
depend

11 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.

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

OpenBSD-Commit-ID: d69bd2328513c2dcd99f4f346b77e2bd90cf1964

11 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

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

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

11 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

11 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

11 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

11 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

11 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

11 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@

11 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@

11 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

11 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

11 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

11 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

11 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

11 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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.

12 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.

12 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

12 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

12 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

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

12 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

12 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

12 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

12 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

12 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

12 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

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

12 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

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

12 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

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

12 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

12 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

12 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

12 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

12 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.

12 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

12 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

12 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.

12 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@

12 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

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

12 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

13 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.

13 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

13 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

13 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

13 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@

13 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

13 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

13 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.

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

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

13 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.

13 months agoEnable password tests on Github ephemeral VMs.
Darren Tucker [Sun, 29 Jun 2025 01:14:18 +0000 (11:14 +1000)] 
Enable password tests on Github ephemeral VMs.

13 months agoupstream: Add simple regression test for dropbear as a server.
dtucker@openbsd.org [Sat, 28 Jun 2025 13:34:08 +0000 (13:34 +0000)] 
upstream: Add simple regression test for dropbear as a server.

OpenBSD-Regress-ID: 7abe1f6607d0cd49839918aade8f135d2462d389

13 months agoupstream: Add simple test for password auth. Requires some setup
dtucker@openbsd.org [Tue, 24 Jun 2025 12:28:23 +0000 (12:28 +0000)] 
upstream: Add simple test for password auth. Requires some setup

so does not run by default.

OpenBSD-Regress-ID: d5ded47a266b031fc91f99882f07161ab6d1bb70

13 months agoupstream: add RCS ID
djm@openbsd.org [Tue, 17 Jun 2025 01:24:32 +0000 (01:24 +0000)] 
upstream: add RCS ID

OpenBSD-Regress-ID: 6e30094e3bf0a1c65efb75c67a87093304a3e619

13 months agoupstream: make "Match !final" not trigger a 2nd pass ssh_config
djm@openbsd.org [Tue, 24 Jun 2025 09:22:03 +0000 (09:22 +0000)] 
upstream: make "Match !final" not trigger a 2nd pass ssh_config

parsing pass (unless hostname canonicalisation or a separate "Match final"
does). bz3843

ok dtucker@

OpenBSD-Commit-ID: ce82b6034828888f0f3f1c812e08f5e87400d802

13 months agoupstream: better debug diagnostics when loading keys. Will now list
djm@openbsd.org [Thu, 19 Jun 2025 05:49:05 +0000 (05:49 +0000)] 
upstream: better debug diagnostics when loading keys. Will now list

key fingerprint and algorithm (not just algorithm number) as well as making
it explicit which keys didn't load.

OpenBSD-Commit-ID: ee3e77a0271ab502e653922c6d161b1e091f8fee

13 months agoupstream: whitespace
djm@openbsd.org [Tue, 17 Jun 2025 01:20:17 +0000 (01:20 +0000)] 
upstream: whitespace

OpenBSD-Commit-ID: 6e96814bcf70d0edbb0749ec61cc4fd8707f286d

13 months agoupstream: fix leak on error path; Coverity CID 481976
djm@openbsd.org [Tue, 17 Jun 2025 01:19:27 +0000 (01:19 +0000)] 
upstream: fix leak on error path; Coverity CID 481976

OpenBSD-Commit-ID: 963dba2c804e2fd8efea2256092899874d0dbc7b

13 months agoUpdate obsd tests to use current images.
Darren Tucker [Tue, 17 Jun 2025 11:46:37 +0000 (21:46 +1000)] 
Update obsd tests to use current images.

13 months agoadd sshd-auth to RPM spec files
Damien Miller [Mon, 16 Jun 2025 23:48:47 +0000 (09:48 +1000)] 
add sshd-auth to RPM spec files

13 months agoupstream: Limit each moduli size to a max of 100 entries.
dtucker@openbsd.org [Mon, 16 Jun 2025 09:09:42 +0000 (09:09 +0000)] 
upstream: Limit each moduli size to a max of 100 entries.

OpenBSD-Commit-ID: 747219d54565030ff7c45298b9f5e971801f6cb2

13 months agoupstream: Now that ssh-keygen defaults to the maximum memory for
dtucker@openbsd.org [Mon, 16 Jun 2025 09:07:08 +0000 (09:07 +0000)] 
upstream: Now that ssh-keygen defaults to the maximum memory for

moduli generation we no longer need to run it twice to get enough.  Use mkdir
-p instead of a conditional, which allows "make -jN" to work without error.

OpenBSD-Commit-ID: c2eb57285424f819f9520fa33e0d6d3c4a361a5e

13 months agoupstream: Fix overflow check in sshbuf_dup_string. It's already
dtucker@openbsd.org [Mon, 16 Jun 2025 09:02:19 +0000 (09:02 +0000)] 
upstream: Fix overflow check in sshbuf_dup_string. It's already

constrained by SSHBUF_SIZE_MAX, but still worth fixing the check.  Patch from
afonot via github PR#573, with & ok djm@

OpenBSD-Commit-ID: 438888498e66472fc6a48133196d6538d27bff18

13 months agoupstream: Plug mem leak. Patch from afonot via github PR#574, ok djm@
dtucker@openbsd.org [Mon, 16 Jun 2025 08:53:04 +0000 (08:53 +0000)] 
upstream: Plug mem leak. Patch from afonot via github PR#574, ok djm@

OpenBSD-Commit-ID: 65619f14ef206028ce39bc31f704b832a0609688

13 months agoupstream: Save return value from sshbuf_len instead of calling it
dtucker@openbsd.org [Mon, 16 Jun 2025 08:49:27 +0000 (08:49 +0000)] 
upstream: Save return value from sshbuf_len instead of calling it

multiple times. Fixes Coverity CID 470521.

OpenBSD-Regress-ID: 356b8b43c8a232deaf445c1ff7526577b177a8e9

13 months agoupstream: Plug leak. Coverity CID 405058.
dtucker@openbsd.org [Fri, 13 Jun 2025 07:35:14 +0000 (07:35 +0000)] 
upstream: Plug leak. Coverity CID 405058.

OpenBSD-Regress-ID: 7fb2fce68d2cb063cdb94d5d66f84fa3a2902792

13 months agoupstream: Remove dead code flagged by Coverity CID 307783. ok djm@
dtucker@openbsd.org [Fri, 13 Jun 2025 07:23:07 +0000 (07:23 +0000)] 
upstream: Remove dead code flagged by Coverity CID 307783. ok djm@

OpenBSD-Regress-ID: e579f5ec2fd2eb2fe2bad654d16f2ba655a3e035

13 months agoupstream: Set user, host and path to NULL immediately before calling
dtucker@openbsd.org [Thu, 12 Jun 2025 10:09:39 +0000 (10:09 +0000)] 
upstream: Set user, host and path to NULL immediately before calling

parse_user_host_path in tests.  This ensures that we don't accidentally use
the previous value if the function under test doesn't set them Also fixes
Coverity CIDs 405056 405065 405066.

OpenBSD-Regress-ID: 43678ff59001712f32214fe303b1c21c163c2960

13 months agoupstream: Plug mem leak on error path here too.
dtucker@openbsd.org [Thu, 12 Jun 2025 09:26:57 +0000 (09:26 +0000)] 
upstream: Plug mem leak on error path here too.

Coverity CID 307781.

OpenBSD-Regress-ID: 18e053d9b661fbb4227d3db03172077c1216bb2e

13 months agoupstream: Plug mem leak on error path.
dtucker@openbsd.org [Thu, 12 Jun 2025 09:19:43 +0000 (09:19 +0000)] 
upstream: Plug mem leak on error path.

Coverity CID 307776.

OpenBSD-Regress-ID: c44246690973e1b8643e51079a2faa7ace26490c

13 months agoupstream: Remove dead code ternary. We always report at least
dtucker@openbsd.org [Wed, 11 Jun 2025 13:27:11 +0000 (13:27 +0000)] 
upstream: Remove dead code ternary. We always report at least

KB/s, so B/s is never used.  Coverity CID 291809, ok djm@

OpenBSD-Commit-ID: a67c5bcc9e19c8965bfeace0e337b13660efa058

13 months agoupstream: Improve termination condition of while loop to compare
dtucker@openbsd.org [Wed, 11 Jun 2025 13:24:05 +0000 (13:24 +0000)] 
upstream: Improve termination condition of while loop to compare

size_t's.  Assuming read() does what it's supposed to this shouldn't matter,
but should be more robust.  Flagged by Coverity CID 470514, ok djm@

OpenBSD-Commit-ID: d7b5ad60feb797b3464964b9ea67fd78fb9d6cc6

13 months agoReplace Windows 2019 runners with 2025 ones.
Darren Tucker [Tue, 10 Jun 2025 08:40:56 +0000 (18:40 +1000)] 
Replace Windows 2019 runners with 2025 ones.

The windows-2019 runners are being decomissioned.

14 months agoDisable _FORTIFY_SOURCE during snprintf test.
Darren Tucker [Wed, 4 Jun 2025 08:33:52 +0000 (18:33 +1000)] 
Disable _FORTIFY_SOURCE during snprintf test.

Prevents mistakenly detecting snprintf as broken on FreeBSD 15 with
_FORTIFY_SOURCE enabled.  bz#3809, patch from jlduran at gmail.com

14 months agoupstream: Fix x11_channel_used_recently() to return true when channel
dtucker@openbsd.org [Mon, 2 Jun 2025 14:09:34 +0000 (14:09 +0000)] 
upstream: Fix x11_channel_used_recently() to return true when channel

has been used within the last second, instead of more than a second ago.
Should fix ~5s delay on X client startup when ObscureKeystrokeTiming is
enabled. bz#3820, ok (& sigh) djm@

OpenBSD-Commit-ID: b741011e81fb3e3d42711d9bd3ed8a959924dee4

14 months agoupstream: When there's more than one x11 channel in use, return
dtucker@openbsd.org [Thu, 29 May 2025 13:27:27 +0000 (13:27 +0000)] 
upstream: When there's more than one x11 channel in use, return

lastused of most recently used x11 channel instead of the last one found. ok
djm@

OpenBSD-Commit-ID: 94a72bf988d40a5bae2e38608f4e117f712569fe

14 months agoupstream: replace xmalloc+memset(0) with xcalloc(); from AZero13 via
djm@openbsd.org [Sat, 24 May 2025 11:41:51 +0000 (11:41 +0000)] 
upstream: replace xmalloc+memset(0) with xcalloc(); from AZero13 via

GHPR417

OpenBSD-Commit-ID: 921079436a4900325d22bd3b6a90c8d0d54f62f8

14 months agoupstream: fix punctuation around host key fingerprints to make them
djm@openbsd.org [Sat, 24 May 2025 09:46:16 +0000 (09:46 +0000)] 
upstream: fix punctuation around host key fingerprints to make them

easier to copy and paste.

Patch from Till Maas via GHPR556; ok dtucker@

OpenBSD-Commit-ID: c0100182a30b6925c8cdb2225b18140264594b7b

14 months agoupstream: Replace strncmp + byte count with strprefix in Penalty
dtucker@openbsd.org [Sat, 24 May 2025 08:13:29 +0000 (08:13 +0000)] 
upstream: Replace strncmp + byte count with strprefix in Penalty

config parsing. ok kn@, djm@

OpenBSD-Commit-ID: 34a41bb1b9ba37fb6c7eb29a7ea909547bf02a5a

14 months agoupstream: Make the display number check relative to
dtucker@openbsd.org [Sat, 24 May 2025 08:09:32 +0000 (08:09 +0000)] 
upstream: Make the display number check relative to

X11DisplayOffset.

This will allows people to use X11DisplayOffset to configure much higher
port ranges if they really want, while not changing the default behaviour.
Patch from Roman Gubarev via github PR#559, ok djm@

OpenBSD-Commit-ID: e0926af5dc0c11e364452b624c3ad0cda88550b5

14 months agoRemove progressmeter.o from libssh.a.
Darren Tucker [Sat, 24 May 2025 07:20:57 +0000 (17:20 +1000)] 
Remove progressmeter.o from libssh.a.

It's now explicitly included by the binaries that need it (scp & sftp).
bz#3810, patch from jlduran at gmail.com

14 months agoupstream: Null out keys between test runs.
dtucker@openbsd.org [Sat, 24 May 2025 06:50:28 +0000 (06:50 +0000)] 
upstream: Null out keys between test runs.

BENCH_START and BENCH_FINISH are actually a while() loop in disguise,
so if sshkey_generate does not reset the key pointer on failure the test
may incorrectly pass.  It also confuses Coverity (CID 551234).

OpenBSD-Regress-ID: bf4d32079fc6df6dce1f26c2025f4ed492f13936

14 months agoupstream: add some verbosity
djm@openbsd.org [Sat, 24 May 2025 04:41:12 +0000 (04:41 +0000)] 
upstream: add some verbosity

OpenBSD-Regress-ID: 11c86cda4435b5f9ab6172c4742b95899666c977