]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
21 hours agomention sntrup761x25519-sha512 in manpages V_9_1 anongit/V_9_1
Damien Miller [Tue, 12 Aug 2025 23:16:34 +0000 (09:16 +1000)] 
mention sntrup761x25519-sha512 in manpages

Spotted by Colin Watson

2 days agosupport sntrup761x25519-sha512 alias github-selfhosted/V_9_1 github/V_9_1
Damien Miller [Mon, 11 Aug 2025 05:54:35 +0000 (15:54 +1000)] 
support sntrup761x25519-sha512 alias

OpenSSH 9.1 supports the sntrup761x25519-sha512@openssh.com
key agreement algorithm. As part of standardisation, this algorithm
has been assigned the name sntrup761x25519-sha512.

This commit enables the existing algorithm under this new name.

2 years agoRemove compat from the default tests.
Darren Tucker [Fri, 16 Dec 2022 13:03:00 +0000 (00:03 +1100)] 
Remove compat from the default tests.

The Makefile changes to get the compat tests to work went in after
the V_9_1 branch, so don't test those on this branch.

2 years agoFix compat regress to work with non-GNU make.
Darren Tucker [Thu, 3 Nov 2022 10:44:23 +0000 (21:44 +1100)] 
Fix compat regress to work with non-GNU make.

2 years agoOnly run opensslver tests if built with OpenSSL.
Darren Tucker [Wed, 2 Nov 2022 23:00:43 +0000 (10:00 +1100)] 
Only run opensslver tests if built with OpenSSL.

2 years agoBackport test workflow config changes.
Darren Tucker [Fri, 16 Dec 2022 08:23:07 +0000 (19:23 +1100)] 
Backport test workflow config changes.

The self-hosted runner setup has been changed recently and the configs
in the V_9_1 branch no longer work with the current runners.  Backport
the changes from master so that the tests on this branch work again.

2 years agoUse -fzero-call-used-regs=used on clang 15.
Darren Tucker [Wed, 30 Nov 2022 00:23:11 +0000 (11:23 +1100)] 
Use -fzero-call-used-regs=used on clang 15.

clang 15 seems to have a problem with -fzero-call-used-reg=all which
causes spurious "incorrect signature" failures with ED25519.  On those
versions, use -fzero-call-used-regs=used instead.  (We may add exceptions
later if specific versions prove to be OK).  Also move the GCC version
check to match.

Initial investigation by Daniel Pouzzner (douzzer at mega nu), workaround
suggested by Bill Wendling (morbo at google com).  bz#3475, ok djm@

2 years agoDon't run compat-tests on V_9_1 branch.
Darren Tucker [Tue, 8 Nov 2022 06:07:45 +0000 (17:07 +1100)] 
Don't run compat-tests on V_9_1 branch.

The requisite fixes did not go into the main branch until after V_9_1
was branched.

2 years agoAdd CIFuzz to V_9_1 branch.
Darren Tucker [Tue, 8 Nov 2022 05:09:24 +0000 (16:09 +1100)] 
Add CIFuzz to V_9_1 branch.

2 years agoResync CI configs to HEAD.
Darren Tucker [Tue, 8 Nov 2022 05:07:05 +0000 (16:07 +1100)] 
Resync CI configs to HEAD.

There have been a number of fixes on the main branch, apply to V_9_1
branch.

2 years agoUse "prohibit-password" in -portable comments.
Darren Tucker [Sat, 5 Nov 2022 23:55:59 +0000 (10:55 +1100)] 
Use "prohibit-password" in -portable comments.

"without-password" is the deprecated alias for "prohibit-password",
so we should reference the latter. From emaste at freebsd.org.

2 years agoFix tracing disable on FreeBSD.
Darren Tucker [Sat, 5 Nov 2022 23:50:01 +0000 (10:50 +1100)] 
Fix tracing disable on FreeBSD.

Some versions of FreeBSD do not support using id 0 to refer to the
current pid for procctl, so pass getpid() explicitly.  From
emaste at freebsd.org.

2 years agoInclude time.h when defining timegm.
Darren Tucker [Wed, 2 Nov 2022 17:24:39 +0000 (04:24 +1100)] 
Include time.h when defining timegm.

Fixes build on some platforms eg recent AIX.

2 years agoAlways use compat getentropy.
Darren Tucker [Tue, 1 Nov 2022 08:10:30 +0000 (19:10 +1100)] 
Always use compat getentropy.

Have it call native getentropy and fall back as required.  Should fix
issues of platforms where libc has getentropy but it is not implemented
in the kernel.  Based on github PR#354 from simsergey.

2 years agoOpenSSL dev branch is 302 not 320.
Darren Tucker [Sun, 30 Oct 2022 18:13:02 +0000 (05:13 +1100)] 
OpenSSL dev branch is 302 not 320.

While there, also accept 301 which it what it was previously.

2 years agoOpenSSL dev branch now identifies as 3.2.0.
Darren Tucker [Mon, 17 Oct 2022 19:29:16 +0000 (06:29 +1100)] 
OpenSSL dev branch now identifies as 3.2.0.

2 years agoFix snprintf configure test for clang 15
Harmen Stoppels [Thu, 13 Oct 2022 14:08:46 +0000 (16:08 +0200)] 
Fix snprintf configure test for clang 15

Clang 15 -Wimplicit-int defaults to an error in C99 mode and above.
A handful of tests have "main(..." and not "int main(..." which caused
the tests to produce incorrect results.

2 years agoTest commits to all branches of portable.
Darren Tucker [Tue, 4 Oct 2022 12:20:23 +0000 (23:20 +1100)] 
Test commits to all branches of portable.

Only test OpenBSD upstream on commits to master since that's what it
tracks.

2 years agoupdate .depend V_9_1_P1
Damien Miller [Mon, 3 Oct 2022 14:51:42 +0000 (01:51 +1100)] 
update .depend

2 years agoupdate release notes URL
Damien Miller [Mon, 3 Oct 2022 14:45:52 +0000 (01:45 +1100)] 
update release notes URL

2 years agocrank versions in RPM spec files
Damien Miller [Mon, 3 Oct 2022 14:45:41 +0000 (01:45 +1100)] 
crank versions in RPM spec files

2 years agoupstream: openssh-9.1
djm@openbsd.org [Mon, 26 Sep 2022 22:18:40 +0000 (22:18 +0000)] 
upstream: openssh-9.1

OpenBSD-Commit-ID: 5a467b2ee81da01a86adf1ad93b62b1728494e56

2 years agoupstream: Fix typo. From AlexanderStohr via github PR#343.
dtucker@openbsd.org [Wed, 21 Sep 2022 22:26:50 +0000 (22:26 +0000)] 
upstream: Fix typo. From AlexanderStohr via github PR#343.

OpenBSD-Commit-ID: a134c9b4039e48803fc6a87f955b0f4a03181497

2 years agoupstream: add RequiredRSASize to the list of keywords accepted by
djm@openbsd.org [Mon, 19 Sep 2022 21:39:16 +0000 (21:39 +0000)] 
upstream: add RequiredRSASize to the list of keywords accepted by

-o; spotted by jmc@

OpenBSD-Commit-ID: fe871408cf6f9d3699afeda876f8adbac86a035e

2 years agono need for glob.h here
Damien Miller [Mon, 19 Sep 2022 10:59:34 +0000 (20:59 +1000)] 
no need for glob.h here

it also causes portability problems

2 years agoavoid Wuninitialized false positive in gcc-12ish
Damien Miller [Mon, 19 Sep 2022 10:59:04 +0000 (20:59 +1000)] 
avoid Wuninitialized false positive in gcc-12ish

2 years agoupstream: use users-groups-by-id@openssh.com sftp-server extension
djm@openbsd.org [Mon, 19 Sep 2022 10:46:00 +0000 (10:46 +0000)] 
upstream: use users-groups-by-id@openssh.com sftp-server extension

(when available) to fill in user/group names for directory listings.
Implement a client-side cache of see uid/gid=>user/group names. ok markus@

OpenBSD-Commit-ID: f239aeeadfa925a37ceee36ee8b256b8ccf4466e

2 years agoupstream: sftp client library support for
djm@openbsd.org [Mon, 19 Sep 2022 10:43:12 +0000 (10:43 +0000)] 
upstream: sftp client library support for

users-groups-by-id@openssh.com; ok markus@

OpenBSD-Commit-ID: ddb2f33a2da6349a9a89a8b5bcb9ca7c999394de

2 years agoupstream: extend sftp-common.c:extend ls_file() to support supplied
djm@openbsd.org [Mon, 19 Sep 2022 10:41:58 +0000 (10:41 +0000)] 
upstream: extend sftp-common.c:extend ls_file() to support supplied

user/group names; ok markus@

OpenBSD-Commit-ID: c70c70498b1fdcf158531117e405b6245863bfb0

2 years agoupstream: sftp-server(8): add a "users-groups-by-id@openssh.com"
djm@openbsd.org [Mon, 19 Sep 2022 10:40:52 +0000 (10:40 +0000)] 
upstream: sftp-server(8): add a "users-groups-by-id@openssh.com"

extension request that allows the client to obtain user/group names that
correspond to a set of uids/gids.

Will be used to make directory listings more useful and consistent
in sftp(1).

ok markus@

OpenBSD-Commit-ID: 7ebabde0bcb95ef949c4840fe89e697e30df47d3

2 years agoupstream: better debugging for connect_next()
djm@openbsd.org [Mon, 19 Sep 2022 08:49:50 +0000 (08:49 +0000)] 
upstream: better debugging for connect_next()

OpenBSD-Commit-ID: d16a307a0711499c971807f324484ed3a6036640

2 years agoupstream: Add RequiredRSASize for sshd(8); RSA keys that fall
djm@openbsd.org [Sat, 17 Sep 2022 10:34:29 +0000 (10:34 +0000)] 
upstream: Add RequiredRSASize for sshd(8); RSA keys that fall

beneath this limit will be ignored for user and host-based authentication.

Feedback deraadt@ ok markus@

OpenBSD-Commit-ID: 187931dfc19d51873df5930a04f2d972adf1f7f1

2 years agoupstream: add a RequiredRSASize for checking RSA key length in
djm@openbsd.org [Sat, 17 Sep 2022 10:33:18 +0000 (10:33 +0000)] 
upstream: add a RequiredRSASize for checking RSA key length in

ssh(1). User authentication keys that fall beneath this limit will be
ignored. If a host presents a host key beneath this limit then the connection
will be terminated (unfortunately there are no fallbacks in the protocol for
host authentication).

feedback deraadt, Dmitry Belyavskiy; ok markus@

OpenBSD-Commit-ID: 430e339b2a79fa9ecc63f2837b06fdd88a7da13a

2 years agoupstream: Add a sshkey_check_rsa_length() call for checking the
djm@openbsd.org [Sat, 17 Sep 2022 10:30:45 +0000 (10:30 +0000)] 
upstream: Add a sshkey_check_rsa_length() call for checking the

length of an RSA key; ok markus@

OpenBSD-Commit-ID: de77cd5b11594297eda82edc594b0d32b8535134

2 years agoupstream: actually hook up restrict_websafe; the command-line flag
djm@openbsd.org [Sat, 17 Sep 2022 10:11:29 +0000 (10:11 +0000)] 
upstream: actually hook up restrict_websafe; the command-line flag

was never actually used. Spotted by Matthew Garrett

OpenBSD-Commit-ID: 0b363518ac4c2819dbaa3dfad4028633ab9cdff1

2 years agoupstream: correct error value
djm@openbsd.org [Fri, 16 Sep 2022 06:55:37 +0000 (06:55 +0000)] 
upstream: correct error value

OpenBSD-Commit-ID: 780efcbad76281f11f14b2a5ff04eb6db3dfdad4

2 years agoupstream: sftp: Be a bit more clever about completions
djm@openbsd.org [Fri, 16 Sep 2022 03:33:14 +0000 (03:33 +0000)] 
upstream: sftp: Be a bit more clever about completions

There are commands (e.g. "get" or "put") that accept two
arguments, a local path and a remote path. However, the way
current completion is written doesn't take this distinction into
account and always completes remote or local paths.

By expanding CMD struct and "cmds" array this distinction can be
reflected and with small adjustment to completer code the correct
path can be completed.

By Michal Privoznik, ok dtucker@

OpenBSD-Commit-ID: 1396d921c4eb1befd531f5c4a8ab47e7a74b610b

2 years agoupstream: sftp: Don't attempt to complete arguments for
djm@openbsd.org [Fri, 16 Sep 2022 03:13:34 +0000 (03:13 +0000)] 
upstream: sftp: Don't attempt to complete arguments for

non-existent commands

If user entered a non-existent command (e.g. because they made a
typo) there is no point in trying to complete its arguments. Skip
calling complete_match() if that's the case.

From Michal Privoznik

OpenBSD-Commit-ID: cf39c811a68cde2aeb98fc85addea4000ef6b07a

2 years agoupstream: sk_enroll: never drop SSH_SK_USER_VERIFICATION_REQD flag
djm@openbsd.org [Wed, 14 Sep 2022 00:14:37 +0000 (00:14 +0000)] 
upstream: sk_enroll: never drop SSH_SK_USER_VERIFICATION_REQD flag

from response

Now that all FIDO signing calls attempt first without PIN and then
fall back to trying PIN only if that attempt fails, we can remove the
hack^wtrick that removed the UV flag from the keys returned during
enroll.

By Corinna Vinschen

OpenBSD-Commit-ID: 684517608c8491503bf80cd175425f0178d91d7f

2 years agoupstream: a little extra debugging
djm@openbsd.org [Wed, 14 Sep 2022 00:13:13 +0000 (00:13 +0000)] 
upstream: a little extra debugging

OpenBSD-Commit-ID: edf1601c1d0905f6da4c713f4d9cecc7d1c0295a

2 years agoupstream: ssh-agent: attempt FIDO key signing without PIN and use
djm@openbsd.org [Wed, 14 Sep 2022 00:02:03 +0000 (00:02 +0000)] 
upstream: ssh-agent: attempt FIDO key signing without PIN and use

the error to determine whether a PIN is required and prompt only if
necessary. from Corinna Vinschen

OpenBSD-Commit-ID: dd6be6a0b7148608e834ee737c3479b3270b00dd

2 years agoupstream: .Li -> .Vt where appropriate; from josiah frentsos,
jmc@openbsd.org [Sun, 11 Sep 2022 06:38:11 +0000 (06:38 +0000)] 
upstream: .Li -> .Vt where appropriate; from josiah frentsos,

tweaked by schwarze

ok schwarze

OpenBSD-Commit-ID: 565046e3ce68b46c2f440a93d67c2a92726de8ed

2 years agoupstream: fix repeated words ok miod@ jmc@
jsg@openbsd.org [Sat, 10 Sep 2022 08:50:53 +0000 (08:50 +0000)] 
upstream: fix repeated words ok miod@ jmc@

OpenBSD-Commit-ID: 6765daefe26a6b648cc15cadbbe337596af709b7

2 years agoupstream: notifier_complete(NULL, ...) is a noop, so no need to test
djm@openbsd.org [Fri, 9 Sep 2022 03:31:42 +0000 (03:31 +0000)] 
upstream: notifier_complete(NULL, ...) is a noop, so no need to test

that ctx!=NULL; from Corinna Vinschen

OpenBSD-Commit-ID: ade2f2e9cc519d01a586800c25621d910bce384a

2 years agoopenbsd-compat/bsd-asprintf: add <stdio.h> include for vsnprintf
Sam James [Thu, 8 Sep 2022 01:49:29 +0000 (02:49 +0100)] 
openbsd-compat/bsd-asprintf: add <stdio.h> include for vsnprintf

Fixes the following build failure with Clang 15 on musl:
```
bsd-asprintf.c:51:8: error: call to undeclared library function 'vsnprintf' with type 'int (char *, unsigned long, const char *, struct __va_list_tag *)'; ISO C99 and laterclang -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -pipe -Wunknown-warning-option -Qunused-arguments -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -Wmisleading-indentation -Wbitwise-instead-of-logical -fno-strict-aliasing -mretpoline  -ftrapv -fzero-call-used-regs=all -fno-builtin-memset -fstack-protector-strong -fPIE   -I. -I.  -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -DSSHDIR=\"/etc/ssh\" -D_PATH_SSH_PROGRAM=\"/usr/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/lib/misc/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/lib/misc/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/lib/misc/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/usr/lib/misc/ssh-pkcs11-helper\" -D_PATH_SSH_SK_HELPER=\"/usr/lib/misc/ssh-sk-helper\" -D_PATH_SSH_PIDDIR=\"/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c cipher-aes.c -o cipher-aes.o
 do not support
      implicit function declarations [-Wimplicit-function-declaration]
        ret = vsnprintf(string, INIT_SZ, fmt, ap2);
              ^
bsd-asprintf.c:51:8: note: include the header <stdio.h> or explicitly provide a declaration for 'vsnprintf'
1 error generated.
```

2 years agoRemove DEF_WEAK, it's already in defines.h.
Darren Tucker [Fri, 2 Sep 2022 06:43:27 +0000 (16:43 +1000)] 
Remove DEF_WEAK, it's already in defines.h.

2 years agoResync arc4random with OpenBSD.
Darren Tucker [Fri, 2 Sep 2022 04:28:14 +0000 (14:28 +1000)] 
Resync arc4random with OpenBSD.

This brings us up to current, including djm's random-reseeding change,
as prompted by logan at cyberstorm.mu in bz#3467.  It brings the
platform-specific hooks from LibreSSL Portable, simplified to match our
use case.  ok djm@.

2 years agoMove OPENBSD ORIGINAL marker.
Darren Tucker [Fri, 2 Sep 2022 04:20:04 +0000 (14:20 +1000)] 
Move OPENBSD ORIGINAL marker.

Putting this after the copyright statement (which doesn't change)
instead of before the version identifier (which does) prevents merge
conflicts when resyncing changes.

2 years agoRemove arc4random_uniform from arc4random.c
Darren Tucker [Fri, 2 Sep 2022 04:17:28 +0000 (14:17 +1000)] 
Remove arc4random_uniform from arc4random.c

This was previously moved into its own file (matching OpenBSD) which
prematurely committed in commit 73541f2.

2 years agoupstream: sk-usbhid: fix key_lookup() on tokens with built-in UV
djm@openbsd.org [Fri, 2 Sep 2022 04:20:02 +0000 (04:20 +0000)] 
upstream: sk-usbhid: fix key_lookup() on tokens with built-in UV

explicitly test whether the token performs built-in UV (e.g. biometric
tokens) and enable UV in that case. From Pedro Martelletto via GHPR#388

OpenBSD-Commit-ID: 007eb7e387d27cf3029ab06b88224e03eca62ccd

2 years agoMove sftp from valgrind-2 to 3 to rebalance.
Darren Tucker [Wed, 31 Aug 2022 10:26:30 +0000 (20:26 +1000)] 
Move sftp from valgrind-2 to 3 to rebalance.

2 years agoupstream: whitespace
djm@openbsd.org [Wed, 31 Aug 2022 02:56:40 +0000 (02:56 +0000)] 
upstream: whitespace

OpenBSD-Commit-ID: c2bcbf93610d3d62ed206cdf9bf9ff98c6aaf232

2 years agoadditional keys
Damien Miller [Mon, 29 Aug 2022 03:27:45 +0000 (13:27 +1000)] 
additional keys

2 years agocross-sign allowed_signers with PGP key
Damien Miller [Mon, 29 Aug 2022 03:23:43 +0000 (13:23 +1000)] 
cross-sign allowed_signers with PGP key

Provides continuity of trust from legacy PGP release key to
the SSHSIG signing keys that we will use henceforth for git
signing.

2 years agoAdd libcrypt-devel to cygwin-release deps.
Darren Tucker [Sat, 27 Aug 2022 11:49:27 +0000 (21:49 +1000)] 
Add libcrypt-devel to cygwin-release deps.

Based on feedback from vinschen at redhat.com.

2 years agoAdd Windows 2022 test targets.
Darren Tucker [Fri, 26 Aug 2022 23:37:40 +0000 (09:37 +1000)] 
Add Windows 2022 test targets.

2 years agoAdd cygwin-release test target.
Darren Tucker [Fri, 26 Aug 2022 06:26:06 +0000 (16:26 +1000)] 
Add cygwin-release test target.

This also moves the cygwin package install from the workflow file to
setup_ci.sh so that we can install different sets of Cygwin packages
for different test configs.

2 years agoupstream: whitespace
djm@openbsd.org [Fri, 26 Aug 2022 08:16:27 +0000 (08:16 +0000)] 
upstream: whitespace

OpenBSD-Commit-ID: a5d015efbfd228dc598ffdef612d2da3a579e5d8

2 years agoupstream: whitespace
djm@openbsd.org [Fri, 26 Aug 2022 08:12:56 +0000 (08:12 +0000)] 
upstream: whitespace

OpenBSD-Commit-ID: d297e4387935d4aef091c5e9432578c2e513f538

2 years agoinitial list of allowed signers
Damien Miller [Fri, 26 Aug 2022 04:23:55 +0000 (14:23 +1000)] 
initial list of allowed signers

2 years agoInstall Cygwin packages based on OS not config.
Darren Tucker [Fri, 19 Aug 2022 07:22:18 +0000 (17:22 +1000)] 
Install Cygwin packages based on OS not config.

2 years agoupstream: attemp FIDO key signing without PIN and use the error
djm@openbsd.org [Fri, 19 Aug 2022 06:07:47 +0000 (06:07 +0000)] 
upstream: attemp FIDO key signing without PIN and use the error

code returned to fall back only if necessary. Avoids PIN prompts for FIDO
tokens that don't require them; part of GHPR#302

OpenBSD-Commit-ID: 4f752aaf9f2e7c28bcaaf3d4f8fc290131bd038e

2 years agoupstream: remove incorrect check that can break enrolling a
djm@openbsd.org [Fri, 19 Aug 2022 05:53:28 +0000 (05:53 +0000)] 
upstream: remove incorrect check that can break enrolling a

resident key (introduced in r1.40)

OpenBSD-Commit-ID: 4cab364d518470e29e624af3d3f9ffa9c92b6f01

2 years agoupstream: Strictly enforce the maximum allowed SSH2 banner size in
dtucker@openbsd.org [Fri, 19 Aug 2022 04:02:46 +0000 (04:02 +0000)] 
upstream: Strictly enforce the maximum allowed SSH2 banner size in

ssh-keyscan and prevent a one-byte buffer overflow.  Patch from Qualys, ok
djm@

OpenBSD-Commit-ID: 6ae664f9f4db6e8a0589425f74cd0bbf3aeef4e4

2 years agoFix cygwin conditional steps.
Darren Tucker [Fri, 19 Aug 2022 05:18:09 +0000 (15:18 +1000)] 
Fix cygwin conditional steps.

2 years agoAdd a bit more debug output.
Darren Tucker [Fri, 19 Aug 2022 05:12:57 +0000 (15:12 +1000)] 
Add a bit more debug output.

2 years agoAdd Cygwin (on windows-2019) test target.
Darren Tucker [Fri, 12 Aug 2022 05:08:47 +0000 (15:08 +1000)] 
Add Cygwin (on windows-2019) test target.

In addition to installing the requisite Cygwin packages, we also need to
explicitly invoke "sh" for steps that run other scripts since the runner
environment doesn't understand #! paths.

2 years agoupstream: double free() in error path; from Eusgor via GHPR333
djm@openbsd.org [Fri, 19 Aug 2022 03:06:30 +0000 (03:06 +0000)] 
upstream: double free() in error path; from Eusgor via GHPR333

OpenBSD-Commit-ID: 39f35e16ba878c8d02b4d01d8826d9b321be26d4

2 years agoCheck for perms to run agent-getpeereid test.
Darren Tucker [Thu, 18 Aug 2022 11:36:39 +0000 (21:36 +1000)] 
Check for perms to run agent-getpeereid test.

Ubuntu 22.04 defaults to private home dirs which prevents "nobody"
running ssh-add during the agent-getpeereid test.  Check for this and
add the necessary permissions.

2 years agoon Cygwin, prefer WinHello FIDO device
Damien Miller [Wed, 17 Aug 2022 06:04:16 +0000 (16:04 +1000)] 
on Cygwin, prefer WinHello FIDO device

If no FIDO device was explictly specified, then prefer the
windows://hello FIDO device. An exception to this is when
probing resident FIDO keys, in which case hardware FIDO
devices are preferred.

2 years agoupstream: add an extra flag to sk_probe() to indicate whether we're
djm@openbsd.org [Wed, 17 Aug 2022 06:01:57 +0000 (06:01 +0000)] 
upstream: add an extra flag to sk_probe() to indicate whether we're

probing for a FIDO resident key or not. Unused here, but will make like
easier for portable

OpenBSD-Commit-ID: 432c8ff70e270378df9dbceb9bdeaa5b43b5a832

2 years agoupstream: use .Cm for "sign"; from josiah frentsos
jmc@openbsd.org [Tue, 16 Aug 2022 20:24:08 +0000 (20:24 +0000)] 
upstream: use .Cm for "sign"; from josiah frentsos

OpenBSD-Commit-ID: 7f80a53d54857ac6ae49ea6ad93c5bd12231d1e4

3 years agoRevert "check_sk_options: add temporary WinHello workaround"
Corinna Vinschen [Thu, 11 Aug 2022 18:19:35 +0000 (20:19 +0200)] 
Revert "check_sk_options: add temporary WinHello workaround"

Cygwin now comes with libfido2 1.11.0, so this workaround
isn't required anymore.

This reverts commit 242c044ab111a37aad3b0775727c36a4c5f0102c.

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
3 years agofido_dev_is_winhello: return 0, not "false"
Corinna Vinschen [Thu, 11 Aug 2022 18:18:17 +0000 (20:18 +0200)] 
fido_dev_is_winhello: return 0, not "false"

"false" is not used anywhere in OpenSSH, so return 0 like
everywhere else.

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
3 years agoupstream: sftp-server: support home-directory request
djm@openbsd.org [Fri, 12 Aug 2022 05:20:28 +0000 (05:20 +0000)] 
upstream: sftp-server: support home-directory request

Add support to the sftp-server for the home-directory extension defined
in draft-ietf-secsh-filexfer-extensions-00. This overlaps a bit with the
existing expand-path@openssh.com, but uses a more official protocol name,
and so is a bit more likely to be implemented by non-OpenSSH clients.

From Mike Frysinger, ok dtucker@

OpenBSD-Commit-ID: bfc580d05cc0c817831ae7ecbac4a481c23566ab

3 years agoReplace deprecated ubuntu-18.04 runners with 22.04
Darren Tucker [Fri, 12 Aug 2022 04:56:55 +0000 (14:56 +1000)] 
Replace deprecated ubuntu-18.04 runners with 22.04

3 years agoAdd a timegm implementation from Heimdal via Samba.
Darren Tucker [Thu, 11 Aug 2022 12:48:23 +0000 (22:48 +1000)] 
Add a timegm implementation from Heimdal via Samba.

Fixes build on (at least Solaris 10).

3 years agoRerun tests if any .github config file changes.
Darren Tucker [Thu, 11 Aug 2022 04:23:58 +0000 (14:23 +1000)] 
Rerun tests if any .github config file changes.

3 years agoSkip hostbased during Valgrind tests.
Darren Tucker [Thu, 11 Aug 2022 03:33:51 +0000 (13:33 +1000)] 
Skip hostbased during Valgrind tests.

Valgrind doesn't let ssh exec ssh-keysign (because it's setuid) so skip
it during the Valgrind based tests.

See https://bugs.kde.org/show_bug.cgi?id=119404 for a discussion of this
(ironically there the problematic binary was ssh(1) back when it could
still be setuid).

3 years agoupstream: add some tests for parse_absolute_time(), including cases
djm@openbsd.org [Thu, 11 Aug 2022 01:57:50 +0000 (01:57 +0000)] 
upstream: add some tests for parse_absolute_time(), including cases

where it is forced to the UTC timezone. bz3468 ok dtucker

OpenBSD-Regress-ID: ea07ca31c2f3847a38df028ca632763ae44e8759

3 years agoupstream: allow certificate validity intervals, sshsig verification
djm@openbsd.org [Thu, 11 Aug 2022 01:56:51 +0000 (01:56 +0000)] 
upstream: allow certificate validity intervals, sshsig verification

times and authorized_keys expiry-time options to accept dates in the UTC time
zone in addition to the default of interpreting them in the system time zone.
YYYYMMDD and YYMMDDHHMM[SS] dates/times will be interpreted as UTC if
suffixed with a 'Z' character.

Also allow certificate validity intervals to be specified in raw
seconds-since-epoch as hex value, e.g. -V 0x1234:0x4567890. This
is intended for use by regress tests and other tools that call
ssh-keygen as part of a CA workflow.

bz3468 ok dtucker

OpenBSD-Commit-ID: 454db1cdffa9fa346aea5211223a2ce0588dfe13

3 years agoFix conditional for running hostbased tests.
Darren Tucker [Thu, 11 Aug 2022 00:23:55 +0000 (10:23 +1000)] 
Fix conditional for running hostbased tests.

3 years agofix SANDBOX_SECCOMP_FILTER_DEBUG
Damien Miller [Wed, 10 Aug 2022 22:58:28 +0000 (08:58 +1000)] 
fix SANDBOX_SECCOMP_FILTER_DEBUG

3 years agoTest hostbased auth on github runners.
Darren Tucker [Wed, 10 Aug 2022 07:35:52 +0000 (17:35 +1000)] 
Test hostbased auth on github runners.

3 years agoRename our getentropy to prevent possible loops.
Darren Tucker [Wed, 10 Aug 2022 07:25:24 +0000 (17:25 +1000)] 
Rename our getentropy to prevent possible loops.

Since arc4random seeds from getentropy, and we use OpenSSL for that
if enabled, there's the possibility that if we build on a system that
does not have getentropy then run on a system that does have it, then
OpenSSL could end up calling our getentropy and getting stuck in a loop.
Pointed out by deraadt@, ok djm@

3 years agoActually put HAVE_STDINT_H around the stdint.h.
Darren Tucker [Mon, 8 Aug 2022 02:17:04 +0000 (12:17 +1000)] 
Actually put HAVE_STDINT_H around the stdint.h.

3 years agoGive unused param a name.
Darren Tucker [Mon, 8 Aug 2022 00:30:34 +0000 (10:30 +1000)] 
Give unused param a name.

Fixes builds on platforms that do have fido2 but don't have
fido_dev_is_winhello.

3 years agoupstream: don't prompt for FIDO passphrase before attempting to enroll
djm@openbsd.org [Fri, 5 Aug 2022 05:01:40 +0000 (05:01 +0000)] 
upstream: don't prompt for FIDO passphrase before attempting to enroll

the credential, just let the enroll operating fail and we'll attempt to get a
PIN anyway. Might avoid some unneccessary PIN prompts.

Part of GHPR#302 from Corinna Vinschen; ok dtucker@

OpenBSD-Commit-ID: bd5342ffc353ee37d39617906867c305564d1ce2

3 years agosk_sign: set FIDO2 uv attribute explicitely for WinHello
Corinna Vinschen [Fri, 11 Feb 2022 13:33:41 +0000 (14:33 +0100)] 
sk_sign: set FIDO2 uv attribute explicitely for WinHello

WinHello via libfido2 performs user verification by default.
However, if we stick to that, there's no way to differentiate
between keys created with or without "-O  verify-required".
Set FIDO2 uv attribute explicitely to FIDO_OPT_FALSE, then check
if user verification has been requested.

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
3 years agocheck_sk_options: add temporary WinHello workaround
Corinna Vinschen [Tue, 15 Feb 2022 10:28:08 +0000 (11:28 +0100)] 
check_sk_options: add temporary WinHello workaround

Up to libfido 1.10.0, WinHello advertises "clientPin" rather
than "uv" capability.  This is fixed in 1.11.0.  For the time
being, workaround it here.

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
3 years agocompat code for fido_dev_is_winhello()
Corinna Vinschen [Thu, 10 Feb 2022 17:19:29 +0000 (18:19 +0100)] 
compat code for fido_dev_is_winhello()

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
3 years agoFactor out getrnd() and rename to getentropy().
Darren Tucker [Fri, 5 Aug 2022 03:12:27 +0000 (13:12 +1000)] 
Factor out getrnd() and rename to getentropy().

Factor out the arc4random seeding into its own file and change the
interface to match getentropy.  Use native getentropy if available.
This will make it easier to resync OpenBSD changes to arc4random.
Prompted by bz#3467, ok djm@.

3 years agoInclude CHANNEL and FIDO2 libs in configure output
Darren Tucker [Thu, 4 Aug 2022 08:55:48 +0000 (18:55 +1000)] 
Include CHANNEL and FIDO2 libs in configure output

3 years agoupstream: avoid double-free in error path introduced in r1.70; report
djm@openbsd.org [Mon, 1 Aug 2022 11:09:26 +0000 (11:09 +0000)] 
upstream: avoid double-free in error path introduced in r1.70; report

and fix based on GHPR#332 by v-rzh ok dtucker@

OpenBSD-Commit-ID: 3d21aa127b1f37cfc5bdc21461db369a663a951f

3 years agoRemove deprecated MacOS 10.15 runners.
Darren Tucker [Wed, 27 Jul 2022 08:40:12 +0000 (18:40 +1000)] 
Remove deprecated MacOS 10.15 runners.

3 years agoMove stale-configure check as early as possible.
Darren Tucker [Wed, 27 Jul 2022 08:31:14 +0000 (18:31 +1000)] 
Move stale-configure check as early as possible.

We added a check in Makefile to catch the case where configure needs to
be rebuilt, however this did not happen until a build was attempted in
which case all of the work done by configure was wasted.  Move this check
 to the start of configure to catch it as early as possible.  ok djm@

3 years agoMove libcrypto into CHANNELLIBS.
Darren Tucker [Fri, 22 Jul 2022 00:47:19 +0000 (10:47 +1000)] 
Move libcrypto into CHANNELLIBS.

This will result in sftp, sftp-server and scp no longer being linked
against libcrypto.  ok djm@

3 years agoRemove seed_rng calls from scp, sftp, sftp-server.
Darren Tucker [Fri, 22 Jul 2022 00:45:47 +0000 (10:45 +1000)] 
Remove seed_rng calls from scp, sftp, sftp-server.

These binaries don't use OpenSSL's random functions.  The next step
will be to stop linking them against libcrypto.  ok djm@

3 years agoGroup libcrypto and PRNGD checks together.
Darren Tucker [Thu, 21 Jul 2022 23:51:51 +0000 (09:51 +1000)] 
Group libcrypto and PRNGD checks together.

They're related more than the libcrypt or libiaf checks which are
currently between them.  ok djm@

3 years agoDo not link scp, sftp and sftp-server w/ zlib.
Darren Tucker [Thu, 21 Jul 2022 23:24:45 +0000 (09:24 +1000)] 
Do not link scp, sftp and sftp-server w/ zlib.

Some of our binaries (eg sftp, sftp-server, scp) do not interact with
the channels code and thus do use libraries such as zlib and libcrypto
although they are linked with them.  This adds a CHANNELLIBS and starts
by moving zlib into it, which means the aformentioned binaries are no
longer linked against zlib.  ok djm@