]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
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.

2 months agoRemove 9.7 branch from CI status page.
Darren Tucker [Thu, 22 May 2025 00:52:31 +0000 (10:52 +1000)] 
Remove 9.7 branch from CI status page.

It's been obsolete long enough that github no longer reports its
status.

2 months agopull a small netcat SOCKS4A fix from upstream
Damien Miller [Wed, 21 May 2025 09:14:47 +0000 (19:14 +1000)] 
pull a small netcat SOCKS4A fix from upstream

2 months agoupstream: test SOCKS4A; ok tb
djm@openbsd.org [Wed, 21 May 2025 08:41:52 +0000 (08:41 +0000)] 
upstream: test SOCKS4A; ok tb

OpenBSD-Regress-ID: d880b75280295cd581a86e39bb0996d347f122d2

2 months agoupstream: remove log tarballing "it seemed like a good idea at the
djm@openbsd.org [Wed, 21 May 2025 08:36:39 +0000 (08:36 +0000)] 
upstream: remove log tarballing "it seemed like a good idea at the

time" - dtucker@

ensure that log files have correct perms when running under sudo/doas

ok dtucker@

OpenBSD-Regress-ID: 20588c14b05de9519f85d638b374b66ae0678c89

2 months agoupstream: use logit_f("...") instead of logit("func: ...")
djm@openbsd.org [Wed, 21 May 2025 06:44:24 +0000 (06:44 +0000)] 
upstream: use logit_f("...") instead of logit("func: ...")

OpenBSD-Commit-ID: c8d49eb39a9abff3cbcaeaf7df9d48468a5a0695

2 months agoupstream: function to make a sshbuf from a hex string; useful in
djm@openbsd.org [Wed, 21 May 2025 06:43:48 +0000 (06:43 +0000)] 
upstream: function to make a sshbuf from a hex string; useful in

tests

also constify some arguments

OpenBSD-Commit-ID: 00f9c25b256be0efd73f2d8268ff041bc45ffb2c

2 months agomerge netcat SOCKS4A support from OpenBSD
Damien Miller [Wed, 21 May 2025 08:47:46 +0000 (18:47 +1000)] 
merge netcat SOCKS4A support from OpenBSD

Not a full sync of this file as we have diverged substantially
from upstream (it has libtls support, etc.)

2 months agoInclude OpenSSL compat shim where needed.
Darren Tucker [Tue, 20 May 2025 12:17:02 +0000 (22:17 +1000)] 
Include OpenSSL compat shim where needed.

2 months agoRun all tests on Cygwin again.
Darren Tucker [Tue, 20 May 2025 09:28:55 +0000 (19:28 +1000)] 
Run all tests on Cygwin again.

... now that we've fixed ci-setup on Cygwin.

2 months agoUse USERNAME rather than LOGNAME on Cygwin.
Darren Tucker [Tue, 20 May 2025 08:48:23 +0000 (18:48 +1000)] 
Use USERNAME rather than LOGNAME on Cygwin.

LOGNAME is specified by POSIX, but Windows (or at least, github's
Windows images) don't set it.

2 months agoAdd debug output when setting up CI environment.
Darren Tucker [Tue, 20 May 2025 08:28:52 +0000 (18:28 +1000)] 
Add debug output when setting up CI environment.

2 months agoInclude openssl compat shims in test.
Darren Tucker [Tue, 20 May 2025 09:16:38 +0000 (19:16 +1000)] 
Include openssl compat shims in test.

Fixes tests on platforms using older LibreSSL releases prior to 3.4.

2 months agoAdd compat shims for EC_POINT affine_coordinates
Darren Tucker [Tue, 20 May 2025 08:14:06 +0000 (18:14 +1000)] 
Add compat shims for EC_POINT affine_coordinates

LibreSSL <3.4 does not have EC_POINT_[gs]et_affine_coordinates
but does have the now-deprecated _GFp variantes.  We still support
LibreSSL back as far as 3.2.x so add a compat shim.

2 months agoupstream: Use EC_POINT_[sg]et_affine_coordinates()
tb@openbsd.org [Mon, 12 May 2025 05:42:02 +0000 (05:42 +0000)] 
upstream: Use EC_POINT_[sg]et_affine_coordinates()

It is available in all supported OpenSSL flavors/versions and the _GFp
variants will be removed from LibreSSL.

ok hshoexer jsing

OpenBSD-Regress-ID: 66cf1561e7b6c49002978f2d6720956f33a882f0

2 months agoupstream: Use EC_POINT_[sg]et_affine_coordinates()
tb@openbsd.org [Mon, 12 May 2025 05:41:20 +0000 (05:41 +0000)] 
upstream: Use EC_POINT_[sg]et_affine_coordinates()

It is available in all supported OpenSSL flavors/versions and the _GFp
variants will be removed from LibreSSL.

ok hshoexer jsing

OpenBSD-Commit-ID: ecedca0e1ffa80e0c9ef7c787bc6a972882c596b

2 months agoupstream: make the progress-meter code safe against being called
djm@openbsd.org [Fri, 9 May 2025 02:42:03 +0000 (02:42 +0000)] 
upstream: make the progress-meter code safe against being called

when not initialised; spotted by tb@ feedback/ok tb@ deraadt@

OpenBSD-Commit-ID: a9fda1ee08a24c62e0981ff6d15ca93b63467038

2 months agoupstream: convert a last quad_t to int64_t. ok deraadt djm
tedu@openbsd.org [Thu, 8 May 2025 17:32:53 +0000 (17:32 +0000)] 
upstream: convert a last quad_t to int64_t. ok deraadt djm

OpenBSD-Commit-ID: 1c9e01ba1a9ccf442a9cdf10f222077f66885f1f

2 months agoSet runner pasword to random string.
Darren Tucker [Tue, 20 May 2025 05:01:29 +0000 (15:01 +1000)] 
Set runner pasword to random string.

The most recent version of the Github ubuntu-latest image sets the
password field to "!" which sshd considers to be a locked account,
breaking most of the tests.

2 months agoDebug log for why an account is considered locked.
Darren Tucker [Sun, 11 May 2025 12:54:13 +0000 (22:54 +1000)] 
Debug log for why an account is considered locked.

2 months agoMove debug log output into separate workflow step.
Darren Tucker [Sun, 11 May 2025 06:35:31 +0000 (16:35 +1000)] 
Move debug log output into separate workflow step.

Should reduce the need to scroll back to find out which test actually
failed.

2 months agoSkip sftp-perm on Cygwin too.
Darren Tucker [Sat, 10 May 2025 11:48:06 +0000 (21:48 +1000)] 
Skip sftp-perm on Cygwin too.

2 months agoRemove CYGWIN binmode as it's now obsolete.
Darren Tucker [Sat, 10 May 2025 00:23:30 +0000 (10:23 +1000)] 
Remove CYGWIN binmode as it's now obsolete.

2 months agoAlso skip sftp-cmds test on Cygwin.
Darren Tucker [Fri, 9 May 2025 23:25:18 +0000 (09:25 +1000)] 
Also skip sftp-cmds test on Cygwin.

Fails at the hardlink step.

2 months agoTell Cygwin to use native symlinks.
Darren Tucker [Fri, 9 May 2025 22:52:11 +0000 (08:52 +1000)] 
Tell Cygwin to use native symlinks.

2 months agoSkip keygen-knownhost test on Cygwin.
Darren Tucker [Fri, 9 May 2025 22:26:37 +0000 (08:26 +1000)] 
Skip keygen-knownhost test on Cygwin.

It fails but at this time it's not clear why.

2 months agoPass Cygwin setup location to CI setup.
Darren Tucker [Fri, 9 May 2025 21:59:44 +0000 (07:59 +1000)] 
Pass Cygwin setup location to CI setup.

(instead of hard coding it, wrongly).

2 months agoAdd RUN_ONLY_TEST to limit which tests are run.
Darren Tucker [Fri, 9 May 2025 20:37:24 +0000 (06:37 +1000)] 
Add RUN_ONLY_TEST to limit which tests are run.

For testing, you can set the repo variable RUN_ONLY_TEST in your repo
(Repo -> Settings -> Security -> Actions -> Variables) to run only that test.

2 months agoMove misc-agent.o to LIBSSH_OBJS.
Darren Tucker [Fri, 9 May 2025 09:32:06 +0000 (19:32 +1000)] 
Move misc-agent.o to LIBSSH_OBJS.

It's needed by the fuzzer.

2 months agoPut PRIV_ECDSA back, it's still used.
Darren Tucker [Fri, 9 May 2025 09:08:36 +0000 (19:08 +1000)] 
Put PRIV_ECDSA back, it's still used.

Should fix oss-fuzz test.

2 months agoSince it's unused, make dirfd() take void *.
Darren Tucker [Thu, 8 May 2025 08:56:39 +0000 (18:56 +1000)] 
Since it's unused, make dirfd() take void *.

Some platforms (eg Old BSDs) in some configurations define DIR to "void
*", which causes compile errors in the no-op implementation.

2 months agoAdd no-op implmentation of dirfd().
Darren Tucker [Thu, 8 May 2025 01:38:24 +0000 (11:38 +1000)] 
Add no-op implmentation of dirfd().

Fixes build on pre-POSIX.1 2008 systems.

2 months agossh-agent: exit 0 from SIGTERM under systemd socket-activation
Daniel Kahn Gillmor [Wed, 16 Apr 2025 00:18:34 +0000 (10:18 +1000)] 
ssh-agent: exit 0 from SIGTERM under systemd socket-activation

When the ssh-agent service is configured to be launched under systemd
socket-activation, the user can inspect the status of the agent with
something like:

    systemctl --user status ssh-agent.service

If the user does:

    systemctl --user stop ssh-agent.service

it causes the `systemd --user` supervisor to send a SIGTERM to the
agent, which terminates while leaving the systemd-managed socket in
place.  That's good, and as expected. (If the user wants to close the
socket, they can do "systemctl --user stop ssh-agent.socket" instead)

But because ssh-agent exits with code 2 in response to a SIGTERM, the
supervisor marks the service as "failed", even though the state of the
supervised service is exactly the same as during session startup (not
running, ready to launch when a client connects to the socket).

This change makes ssh-agent exit cleanly (code 0) in response to a
SIGTERM when launched under socket activation. This aligns the systemd
supervisor's understanding of the state of supervised ssh-agent with
reality.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2 months agoSkip d_type check on platforms that don't have it.
Darren Tucker [Wed, 7 May 2025 11:05:06 +0000 (21:05 +1000)] 
Skip d_type check on platforms that don't have it.

On those, the subsequent stat() should catch the sockets.

2 months agoupstream: Rename sockaddr_un sun -> sunaddr.
dtucker@openbsd.org [Wed, 7 May 2025 10:44:26 +0000 (10:44 +0000)] 
upstream: Rename sockaddr_un sun -> sunaddr.

This makes things easier in -portable, where on Solaris an derivatives
"sun" is defined to "1", causing compilation errors.  ok deraadt@.

OpenBSD-Commit-ID: 0669043afb49856b57b382f0489221bd98305d3b

2 months agoupstream: remove DSA from the regression/unit test suite too.
djm@openbsd.org [Tue, 6 May 2025 06:05:48 +0000 (06:05 +0000)] 
upstream: remove DSA from the regression/unit test suite too.

OpenBSD-Regress-ID: 4424d2eaf0bce3887318ef6d18de6c06f3617d6e

2 months agoupstream: another missing ifdef
djm@openbsd.org [Tue, 15 Apr 2025 05:31:24 +0000 (05:31 +0000)] 
upstream: another missing ifdef

OpenBSD-Regress-ID: 4f71f8f122eac4cbf7f1d2088a9be45317dd3e4a

2 months agoupstream: missing ifdef
djm@openbsd.org [Tue, 15 Apr 2025 05:00:13 +0000 (05:00 +0000)] 
upstream: missing ifdef

OpenBSD-Regress-ID: 7260fb672de5738c17dec06c71a5be0186bb2b09

2 months agoupstream: memory leak on error path; bz3821
djm@openbsd.org [Wed, 7 May 2025 04:10:21 +0000 (04:10 +0000)] 
upstream: memory leak on error path; bz3821

OpenBSD-Commit-ID: 65577596a15ad6dd9a1ab3fc24c1c31303ee6e2b

2 months agoupstream: test ssh-agent with the -T flag to force the old /tmp
deraadt@openbsd.org [Tue, 6 May 2025 15:15:05 +0000 (15:15 +0000)] 
upstream: test ssh-agent with the -T flag to force the old /tmp

location rather than inside the homedir.  During relink operation,
/.ssh/agent was created which is surprising.  This test sequence could use
some improvement so this is a temporary fix. observed by florian, change ok
semarie

OpenBSD-Commit-ID: c7246a6b519ac390ca550719f91acfdaef1fa0f0

2 months agoupstream: finally remove DSA signature support from OpenSSH.
djm@openbsd.org [Tue, 6 May 2025 05:40:56 +0000 (05:40 +0000)] 
upstream: finally remove DSA signature support from OpenSSH.

feedback/ok tb@, ok deraadt@

OpenBSD-Commit-ID: bfe6ee73c1b676c81a2901030c791f8ec888228f

2 months agoupstream: Now that there's an I-D for certificate keys, refer to
djm@openbsd.org [Mon, 5 May 2025 05:51:11 +0000 (05:51 +0000)] 
upstream: Now that there's an I-D for certificate keys, refer to

that instead of the much more basic format description we had previously.

OpenBSD-Commit-ID: cf01e0727a813fee8626ad7b3aa240621cc92014

2 months agoupstream: - add full stop to the text in -a - move the -U and -u
jmc@openbsd.org [Mon, 5 May 2025 05:47:28 +0000 (05:47 +0000)] 
upstream: - add full stop to the text in -a - move the -U and -u

text to the correct place

OpenBSD-Commit-ID: 2fb484337a0978c703f61983bb14bc5cbaf898c2

2 months agoAdd minimal implementations of fstatat and unlinkat.
Darren Tucker [Tue, 6 May 2025 09:01:00 +0000 (19:01 +1000)] 
Add minimal implementations of fstatat and unlinkat.

Fixes build on some pre-POSIX.1-2008 platforms.

2 months agoNew location of cygwin setup.
Darren Tucker [Mon, 5 May 2025 22:15:34 +0000 (08:15 +1000)] 
New location of cygwin setup.

2 months agoBoringssl now puts libcrypto in a different place.
Darren Tucker [Mon, 5 May 2025 22:07:23 +0000 (08:07 +1000)] 
Boringssl now puts libcrypto in a different place.

2 months agoHandle systems that don't have st_mtim.
Darren Tucker [Mon, 5 May 2025 10:45:42 +0000 (20:45 +1000)] 
Handle systems that don't have st_mtim.

Ignores nanoseconds, but it's checking for >1h old so a few nanoseconds
shouldn't matter much.  Fixes build on Mac OS X.

2 months agoSupply timespecsub if needed.
Darren Tucker [Mon, 5 May 2025 09:09:25 +0000 (19:09 +1000)] 
Supply timespecsub if needed.

2 months agoincludes.h for compat, time.h for clock_gettime.
Darren Tucker [Mon, 5 May 2025 09:08:48 +0000 (19:08 +1000)] 
includes.h for compat, time.h for clock_gettime.

2 months agoCygwin install in back on D:
Darren Tucker [Mon, 5 May 2025 08:51:34 +0000 (18:51 +1000)] 
Cygwin install in back on D:

2 months agodepend
Damien Miller [Mon, 5 May 2025 04:59:30 +0000 (14:59 +1000)] 
depend

2 months agoupstream: missing file in previous commit
djm@openbsd.org [Mon, 5 May 2025 03:35:06 +0000 (03:35 +0000)] 
upstream: missing file in previous commit

OpenBSD-Commit-ID: e526c97fcb2fd9f0b7b229720972426ab437d7eb

2 months agoupstream: Move agent listener sockets from /tmp to under
djm@openbsd.org [Mon, 5 May 2025 02:48:06 +0000 (02:48 +0000)] 
upstream: Move agent listener sockets from /tmp to under

~/.ssh/agent for both ssh-agent(1) and forwarded sockets in sshd(8).

This ensures processes (such as Firefox) that have restricted
filesystem access that includes /tmp (via unveil(3)) do not have the
ability to use keys in an agent.

Moving the default directory has the consequence that the OS will no
longer clean up stale agent sockets, so ssh-agent now gains this
ability.

To support $HOME on NFS, the socket path includes a truncated hash of
the hostname. ssh-agent will by default only clean up sockets from
the same hostname.

ssh-agent gains some new flags: -U suppresses the automatic cleanup
of stale sockets when it starts. -u forces a cleanup without
keeping a running agent, -uu forces a cleanup that ignores the
hostname. -T makes ssh-agent put the socket back in /tmp.

feedback deraadt@ naddy@, doitdoitdoit deraadt@

OpenBSD-Commit-ID: 8383dabd98092fe5498d5f7f15c7d314b03a93e1

2 months agoupstream: correct log messages; the reap function is used for more
djm@openbsd.org [Mon, 5 May 2025 02:40:30 +0000 (02:40 +0000)] 
upstream: correct log messages; the reap function is used for more

than just the preauth process now

OpenBSD-Commit-ID: 768c5b674bd77802bb197c31dba78559f1174c02

3 months agoupstream: make writing known_hosts lines more atomic, by writing
djm@openbsd.org [Wed, 30 Apr 2025 05:26:15 +0000 (05:26 +0000)] 
upstream: make writing known_hosts lines more atomic, by writing

the entire line in one operation and using unbuffered stdio.

Usually writes to this file are serialised on the "Are you sure you
want to continue connecting?" prompt, but if host key checking is
disabled and connections were being made with high concurrency
then interleaved writes might have been possible.

feedback/ok deraadt@ millert@

OpenBSD-Commit-ID: d11222b49dabe5cfe0937b49cb439ba3d4847b08

3 months agoupstream: fix a out-of-bounds read if the known_hosts file is
djm@openbsd.org [Wed, 30 Apr 2025 05:23:15 +0000 (05:23 +0000)] 
upstream: fix a out-of-bounds read if the known_hosts file is

truncated after the hostname.

Reported by the OpenAI Security Research Team

ok deraadt@

OpenBSD-Commit-ID: c0b516d7c80c4779a403826f73bcd8adbbc54ebd

3 months agoSet Windows permssions on regress dir.
Darren Tucker [Sat, 19 Apr 2025 23:07:57 +0000 (09:07 +1000)] 
Set Windows permssions on regress dir.

Prevents "unprotected private key file" error when running tests.

3 months agoAdd 10.0 branch to test status page.
Darren Tucker [Thu, 17 Apr 2025 22:18:52 +0000 (08:18 +1000)] 
Add 10.0 branch to test status page.

3 months agocygwin-install-action now puts setup.exe on D:
Darren Tucker [Thu, 17 Apr 2025 22:14:16 +0000 (08:14 +1000)] 
cygwin-install-action now puts setup.exe on D:

3 months agoInclude time.h for clock_gettime().
Darren Tucker [Thu, 17 Apr 2025 22:10:32 +0000 (08:10 +1000)] 
Include time.h for clock_gettime().

3 months agoAdd includes.h for new tests.
Darren Tucker [Thu, 17 Apr 2025 06:51:14 +0000 (16:51 +1000)] 
Add includes.h for new tests.

Fixes builds on older platforms.

3 months agoProvide INFINITY if it's not provided.
Darren Tucker [Wed, 16 Apr 2025 12:29:17 +0000 (22:29 +1000)] 
Provide INFINITY if it's not provided.

INFINITY is specified in c99, so define if not provided.

3 months agoLook for sqrt(), possibly in libm.
Darren Tucker [Tue, 15 Apr 2025 11:58:49 +0000 (21:58 +1000)] 
Look for sqrt(), possibly in libm.

The unit tests now use sqrt(), which in some platforms (notably
DragonFlyBSD and Solaris) is not in libc but rather libm.  Since only
the unit tests use this, add TESTLIBS and if necessary put libm in it.

3 months agoupstream: Cast signalled_keydrop to int when logging to prevent warning
dtucker@openbsd.org [Tue, 15 Apr 2025 09:22:25 +0000 (09:22 +0000)] 
upstream: Cast signalled_keydrop to int when logging to prevent warning

on platforms where sig_atomic_t is not the same as int.  bz#3811, patch from
jlduran at gmail com.

OpenBSD-Commit-ID: b6bc9e9006e7f81ade57d41a48623a4323deca6c

3 months agoupstream: basic benchmarking support for the unit test framework enable
djm@openbsd.org [Tue, 15 Apr 2025 04:00:42 +0000 (04:00 +0000)] 
upstream: basic benchmarking support for the unit test framework enable

with "make UNITTEST_BENCHMARK=yes"

ok dtucker@

OpenBSD-Regress-ID: 7f16a2e247f860897ca46ff87bccbe6002a32564

3 months agoupstream: rework the text for -3 to make it clearer what default
jmc@openbsd.org [Mon, 14 Apr 2025 05:41:42 +0000 (05:41 +0000)] 
upstream: rework the text for -3 to make it clearer what default

behaviour is, and adjust the text for -R to make them more consistent;

issue raised by mikhail mp39590;
behaviour explained by naddy

ok djm

OpenBSD-Commit-ID: 15ff3bd1518d86c84fa8e91d7aa72cfdb41dccc8

3 months agoupdate version numbers
Damien Miller [Wed, 9 Apr 2025 07:02:17 +0000 (17:02 +1000)] 
update version numbers

3 months agoupstream: openssh-10.0
djm@openbsd.org [Wed, 9 Apr 2025 07:00:21 +0000 (07:00 +0000)] 
upstream: openssh-10.0

OpenBSD-Commit-ID: db5b4a1f1c9e988f8f166b56dc5643606294b403

3 months agoupstream: Fix logic error in DisableForwarding option. This option
djm@openbsd.org [Wed, 9 Apr 2025 07:00:03 +0000 (07:00 +0000)] 
upstream: Fix logic error in DisableForwarding option. This option

was documented as disabling X11 and agent forwarding but it failed to do so.
Spotted by Tim Rice.

OpenBSD-Commit-ID: fffc89195968f7eedd2fc57f0b1f1ef3193f5ed1

3 months agoupstream: oops, I accidentally backed out the typo fix
djm@openbsd.org [Wed, 9 Apr 2025 01:24:40 +0000 (01:24 +0000)] 
upstream: oops, I accidentally backed out the typo fix

OpenBSD-Commit-ID: f485f79bf3e9ebbe1de13ac96150cf458956cfd8

3 months agoupstream: typo
djm@openbsd.org [Wed, 9 Apr 2025 01:23:47 +0000 (01:23 +0000)] 
upstream: typo

OpenBSD-Commit-ID: f912725c7d303720706b3ccfb2cb846d46296d13

3 months agoinitialise websafe_allowlist in agent fuzzer
Damien Miller [Tue, 8 Apr 2025 23:49:55 +0000 (09:49 +1000)] 
initialise websafe_allowlist in agent fuzzer

3 months agoupstream: typo
djm@openbsd.org [Tue, 8 Apr 2025 23:10:46 +0000 (23:10 +0000)] 
upstream: typo

OpenBSD-Regress-ID: 08477b936d1d0c1e8a98aa1c0e1bdde8871894c9

3 months agoupstream: typo
djm@openbsd.org [Tue, 8 Apr 2025 23:10:08 +0000 (23:10 +0000)] 
upstream: typo

OpenBSD-Commit-ID: 6e683e13e72bf1e43bbd3bbc6a8332d5a98bdc99

3 months agoupstream: Include time.h for time().
dtucker@openbsd.org [Mon, 7 Apr 2025 08:12:22 +0000 (08:12 +0000)] 
upstream: Include time.h for time().

Fixes warning on some platforms when building without openssl.

OpenBSD-Commit-ID: 04ca29b8eaae1860c7adde3e770baa1866e30a54

3 months agoupstream: Wrap #include <openssl/dsa.h> in #ifdef WITH_DSA
tb@openbsd.org [Wed, 2 Apr 2025 04:28:03 +0000 (04:28 +0000)] 
upstream: Wrap #include <openssl/dsa.h> in #ifdef WITH_DSA

ok djm

OpenBSD-Commit-ID: ed01a7c102243f84e4a317aefb431916d98aab15

3 months agoremove all instances of -pie from LDFLAGS
Damien Miller [Wed, 2 Apr 2025 22:10:19 +0000 (09:10 +1100)] 
remove all instances of -pie from LDFLAGS

Previously only the first instance of this flag was removed.
Unbreaks build on OpenSUSE Tumbleweed. Patch from Antonio Larrosa

4 months agoupstream: remove ability to enable DSA support. Actual code will be
djm@openbsd.org [Tue, 1 Apr 2025 23:23:20 +0000 (23:23 +0000)] 
upstream: remove ability to enable DSA support. Actual code will be

g/c'd separately. ok deraadt@

OpenBSD-Commit-ID: 2a032b75156c4d922e8343fa97ff6bc227f09819

4 months agoupstream: Add TEST_SSH_SSHD_ENV to sshd lines here too.
dtucker@openbsd.org [Fri, 28 Mar 2025 21:45:55 +0000 (21:45 +0000)] 
upstream: Add TEST_SSH_SSHD_ENV to sshd lines here too.

OpenBSD-Regress-ID: 045f2c88b42d694b404db51c5de5eca20d748ff1

4 months agoupstream: Pass "ControlMaster no" to ssh when invoked by scp & sftp.
dtucker@openbsd.org [Fri, 28 Mar 2025 06:04:07 +0000 (06:04 +0000)] 
upstream: Pass "ControlMaster no" to ssh when invoked by scp & sftp.

If you have ControlMaster auto (or yes) in your config, and the
first connection you make is via scp or sftp, then you may get a
few unexpected options applied to it (eg ForwardX11 no), since sftp
and sftp explicitly disable those for reasons.  These effects will
persist beyond the initial scp or sftp command.

This explicitly disables persistent session *creation* by scp and sftp.
It will not prevent them from using an existing session if one has
already been created.

From Github PR#557, ok djm@ kn@

OpenBSD-Commit-ID: 9dad7c737466837e0150c4318920f46d844770c4

4 months agoupstream: Set sshd environment variables during sshd test run too.
dtucker@openbsd.org [Fri, 28 Mar 2025 05:41:15 +0000 (05:41 +0000)] 
upstream: Set sshd environment variables during sshd test run too.

OpenBSD-Regress-ID: 50cb325d92c390a2909662c901f6ac5d80b6f74d

4 months agoupstream: Add TEST_SSH_SSHD_ENV variable which is added to sshd's
dtucker@openbsd.org [Fri, 28 Mar 2025 05:36:24 +0000 (05:36 +0000)] 
upstream: Add TEST_SSH_SSHD_ENV variable which is added to sshd's

environment. Will be used in Portable to tweak behaviour of tcmalloc's
debugging.

OpenBSD-Regress-ID: 67e38c3c4517ddb72c8a3549a3325a166d7bb6d6

4 months agoupstream: chown log directory in addition to log files.
dtucker@openbsd.org [Fri, 28 Mar 2025 05:33:30 +0000 (05:33 +0000)] 
upstream: chown log directory in addition to log files.

OpenBSD-Regress-ID: b520d54a0bbf2c6554413c798218bda26b385ad9

4 months agoBe explicit about environment variables for tests.
Darren Tucker [Fri, 28 Mar 2025 05:47:58 +0000 (16:47 +1100)] 
Be explicit about environment variables for tests.

This will make it easier to reproduce a test failure by cut-and-paste of
the corresponding line from the github log.

4 months agoAdd tcmalloc flags to TEST_SSH_SSHD_ENV.
Darren Tucker [Fri, 28 Mar 2025 05:46:40 +0000 (16:46 +1100)] 
Add tcmalloc flags to TEST_SSH_SSHD_ENV.

This will get passed to sshd via test-exec.sh.

4 months agoAdd PuTTY 0.81, 0.82 and 0.83 to tests.
Darren Tucker [Thu, 27 Mar 2025 12:04:44 +0000 (23:04 +1100)] 
Add PuTTY 0.81, 0.82 and 0.83 to tests.

4 months agoInclude TCMALLOC_STACKTRACE_METHOD in output.
Darren Tucker [Thu, 27 Mar 2025 11:30:40 +0000 (22:30 +1100)] 
Include TCMALLOC_STACKTRACE_METHOD in output.

If TCMALLOC_STACKTRACE_METHOD happens to be set, include it in the debug
output to make reproducing test cases easier.

4 months agoTest with-linux-memlock-onfault in kitchensink.
Darren Tucker [Thu, 27 Mar 2025 09:15:11 +0000 (20:15 +1100)] 
Test with-linux-memlock-onfault in kitchensink.

4 months agoInclude fcntl.h so AT_FDCWD does not get redefined.
Collin Funk [Thu, 27 Mar 2025 01:24:59 +0000 (18:24 -0700)] 
Include fcntl.h so AT_FDCWD does not get redefined.

4 months agoAdd support for locking memory on Linux
Daniil Tatianin [Thu, 27 Feb 2025 08:37:13 +0000 (11:37 +0300)] 
Add support for locking memory on Linux

Linux wakes up kcompactd threads in order to make more contiguous memory
available on the system, it does this by migrating live movable pages
(actively modifying live processes' page tables and constantly flooding
them with page invalidation IPIs, which can be up to millions per
second), which causes the process to become unresponsive for up to
seconds or even minutes in some severe cases. In case of sshd, we want
to always be able to connect to the system, even if it's under heavy
kcompactd load.

Introduce an option to protect sshd and its children sessions from being
compacted by kcompactd (this works in cojunction with
compact_unevictable_allowed = 0). Note that we depend on MCL_ONFAULT
being available, which was introduced in linux 4.4. MCL_ONFAULT allows
the system to lock pages lazily, thus drastically reducing memory usage
of a locked process (without MCL_ONFAULT, every existing mapping in the
process is instantly write-faulted).

4 months agoplatform: introduce a way to hook new session start
Daniil Tatianin [Thu, 27 Feb 2025 08:46:25 +0000 (11:46 +0300)] 
platform: introduce a way to hook new session start

Previously this was possible via post_fork_child, but ever since sshd
was split into multiple binaries, this is now no longer possible becase
of execv.

4 months agoupstream: Prevent theoretical NULL deref in throughlocal_sftp.
dtucker@openbsd.org [Wed, 19 Mar 2025 06:11:15 +0000 (06:11 +0000)] 
upstream: Prevent theoretical NULL deref in throughlocal_sftp.

Coverity CID 405019, although at the moment it's not reachable. ok djm@

OpenBSD-Commit-ID: 630d46c1021b69fbb470e349976c70e9a48b7644

4 months agoFix workflow syntax again.
Darren Tucker [Wed, 19 Mar 2025 06:35:10 +0000 (17:35 +1100)] 
Fix workflow syntax again.

4 months agoDifferentiate logfiles better.
Darren Tucker [Tue, 18 Mar 2025 09:54:48 +0000 (20:54 +1100)] 
Differentiate logfiles better.

4 months agoFix another typo in workflow.
Darren Tucker [Tue, 18 Mar 2025 09:27:46 +0000 (20:27 +1100)] 
Fix another typo in workflow.

4 months agoFix syntax error in workflow.
Darren Tucker [Tue, 18 Mar 2025 07:16:12 +0000 (18:16 +1100)] 
Fix syntax error in workflow.

4 months agoIdentify each logfile while printing them.
Darren Tucker [Tue, 18 Mar 2025 07:13:14 +0000 (18:13 +1100)] 
Identify each logfile while printing them.

4 months agoupstream: fix NULL dereference for Match conditions missing
djm@openbsd.org [Tue, 18 Mar 2025 04:53:14 +0000 (04:53 +0000)] 
upstream: fix NULL dereference for Match conditions missing

arguments, e.g. "Match user". Spotted by Coverity (CID 477813)

OpenBSD-Commit-ID: 13584281cfa23b8ebc41f9d128a6b9464ae960d4

4 months agoupstream: Fix EVP_CIPHER_CTX_ctrl() return checks
tb@openbsd.org [Fri, 14 Mar 2025 09:49:49 +0000 (09:49 +0000)] 
upstream: Fix EVP_CIPHER_CTX_ctrl() return checks

While this API tries to translate negative return values (i.e. -1) to 0
in BoringSSL and LibreSSL, it is still possible for it to return negative
values in prinicple. We even incorrectly document that -1 can be returned
while Boring and OpenSSL plead the Fifth.

In OpenSSL 3 there are now code paths that explicitly return -1 and they
started shifting their return checks to <= 0 - of course they do this in
inconsistent and sometimes incorrect manner. While these paths aren't
reachable from ssh right now, who can really tell what happens in the two
hundred lines of inscrutable bloated mess this has become.

So error check with <= 0 to ensure that we don't accidentally translate an
error to success.

ok markus schwarze

OpenBSD-Commit-ID: a855c833cf4ecfce43bedc761f26ad924f70483c