]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
39 hours agoupstream: unbreak WITH_OPENSSL=no builds, also allowing ed25519 master anongit/master
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

40 hours 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

5 days agomore ec/ed25519 fixing github-selfhosted/master github/master
Damien Miller [Sat, 26 Jul 2025 09:19:46 +0000 (19:19 +1000)] 
more ec/ed25519 fixing

5 days 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

5 days 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

5 days 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

5 days 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

6 days 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

6 days 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

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

6 days 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

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

6 days 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

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

6 days 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

6 days 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

6 days 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

6 days 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

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

8 days 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

8 days 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

2 weeks 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.

2 weeks 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@

2 weeks 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

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

3 weeks 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

3 weeks 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.

3 weeks 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

3 weeks 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

3 weeks 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

4 weeks 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@

4 weeks 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

4 weeks 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

4 weeks 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.

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

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

4 weeks 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.

4 weeks 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.

4 weeks 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

4 weeks 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

4 weeks 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

5 weeks 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

5 weeks 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

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

OpenBSD-Commit-ID: 6e96814bcf70d0edbb0749ec61cc4fd8707f286d

5 weeks 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

6 weeks 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.

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

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

8 weeks 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

8 weeks 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

8 weeks 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 months agoupstream: use start_ssh_agent() to ensure we get logging
djm@openbsd.org [Sat, 24 May 2025 04:41:03 +0000 (04:41 +0000)] 
upstream: use start_ssh_agent() to ensure we get logging

add some verbosity

OpenBSD-Regress-ID: a89bf64696b9fb1b91be318e6b8940c9ab21c616

2 months agoupstream: add a start_ssh_agent() function that sets up an agent
djm@openbsd.org [Sat, 24 May 2025 04:40:37 +0000 (04:40 +0000)] 
upstream: add a start_ssh_agent() function that sets up an agent

with logging

OpenBSD-Regress-ID: 7f9f30f9c64acbd4b418a5e1a19140cc988071a8

2 months agoupstream: Plug leak of startup_pollfd in debug and child paths.
dtucker@openbsd.org [Sat, 24 May 2025 06:43:37 +0000 (06:43 +0000)] 
upstream: Plug leak of startup_pollfd in debug and child paths.

Coverity CID 405024, ok djm@

OpenBSD-Commit-ID: db46047229253e9c4470c8bbf5f82706ac021377

2 months agossh-keygen changes were fixup'ed into single commit.
Darren Tucker [Sat, 24 May 2025 07:11:38 +0000 (17:11 +1000)] 
ssh-keygen changes were fixup'ed into single commit.

2 months agoauth-pam: Check the user didn't change during PAM transaction
Marco Trevisan (Treviño) [Mon, 30 Sep 2024 11:14:11 +0000 (13:14 +0200)] 
auth-pam: Check the user didn't change during PAM transaction

PAM modules can change the user during their execution, in such case ssh
would still use the user that has been provided giving potentially
access to another user with the credentials of another one.

So prevent this to happen, by ensuring that the final PAM user is
matching the one that initiated the transaction.

2 months agoupstream: Remove ssh-keygen's moduli screen -Omemory option.
dtucker@openbsd.org [Sat, 24 May 2025 03:37:40 +0000 (03:37 +0000)] 
upstream: Remove ssh-keygen's moduli screen -Omemory option.

This vaguely made sense 20 years ago, but these days you'd be hard
pressed to *find* a machine small enough to not support the maximum
(127MB), and no one is screening moduli on such machines anyway,
so just use the max.  This also fixes Coverity CID 470522 by deleting
code in question.  "kill it with fire" djm@.

OpenBSD-Commit-ID: 39036aa406a99f0a91923aa3a96afff1205558e6

2 months agoupstream: Fix compile error on 32bit platforms.
dtucker@openbsd.org [Sat, 24 May 2025 02:33:33 +0000 (02:33 +0000)] 
upstream: Fix compile error on 32bit platforms.

Spotted by & ok tb@

OpenBSD-Commit-ID: cbcf518247886f3c7518fc54cb3bd911ffc69db7

2 months agoupstream: Use pointer from strprefix in error message,
dtucker@openbsd.org [Sat, 24 May 2025 02:01:28 +0000 (02:01 +0000)] 
upstream: Use pointer from strprefix in error message,

missed in previous.

OpenBSD-Commit-ID: d2cdec6cf0fcd4b0ee25e4e3fad8bc8cf0ee657d

2 months agoupstream: Replace strncmp and strncasecmp with hand-counting bytes
dtucker@openbsd.org [Fri, 23 May 2025 12:52:45 +0000 (12:52 +0000)] 
upstream: Replace strncmp and strncasecmp with hand-counting bytes

with strprefix. nits lucas@, ok lucas@ djm@

OpenBSD-Commit-ID: f0888807f151ea2bdaf6fed36303ae81f259d1d4

2 months agoupstream: Include stdint.h for UINT32_MAX.
dtucker@openbsd.org [Fri, 23 May 2025 11:54:50 +0000 (11:54 +0000)] 
upstream: Include stdint.h for UINT32_MAX.

OpenBSD-Commit-ID: edc29ed67e8bd03bac729d9b4849066d1d3a8cb9

2 months agoupstream: Ensure args to nh_update() fit within uint32, which it
dtucker@openbsd.org [Fri, 23 May 2025 11:25:35 +0000 (11:25 +0000)] 
upstream: Ensure args to nh_update() fit within uint32, which it

should always anyway. Placates Coverity CID 470520.  While there, fix the
upstream URL.  ok djm@

OpenBSD-Commit-ID: 2478e89fde089a49fa02f9faf6287d35959c9f92

2 months agoupstream: Don't leak the args list. Coverity CIDs 481569 & 481570,
dtucker@openbsd.org [Fri, 23 May 2025 09:26:25 +0000 (09:26 +0000)] 
upstream: Don't leak the args list. Coverity CIDs 481569 & 481570,

ok job@ tb@.

OpenBSD-Commit-ID: becabcd00513d13d1435b68b7ccffa7151b72393

2 months agoupstream: Explictly set LC_ALL=C on each sort invocation.
dtucker@openbsd.org [Fri, 23 May 2025 08:40:13 +0000 (08:40 +0000)] 
upstream: Explictly set LC_ALL=C on each sort invocation.

Remove it from sshd_config (where it could be overridden by shell startup
scripts, eg on macos-15) causing random test failures.  with & ok djm@

OpenBSD-Regress-ID: ad0a6678964784096e9a9e6d15ead36beed92f18

2 months agoAllow setting LTESTS in repo variables.
Darren Tucker [Fri, 23 May 2025 06:39:18 +0000 (16:39 +1000)] 
Allow setting LTESTS in repo variables.

2 months agoRename debugging variable RUN_ONLY_TEST.
Darren Tucker [Fri, 23 May 2025 06:26:20 +0000 (16:26 +1000)] 
Rename debugging variable RUN_ONLY_TEST.

to RUN_ONLY_TARGET_CONFIG to make it more obvious what it matches.

2 months agochown regress logs before uploading.
Darren Tucker [Fri, 23 May 2025 06:11:48 +0000 (16:11 +1000)] 
chown regress logs before uploading.

2 months agoupstream: Import regenerated moduli.
dtucker@openbsd.org [Fri, 23 May 2025 01:14:35 +0000 (01:14 +0000)] 
upstream: Import regenerated moduli.

OpenBSD-Commit-ID: 07e29dc891e29b31e03e2e5493658b4a9ac19431

2 months agoupstream: use "const char * const" for malloc_options here also
deraadt@openbsd.org [Fri, 23 May 2025 00:40:45 +0000 (00:40 +0000)] 
upstream: use "const char * const" for malloc_options here also

OpenBSD-Commit-ID: 869715b9c7e1dd5b85efd07814e7e53f0286eea2

2 months agoupstream: Adjust debug message to prevent (unsigned) integer overflow.
dtucker@openbsd.org [Thu, 22 May 2025 12:14:19 +0000 (12:14 +0000)] 
upstream: Adjust debug message to prevent (unsigned) integer overflow.

Fixes Coverity CID 481110, ok djm@

OpenBSD-Commit-ID: 26178bf3b812707fb498ea85d076cadd1f2eb686

2 months agoupstream: Fix OpenBSD RCS ID typos. from Andrius V
bluhm@openbsd.org [Thu, 22 May 2025 04:34:18 +0000 (04:34 +0000)] 
upstream: Fix OpenBSD RCS ID typos. from Andrius V

OpenBSD-Regress-ID: 5c03a2ef5323969fc4978f2eec4f1a25c48c572a

2 months agoRemove debug change accidentally commited.
Darren Tucker [Thu, 22 May 2025 12:09:48 +0000 (22:09 +1000)] 
Remove debug change accidentally commited.

Fixes Coverity CID 481160.

2 months agoCollect all of regress dir on failure.
Darren Tucker [Thu, 22 May 2025 11:16:37 +0000 (21:16 +1000)] 
Collect all of regress dir on failure.

This may allow us to sort through its entrails and determine the cause
of some types of failures.

2 months agominimal shims for fstatat(2)/unlinkat(2) in agent
Damien Miller [Thu, 22 May 2025 08:42:44 +0000 (18:42 +1000)] 
minimal shims for fstatat(2)/unlinkat(2) in agent

Add some very minimal and task-specific replacements for
fstatat(2) and unlinkat(2) in the ssh-agent socket cleanup
loop, for platforms that lack these functions. ok dtucker@

2 months agoupstream: Output the current name for PermitRootLogin's
dtucker@openbsd.org [Thu, 22 May 2025 04:22:03 +0000 (04:22 +0000)] 
upstream: Output the current name for PermitRootLogin's

"prohibit-password" in sshd -T instead of its deprecated alias
"without-password".  bz#3788, patch from cjwatson at debian.org.

OpenBSD-Commit-ID: 2d5df18d5ad33a9b6c7547ec78a8e6ea13813df9

2 months agoupstream: Copy arg to be passed to dirname().
dtucker@openbsd.org [Thu, 22 May 2025 03:53:46 +0000 (03:53 +0000)] 
upstream: Copy arg to be passed to dirname().

POSIX allows dirname() to modify its args and return a pointer into it,
so this prevents an overlapping strlcpy.  bz#3819, patch from cjwatson
at debian.org

OpenBSD-Commit-ID: c32e496e6a1618aba31c8b7a9d4e1376c5ea6aa1

2 months agoupstream: Add $OpenBSD$ marker for easier syncing.
dtucker@openbsd.org [Thu, 22 May 2025 03:41:10 +0000 (03:41 +0000)] 
upstream: Add $OpenBSD$ marker for easier syncing.

OpenBSD-Commit-ID: 27ff3e1e2e6610d9981ebe43ae9b783236800035

2 months agoupstream: Correct FILES section to mention new default path to
djm@openbsd.org [Wed, 21 May 2025 12:12:20 +0000 (12:12 +0000)] 
upstream: Correct FILES section to mention new default path to

agent sockets. Spotted by / ok jmc@

OpenBSD-Commit-ID: 91d736d78d71a4276c9cbb075b1462bbc3df55a6

2 months agoFix nc install some more.
Darren Tucker [Thu, 22 May 2025 02:25:35 +0000 (12:25 +1000)] 
Fix nc install some more.

2 months agoFix cvs up of nc.
Darren Tucker [Thu, 22 May 2025 02:21:11 +0000 (12:21 +1000)] 
Fix cvs up of nc.

2 months agoInstall nc during upstream test.
Darren Tucker [Thu, 22 May 2025 01:34:04 +0000 (11:34 +1000)] 
Install nc during upstream test.

This ensures that the installed nc matches the expectations of the
regress tests.