]> git.feebdaed.xyz Git - 0xmirror/openssh-portable.git/log
0xmirror/openssh-portable.git
7 weeks agoupstream: link against ed25519-openssl.c instead of ed25519.c
djm@openbsd.org [Thu, 6 Nov 2025 01:33:03 +0000 (01:33 +0000)]
upstream: link against ed25519-openssl.c instead of ed25519.c

OpenBSD-Regress-ID: f789d46e99d2598929e3c2d00b45c47cc3102501

7 weeks agoupstream: Cope with recent changes and don't link hash.c.
anton@openbsd.org [Sat, 1 Nov 2025 05:39:25 +0000 (05:39 +0000)]
upstream: Cope with recent changes and don't link hash.c.

OpenBSD-Regress-ID: 577ef2f36ee592528448e8c0f33499e2e3512054

7 weeks agoupstream: Remove some unnecessary checks in
djm@openbsd.org [Fri, 7 Nov 2025 04:11:59 +0000 (04:11 +0000)]
upstream: Remove some unnecessary checks in

sshkey_ec_validate_public()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Checking nQ == infinity is not needed for cofactor 1 curves.
Checking x and y coordinates against order is not needed either.

patch from Szilárd Pfeiffer, with further refinement by tb@
ok tb@

OpenBSD-Commit-ID: ef985e2be7c64e215d064757d3fc65eb181e8ede

7 weeks agoupstream: move stringlist_append() and stringlist_free() to misc.c
djm@openbsd.org [Thu, 6 Nov 2025 01:31:11 +0000 (01:31 +0000)]
upstream: move stringlist_append() and stringlist_free() to misc.c

OpenBSD-Commit-ID: 7d047bbff6964b9abbc04e9b3e2e1b4cc1db0aea

7 weeks agoupstream: cleanup file descriptors across PKCS#11 client/helper
djm@openbsd.org [Fri, 31 Oct 2025 01:50:43 +0000 (01:50 +0000)]
upstream: cleanup file descriptors across PKCS#11 client/helper

execution; ok markus

OpenBSD-Commit-ID: 993628a5b361e30aa48bbb4c07667a280f3f23ab

8 weeks agoSupport using git for OpenBSD src tree tests.
Darren Tucker [Fri, 31 Oct 2025 21:34:15 +0000 (08:34 +1100)]
Support using git for OpenBSD src tree tests.

8 weeks agoAdd OpenBSD 7.8 test target.
Darren Tucker [Fri, 31 Oct 2025 21:33:07 +0000 (08:33 +1100)]
Add OpenBSD 7.8 test target.

8 weeks agocheck PAM user against previous user, not pw_name
Damien Miller [Fri, 31 Oct 2025 02:47:49 +0000 (13:47 +1100)]
check PAM user against previous user, not pw_name

Avoids early fatal() if the user doesn't exist.

Reported by Viswesh Narayanan; ok dtucker@

8 weeks agoskip pkcs11 tests when built --without-openssl
Damien Miller [Fri, 31 Oct 2025 01:19:47 +0000 (12:19 +1100)]
skip pkcs11 tests when built --without-openssl

8 weeks agoadd sshlog() replacement to sk-dummy.so
Damien Miller [Fri, 31 Oct 2025 01:19:34 +0000 (12:19 +1100)]
add sshlog() replacement to sk-dummy.so

8 weeks agorename openbsd-compat sha2.h -> bsd-sha2.h
Damien Miller [Fri, 31 Oct 2025 00:16:29 +0000 (11:16 +1100)]
rename openbsd-compat sha2.h -> bsd-sha2.h

avoids confusion with system header when included from files under
openbsd-compat/

8 weeks agofix linking for sk-dummy.so, used in tests
Damien Miller [Fri, 31 Oct 2025 00:07:17 +0000 (11:07 +1100)]
fix linking for sk-dummy.so, used in tests

8 weeks agoupstream: don't link hash.c
djm@openbsd.org [Thu, 30 Oct 2025 23:55:09 +0000 (23:55 +0000)]
upstream: don't link hash.c

OpenBSD-Regress-ID: a145f09c1efb1fcd3924544463f1f94f5d4805c0

8 weeks agoupstream: Prepare for gcc 3 leaving the building, COMPILER_VERSION
miod@openbsd.org [Thu, 23 Oct 2025 19:06:10 +0000 (19:06 +0000)]
upstream: Prepare for gcc 3 leaving the building, COMPILER_VERSION

can no longer get set to "gcc3".

OpenBSD-Regress-ID: 02351ea947975b80be60b9a8c6e4dbb57789e890

8 weeks agoupstream: Check tmux version and skip if too old. ok djm@
dtucker@openbsd.org [Thu, 23 Oct 2025 06:15:26 +0000 (06:15 +0000)]
upstream: Check tmux version and skip if too old. ok djm@

OpenBSD-Regress-ID: fb62024eb753c61b4d78402ec8378af839fad26c

8 weeks agoupstream: move crypto_hash_sha512() to be inline in crypto_api.h, saves
djm@openbsd.org [Thu, 30 Oct 2025 23:19:33 +0000 (23:19 +0000)]
upstream: move crypto_hash_sha512() to be inline in crypto_api.h, saves

about 0.5kb per binary and makes life easier for portable; with/ok dtucker@

OpenBSD-Commit-ID: 672d7390f78bb6581c12661d7f5adc8a9c6be564

8 weeks agoupstream: support ed25519 signatures via libcrypto. Mostly by Jeremy
djm@openbsd.org [Thu, 30 Oct 2025 20:49:10 +0000 (20:49 +0000)]
upstream: support ed25519 signatures via libcrypto. Mostly by Jeremy

Allison Feedback tb@, ok tb@ markus@

OpenBSD-Commit-ID: e8edf8adffd5975d05769dde897df882d7933526

8 weeks agoupstream: Activate UnusedConnectionTimeout only after last channel
djm@openbsd.org [Thu, 30 Oct 2025 03:19:54 +0000 (03:19 +0000)]
upstream: Activate UnusedConnectionTimeout only after last channel

has closed. Previously UnusedConnectionTimeout could fire early after a
ChannelTimeout.

This was not a problem for the OpenSSH client because it terminates
once all channels have closed but could cause problems for other
clients (e.g. API clients) that do things differently.

bz3827; ok dtucker

OpenBSD-Commit-ID: ff2e4607cbd4e600de3c8a5ece3b0e4bb641ed8f

8 weeks agoupstream: Prepare for gcc 3 leaving the building, COMPILER_VERSION
miod@openbsd.org [Thu, 23 Oct 2025 19:06:10 +0000 (19:06 +0000)]
upstream: Prepare for gcc 3 leaving the building, COMPILER_VERSION

can no longer get set to "gcc3".

OpenBSD-Commit-ID: 98eefed432ff8253b307002e20d28da14b93e7e3

2 months agoupstream: more explicit synchronisation around killing tmux sessions
djm@openbsd.org [Wed, 22 Oct 2025 06:22:58 +0000 (06:22 +0000)]
upstream: more explicit synchronisation around killing tmux sessions

between runs.

OpenBSD-Regress-ID: 1735f5cb13ad281e869ab998c7d49b692ee3ed47

2 months agoupstream: remove debugging junk
djm@openbsd.org [Wed, 22 Oct 2025 05:22:31 +0000 (05:22 +0000)]
upstream: remove debugging junk

OpenBSD-Regress-ID: 3247e0ac98ae4cfe4eede871ef424d166e29e828

2 months agoupstream: just skip the test if $PATH or $HOME has whitespace in it
djm@openbsd.org [Tue, 21 Oct 2025 23:30:01 +0000 (23:30 +0000)]
upstream: just skip the test if $PATH or $HOME has whitespace in it

OpenBSD-Regress-ID: ccf75a29d1a300a35f63be0e4f11ad5276756275

2 months agoupstream: quote paths; avoids test failure when run from a path with a
djm@openbsd.org [Tue, 21 Oct 2025 22:13:27 +0000 (22:13 +0000)]
upstream: quote paths; avoids test failure when run from a path with a

space in it

OpenBSD-Regress-ID: e4b7bffc289f10d47c50c02dd70b0323078a83b4

2 months agoupstream: fix test for executability of tmux
djm@openbsd.org [Tue, 21 Oct 2025 08:35:22 +0000 (08:35 +0000)]
upstream: fix test for executability of tmux

OpenBSD-Regress-ID: a18119876ecfd95edb78225b086ac668eb0977ab

2 months agoupstream: add some more synchronisation to avoid a race between
djm@openbsd.org [Tue, 21 Oct 2025 08:34:52 +0000 (08:34 +0000)]
upstream: add some more synchronisation to avoid a race between

command entry and ^C that showed up on the portable regress tests.

OpenBSD-Regress-ID: 5527e74aed1b008aa7e5223ca5a84aedecd973d4

2 months agoupstream: Always create logfiles. Should prevent "can't operate on
dtucker@openbsd.org [Tue, 21 Oct 2025 07:18:27 +0000 (07:18 +0000)]
upstream: Always create logfiles. Should prevent "can't operate on

symlink" warnings during test runs.

OpenBSD-Regress-ID: 65cf5ce3c8b87b5609f1f3ea142b4f381128dc33

2 months agobsd-openpty: include stdio.h for snprintf
Mike Frysinger [Sun, 19 Oct 2025 13:33:23 +0000 (09:33 -0400)]
bsd-openpty: include stdio.h for snprintf

2 months agoinclude tmux in CI package list
Damien Miller [Mon, 20 Oct 2025 22:14:35 +0000 (09:14 +1100)]
include tmux in CI package list

2 months agoDetect tmux at configure time and pass to tests.
Darren Tucker [Mon, 20 Oct 2025 07:31:08 +0000 (18:31 +1100)]
Detect tmux at configure time and pass to tests.

ok djm@

2 months agoUpdate LibreSSL versions and add 4.2.0.
Darren Tucker [Mon, 20 Oct 2025 07:29:24 +0000 (18:29 +1100)]
Update LibreSSL versions and add 4.2.0.

2 months agoupstream: regression test for "interactive" ssh with a PTY attached,
djm@openbsd.org [Mon, 20 Oct 2025 00:45:10 +0000 (00:45 +0000)]
upstream: regression test for "interactive" ssh with a PTY attached,

using tmux

would have likely caught the ControlPersist regression in 10.1.

feedback nicm@

OpenBSD-Regress-ID: d4d709c08657769cb5691893cc98f34b6f537e76

2 months agoRetire macos-13 runners, add Intel-specific ones.
Darren Tucker [Fri, 17 Oct 2025 05:26:22 +0000 (16:26 +1100)]
Retire macos-13 runners, add Intel-specific ones.

2 months agoIf we have nfds_t, check if it's int or long.
Darren Tucker [Fri, 17 Oct 2025 05:23:43 +0000 (16:23 +1100)]
If we have nfds_t, check if it's int or long.

Should fix build on very old Mac OS X, eg 10.3.  Spotted and patch tested
by Sevan Janiyan.

2 months agolink ssh against ssh-pkcs11.o
Damien Miller [Thu, 16 Oct 2025 00:15:16 +0000 (11:15 +1100)]
link ssh against ssh-pkcs11.o

Should fix PIN entry for direct use of PKCS11Provider in ssh(1)
bz3879

2 months agoupstream: regress test for PKCS#11 directly in ssh (not via ssh-agent)
djm@openbsd.org [Thu, 16 Oct 2025 00:01:54 +0000 (00:01 +0000)]
upstream: regress test for PKCS#11 directly in ssh (not via ssh-agent)

would have caught bz3879

OpenBSD-Regress-ID: ceafb1e9a6c07185cc0cb0589f3170489a516123

2 months agoupstream: missed a case in previous
djm@openbsd.org [Thu, 16 Oct 2025 00:00:36 +0000 (00:00 +0000)]
upstream: missed a case in previous

OpenBSD-Commit-ID: 271c5602b5e719ee3def19dbd9a33328b4fa7edc

2 months agoupstream: don't try to pledge() the client if a PKCS11Provider is
djm@openbsd.org [Wed, 15 Oct 2025 23:55:01 +0000 (23:55 +0000)]
upstream: don't try to pledge() the client if a PKCS11Provider is

in use

OpenBSD-Commit-ID: 445b2bf4b1e36e515f4d888f35244fd2dcfbb566

2 months agoupstream: mention this is for both ssh-pkcs11.c and
djm@openbsd.org [Wed, 15 Oct 2025 23:54:20 +0000 (23:54 +0000)]
upstream: mention this is for both ssh-pkcs11.c and

ssh-pkcs11-client.c

OpenBSD-Commit-ID: 26eff4b9a328fa056e98b997cb57254639e48fda

2 months agomdoc2man: process `Dl` macros
Arnout Engelen [Sat, 21 Jun 2025 07:47:28 +0000 (09:47 +0200)]
mdoc2man: process `Dl` macros

`Dl` marks a single line as 'literal'. Since we don't output single
lines differently in literal vs regular mode (we only insert line
breaks for multi-line blocks in literal mode), we can just skip it.

2 months agomdoc2man: support `Ns` inside `Ic`
Arnout Engelen [Fri, 20 Jun 2025 19:36:44 +0000 (21:36 +0200)]
mdoc2man: support `Ns` inside `Ic`

When encountering an `Ns` mdoc macro ('no space') inside an `Ic` block
('command'), such as for 'lines=number' in ssh-keygen.1, `mdoc2man`
just output the macro instead of processing it.

This adds processing for `Ns` when seen inside an `Ic` block.

2 months agogitignore: ignore all *~ files
Mike Frysinger [Mon, 13 Oct 2025 15:29:36 +0000 (11:29 -0400)]
gitignore: ignore all *~ files

This is a common backup style.

2 months agobsd-misc: include sys/ioctl.h
Mike Frysinger [Mon, 13 Oct 2025 16:49:24 +0000 (12:49 -0400)]
bsd-misc: include sys/ioctl.h

This file uses ioctl() to implement some fallback functions, but
doesn't include sys/ioctl.h for it.

2 months agodon't leak PAM handle on repeat invocations
Damien Miller [Tue, 14 Oct 2025 03:52:50 +0000 (14:52 +1100)]
don't leak PAM handle on repeat invocations

Reported by Casper Dik via bz3882; ok dtucker@

2 months agoSwitch OpenBSD VMs to use doas instead of sudo.
Darren Tucker [Mon, 13 Oct 2025 08:02:45 +0000 (19:02 +1100)]
Switch OpenBSD VMs to use doas instead of sudo.

OpenBSD 7.3 packages have been removed from the mirrors so we can't
install sudo for it any more, so switch to the native doas utility.

2 months agocheck whether diff accepts -N
Damien Miller [Mon, 13 Oct 2025 03:33:04 +0000 (14:33 +1100)]
check whether diff accepts -N

2 months agoupstream: test remote/remote recursive transfers where the source
djm@openbsd.org [Mon, 13 Oct 2025 00:56:15 +0000 (00:56 +0000)]
upstream: test remote/remote recursive transfers where the source

path ends in ".."

OpenBSD-Regress-ID: 2f42078cfcee986d08b5d135968b8de6186c0003

2 months agoupstream: test recursive transfers, including cases where the
djm@openbsd.org [Mon, 13 Oct 2025 00:55:45 +0000 (00:55 +0000)]
upstream: test recursive transfers, including cases where the

source path ends in ".."

OpenBSD-Regress-ID: a38e3dbc86f6b7a95605784dcc601f17ede9c3f0

2 months agoupstream: test implicit destination path selection when source path
djm@openbsd.org [Mon, 13 Oct 2025 00:55:09 +0000 (00:55 +0000)]
upstream: test implicit destination path selection when source path

ends with ".."

OpenBSD-Regress-ID: 42a88e7cdceee8a83879f5730199084ee4a95902

2 months agoupstream: similar to scp, fix implicit destination path selection
djm@openbsd.org [Mon, 13 Oct 2025 00:54:29 +0000 (00:54 +0000)]
upstream: similar to scp, fix implicit destination path selection

when source path ends with ".."; ok deraadt@

OpenBSD-Commit-ID: 9b8d2a662d96b241293a88b3ea21f2419bfc4812

2 months agoupstream: when using the SFTP protocol for transfers, fix implicit
djm@openbsd.org [Mon, 13 Oct 2025 00:53:51 +0000 (00:53 +0000)]
upstream: when using the SFTP protocol for transfers, fix implicit

destination path selection when source path ends with ".."; ok deraadt@
bz3871

OpenBSD-Commit-ID: d75b3b006386c5302ed4f67c4add18464ab36a0b

2 months agoupstream: Import regenerate moduli.
dtucker@openbsd.org [Sat, 11 Oct 2025 23:39:14 +0000 (23:39 +0000)]
upstream: Import regenerate moduli.

OpenBSD-Commit-ID: 8512e01cf917dca6455be561d66db8eeb49f3f0b

2 months agodepend
Damien Miller [Fri, 10 Oct 2025 04:23:59 +0000 (15:23 +1100)]
depend

2 months agoupstream: clean up more thoroughly between tests
djm@openbsd.org [Fri, 10 Oct 2025 00:31:53 +0000 (00:31 +0000)]
upstream: clean up more thoroughly between tests

OpenBSD-Regress-ID: c8394eae7547374a8fc43d03d865539e2917ea50

2 months agoupstream: simplify
djm@openbsd.org [Thu, 9 Oct 2025 23:58:27 +0000 (23:58 +0000)]
upstream: simplify

OpenBSD-Regress-ID: 8e91a2a5c1eb50128de3be72118b544d73a86673

2 months agoupstream: don't abuse SSHKEY_FLAG_EXT to signal that a key is in
djm@openbsd.org [Thu, 9 Oct 2025 23:26:47 +0000 (23:26 +0000)]
upstream: don't abuse SSHKEY_FLAG_EXT to signal that a key is in

the agent, as that triggers special handling on sshkey_free()

OpenBSD-Commit-ID: 2ae2247babd2db167a30cf7a4f7eae4f26c000a8

2 months agoupstream: downgrade a useless error() -> debug()
djm@openbsd.org [Thu, 9 Oct 2025 23:25:23 +0000 (23:25 +0000)]
upstream: downgrade a useless error() -> debug()

OpenBSD-Commit-ID: 5b0c9bcddb324f8bed2c8e8ffe9c92d263adc2d9

2 months agoupstream: silence "mm_log_handler: write: Broken pipe" logspam
djm@openbsd.org [Thu, 9 Oct 2025 03:23:33 +0000 (03:23 +0000)]
upstream: silence "mm_log_handler: write: Broken pipe" logspam

OpenBSD-Commit-ID: bcf7c6ea509e755bd5a7cd567ff7cad725111a14

2 months agoAdd tracking for 10.2 branch.
Darren Tucker [Thu, 9 Oct 2025 06:57:17 +0000 (17:57 +1100)]
Add tracking for 10.2 branch.

2 months agocomplete PKCS#11 stubs and move to ssh-pkcs11.c
Damien Miller [Thu, 9 Oct 2025 02:12:15 +0000 (13:12 +1100)]
complete PKCS#11 stubs and move to ssh-pkcs11.c

Should unbreak --disable-pkcs11 builds

2 months agosome fixes to p11_setup
Damien Miller [Thu, 9 Oct 2025 02:10:27 +0000 (13:10 +1100)]
some fixes to p11_setup

1. Use the ssh-keygen under test and not the one in $PATH
2. Include a test PKCS#11 operation to ensure that the P11 stack is
   working correctly.

Previously, it was possible for p11_setup to return success on
configurations with PKCS#11 support disabled.

2 months agolink ssh-keygen directly against ssh-pkcs11.c
Damien Miller [Wed, 8 Oct 2025 23:07:40 +0000 (10:07 +1100)]
link ssh-keygen directly against ssh-pkcs11.c

Matches what OpenBSD does and fixes ssh-keygen regression in
certifying keys using a CA key hosted via ssh-agent (bz3877)

2 months agoupstream: When tab-completing a filename, ensure that the completed
djm@openbsd.org [Wed, 8 Oct 2025 21:48:40 +0000 (21:48 +0000)]
upstream: When tab-completing a filename, ensure that the completed

string does not end up mid-way through a multibyte character, as this will
cause a fatal() later on.

based on GHPR#587 from @TaoistBrickscarrier; feedback tb@ kevlo@
ok dtucker@

OpenBSD-Commit-ID: efb977164b4e20d61204a66201a7592ba8291362

2 months agoupstream: fix crash at exit (visible via ssh-keygen -D) when
djm@openbsd.org [Wed, 8 Oct 2025 21:02:16 +0000 (21:02 +0000)]
upstream: fix crash at exit (visible via ssh-keygen -D) when

multiple keys loaded. ok markus deraadt dtucker

OpenBSD-Commit-ID: baa9763ec69d162108dafd962792ec5610ff45c9

2 months agoupstream: openssh-10.2
djm@openbsd.org [Wed, 8 Oct 2025 00:32:52 +0000 (00:32 +0000)]
upstream: openssh-10.2

The only change since 10.1 is the channels.c fix

OpenBSD-Commit-ID: 5eebeb0db14c694efd4ee96b5f16112e3e5d5ba9

2 months agoFix header name and move return outside of ifdef.
Darren Tucker [Wed, 8 Oct 2025 00:26:52 +0000 (11:26 +1100)]
Fix header name and move return outside of ifdef.

Fixes from Mike Frysinger via Github PR#597.

2 months agoCheck HAVE_MMAP too now that configure sets it.
Darren Tucker [Tue, 7 Oct 2025 10:10:33 +0000 (21:10 +1100)]
Check HAVE_MMAP too now that configure sets it.

2 months agoUse calloc for sshkeys if mmap is not supported.
Darren Tucker [Tue, 7 Oct 2025 10:07:05 +0000 (21:07 +1100)]
Use calloc for sshkeys if mmap is not supported.

Based on Github PR#597 from Mike Frysinger, any bugs added by me.

2 months agoAdd fcntl.h to includes.
Darren Tucker [Tue, 7 Oct 2025 09:25:07 +0000 (20:25 +1100)]
Add fcntl.h to includes.

From FreeBSD via bz#3874: "This was previously included due to nested
includes in Heimdal's headers.  Without this, the build fails with an
error due to redefining AT_FDCWD."

2 months agoOnly set PAM_RHOST if the remote host is not "UNKNOWN"
Daan De Meyer [Mon, 20 Mar 2023 19:22:14 +0000 (20:22 +0100)]
Only set PAM_RHOST if the remote host is not "UNKNOWN"

When using sshd's -i option with stdio that is not a AF_INET/AF_INET6
socket, auth_get_canonical_hostname() returns "UNKNOWN" which is then
set as the value of PAM_RHOST, causing pam to try to do a reverse DNS
query of "UNKNOWN", which times out multiple times, causing a
substantial slowdown when logging in.

To fix this, let's only set PAM_RHOST if the hostname is not "UNKNOWN".

2 months agoDon't copy native host keys for hostbased test.
Darren Tucker [Tue, 7 Oct 2025 09:10:56 +0000 (20:10 +1100)]
Don't copy native host keys for hostbased test.

Some github runners (notably macos-14) seem to have host keys where
public and private do not match, so generate our own keys for testing
purposes.

2 months agoAdd 10.1 branch to ci-status page.
Darren Tucker [Tue, 7 Oct 2025 09:10:07 +0000 (20:10 +1100)]
Add 10.1 branch to ci-status page.

2 months agoAdd clock_gettime compat shim.
Darren Tucker [Tue, 7 Oct 2025 09:04:40 +0000 (20:04 +1100)]
Add clock_gettime compat shim.

This fixes the build on macOS prior to 10.12 Sierra, since it does not
have it.  Found and tested by Sevan Janiyan.

2 months agoupstream: don't reuse c->isatty for signalling that the remote channel
djm@openbsd.org [Tue, 7 Oct 2025 08:02:32 +0000 (08:02 +0000)]
upstream: don't reuse c->isatty for signalling that the remote channel

has a tty attached as this causes side effects, e.g. in channel_handle_rfd().
bz3872

ok markus@

OpenBSD-Commit-ID: 4cd8a9f641498ca6089442e59bad0fd3dcbe85f8

2 months agodepend
Damien Miller [Mon, 6 Oct 2025 01:52:25 +0000 (12:52 +1100)]
depend

2 months agoupdate versions
Damien Miller [Mon, 6 Oct 2025 01:51:13 +0000 (12:51 +1100)]
update versions

2 months agosync ssh-copy-id to upstream version 527be673f4d
Damien Miller [Mon, 6 Oct 2025 01:48:16 +0000 (12:48 +1100)]
sync ssh-copy-id to upstream version 527be673f4d

2 months agoupstream: openssh-10.1
djm@openbsd.org [Mon, 6 Oct 2025 01:45:22 +0000 (01:45 +0000)]
upstream: openssh-10.1

OpenBSD-Commit-ID: 2a232c2d2fc05a23519f69bc29e6d8c076b97d97

2 months agoupstream: If write() returned short, the subsequent write would restart
dtucker@openbsd.org [Fri, 3 Oct 2025 01:03:45 +0000 (01:03 +0000)]
upstream: If write() returned short, the subsequent write would restart

from the beginning of the buffer not the end of what was written.  Fix, since
we want modpipe to corrupt data for testing purposes deliberately not
accidentally.  ok djm@

OpenBSD-Regress-ID: 50ca74d287445c58944f070bb92dc13b1d054b43

2 months agoupstream: typos: a ssh* -> an ssh*
naddy@openbsd.org [Sat, 4 Oct 2025 21:41:35 +0000 (21:41 +0000)]
upstream: typos: a ssh* -> an ssh*

ok dtucker@

OpenBSD-Commit-ID: a70fd2e1b23089260e8f5a7921b0debc06b011cb

2 months agoupstream: stray newline
djm@openbsd.org [Fri, 3 Oct 2025 00:09:26 +0000 (00:09 +0000)]
upstream: stray newline

OpenBSD-Commit-ID: b47ed4fa93b781c7ec8ae2936526a290f4e17e1f

2 months agoupstream: include openssl/bn.h explicitly in files where we use BN_*
djm@openbsd.org [Fri, 3 Oct 2025 00:08:02 +0000 (00:08 +0000)]
upstream: include openssl/bn.h explicitly in files where we use BN_*

makes things simpler for portable; from Mike Frysinger

OpenBSD-Commit-ID: 717e93403fd1108e175afd7451b5a4ab46a598fe

2 months agoupstream: Relax array check slightly. Prevents compiler warnings
dtucker@openbsd.org [Thu, 2 Oct 2025 08:38:43 +0000 (08:38 +0000)]
upstream: Relax array check slightly. Prevents compiler warnings

in -portable when there are no kbdint devices present.  ok djm@

OpenBSD-Commit-ID: c1c050cecd642d6073c792201908fd225191df93

2 months agoupstream: backout r1.243 (fix for fatal during tab-completion with
djm@openbsd.org [Thu, 2 Oct 2025 04:23:11 +0000 (04:23 +0000)]
upstream: backout r1.243 (fix for fatal during tab-completion with

some multibyte sequences) as it breaks the common case for tab completion.

Will deal with it properly after release.

OpenBSD-Commit-ID: 196d00f5ff19579214de45357f16a1fb2d624be1

2 months agoPass COMPATINCLUDES down to openbsd-compat too.
Darren Tucker [Thu, 2 Oct 2025 00:48:04 +0000 (10:48 +1000)]
Pass COMPATINCLUDES down to openbsd-compat too.

Fixes build on Solaris, AIX and probably others.

2 months agoPass new "compat includes" path via AC_SUBST.
Darren Tucker [Wed, 1 Oct 2025 04:34:02 +0000 (14:34 +1000)]
Pass new "compat includes" path via AC_SUBST.

This fixes the build when the directory path containing a space.
Found by Sevan Janiyan, tested by Job Snijders.  This doesn't fix
"make tests", however that is a different, pre-existing problem
that needs to be addressed separately.

2 months agoRemove compat "include" dir during distclean.
Darren Tucker [Wed, 1 Oct 2025 03:37:35 +0000 (13:37 +1000)]
Remove compat "include" dir during distclean.

2 months agoupstream: Set keys to NULL after freeing in tests where the
dtucker@openbsd.org [Wed, 1 Oct 2025 00:33:37 +0000 (00:33 +0000)]
upstream: Set keys to NULL after freeing in tests where the

variables will be used again.  Should prevent Coverity "potential use after
free" warnings.

OpenBSD-Regress-ID: 24d141657d25977e41dfb0c58e9b74ab093972bf

2 months agoupstream: Get rid of utf8 droppings in commment since it confuses
dtucker@openbsd.org [Wed, 1 Oct 2025 00:30:19 +0000 (00:30 +0000)]
upstream: Get rid of utf8 droppings in commment since it confuses

older shells. From Sevan Janiyan via openssh-unix-dev.

OpenBSD-Regress-ID: 67c11a5cff6ef23538c77e9b29d538e175e6cfe3

2 months agoUpdate OpenSSL & LibreSSL versions we test against.
Darren Tucker [Wed, 1 Oct 2025 02:17:54 +0000 (12:17 +1000)]
Update OpenSSL & LibreSSL versions we test against.

2 months agoupstream: during sftp uploads, avoid a condition where a failed write
djm@openbsd.org [Tue, 30 Sep 2025 00:10:42 +0000 (00:10 +0000)]
upstream: during sftp uploads, avoid a condition where a failed write

could be ignored if a subsequent write succeeded.

This is unlikely but technically possible because sftp servers are
allowed to reorder requests.

Reported by Graziano Stefani, ok tb@

OpenBSD-Commit-ID: 03904bce2c7f787223d01d7e1179fde15753eca3

2 months agoupstream: avoid a fatal() when sftp tab-completes filenames that
djm@openbsd.org [Tue, 30 Sep 2025 00:06:06 +0000 (00:06 +0000)]
upstream: avoid a fatal() when sftp tab-completes filenames that

share common utf-8 characters that don't encode to a complete codepoint

from menthu.zhou via GHPR#587; ok dtucker@

OpenBSD-Commit-ID: e07e4d8a8cac032ab536570b8214e6ef6839b585

2 months agoupstream: fix memory leak in mux_client_request_stdio_fwd GHPR#575
djm@openbsd.org [Tue, 30 Sep 2025 00:03:09 +0000 (00:03 +0000)]
upstream: fix memory leak in mux_client_request_stdio_fwd GHPR#575

by Boris Tonofa; ok dtucker

OpenBSD-Commit-ID: 410cdd05242304bd0196b9172ce5fcaf89d2d8ce

2 months agoDon't log audit messages with UNKNOWN hostname
Allison Karlitskaya [Wed, 3 Sep 2025 18:07:55 +0000 (20:07 +0200)]
Don't log audit messages with UNKNOWN hostname

The `host` parameter to audit_log_acct_message() is documented as
follows:

      host - The hostname if known. If not available pass a NULL.

but we pass the string "UNKNOWN" in case we don't know the hostname.
Make sure we pass NULL instead.

This avoids having the audit system attempt to perform a DNS lookup on
the hostname "UNKNOWN", which tends to result in long delays when
attempting to login.

2 months agoensure struct passwd fields are non-NULL in pwcopy
zhangjun [Fri, 22 Aug 2025 08:49:07 +0000 (16:49 +0800)]
ensure struct passwd fields are non-NULL in pwcopy

Android libc can return NULL pw_gecos, for example.

2 months agoupstream: Add explicit check for array overflow.
dtucker@openbsd.org [Mon, 29 Sep 2025 21:37:52 +0000 (21:37 +0000)]
upstream: Add explicit check for array overflow.

The array is bounded by a NULL sentinel which already prevents this,
however since we check the bit vector for overflow Coverity assumes that
check is for the devices array and flags it as a potential overflow.
Adding this additional check on the array placates CID 896018.  ok djm@
deraadt@

OpenBSD-Commit-ID: e92fff41341b38e4206a70655cc9acaaa032ebee

2 months agoupstream: Move ifdef to start of file. Removes diff vs portable.
dtucker@openbsd.org [Mon, 29 Sep 2025 21:30:15 +0000 (21:30 +0000)]
upstream: Move ifdef to start of file. Removes diff vs portable.

OpenBSD-Commit-ID: 55058ac3d477e4c696575039f5b275522b99ffea

2 months agoupstream: Include misc.h. Removes diff vs portable.
dtucker@openbsd.org [Mon, 29 Sep 2025 21:29:22 +0000 (21:29 +0000)]
upstream: Include misc.h. Removes diff vs portable.

OpenBSD-Commit-ID: 8aa48451fe5c37f04a339450c4ed9cfb8f4c288f

2 months agoupstream: Sort headers as per KNF. Removes diff vs portable.
dtucker@openbsd.org [Mon, 29 Sep 2025 21:28:33 +0000 (21:28 +0000)]
upstream: Sort headers as per KNF. Removes diff vs portable.

OpenBSD-Commit-ID: 55f5b9eaeb826a25cfb506a78136094275a71bcb

2 months agoupstream: Null out keys after freeing in tests in the case where we
dtucker@openbsd.org [Mon, 29 Sep 2025 07:40:55 +0000 (07:40 +0000)]
upstream: Null out keys after freeing in tests in the case where we

potentially reuse the variable.  Fixes Coverity CID 405057.

OpenBSD-Regress-ID: c52e86502b33bfa6e448448a74a0217dd519dd58

2 months agoupstream: avoid spurious error message when loading certificates
djm@openbsd.org [Mon, 29 Sep 2025 03:17:54 +0000 (03:17 +0000)]
upstream: avoid spurious error message when loading certificates

only bz3869

OpenBSD-Commit-ID: e7848fec50d15cc142fed946aa8f79abef3c5be7