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

14 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

14 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

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

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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

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

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

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

14 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

14 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

14 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

14 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

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

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

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

14 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

14 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

14 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

14 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

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

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

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

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

14 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

14 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

14 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

14 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

14 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

14 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.)

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

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

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

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

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

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

14 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

14 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

14 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

14 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

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

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

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

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

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

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

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

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

14 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).

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

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

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

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

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

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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

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

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

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

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

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

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

15 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:

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

15 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

15 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

15 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

15 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

15 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

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

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

15 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:

15 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().

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

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

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

15 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

15 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

15 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

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

15 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

15 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

15 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

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

OpenBSD-Commit-ID: f912725c7d303720706b3ccfb2cb846d46296d13