]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
2 years agoAdd tests for OpenSSL 3.0.7 and LibreSSL 3.6.1.
Darren Tucker [Wed, 2 Nov 2022 03:16:04 +0000 (14:16 +1100)] 
Add tests for OpenSSL 3.0.7 and LibreSSL 3.6.1.

2 years agoRun compat regress tests too.
Darren Tucker [Wed, 2 Nov 2022 21:17:39 +0000 (08:17 +1100)] 
Run compat regress tests too.

2 years agoCompat tests need libcrypto.
Darren Tucker [Wed, 2 Nov 2022 21:14:05 +0000 (08:14 +1100)] 
Compat tests need libcrypto.

This was moved to CHANNELLIBS during the libs refactor.  Spotted by
rapier at psc.edu.

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 agoCheck for sockaddr_in.sin_len.
Darren Tucker [Tue, 1 Nov 2022 23:51:48 +0000 (10:51 +1100)] 
Check for sockaddr_in.sin_len.

If found, set SOCK_HAS_LEN which is used in addr.c.  Should fix keyscan
tests on platforms with this (eg old NetBSD).

2 years agoupstream: Use variable for diff options
dtucker@openbsd.org [Sun, 30 Oct 2022 18:42:07 +0000 (18:42 +0000)] 
upstream: Use variable for diff options

instead of unconditionally specifying "-rN". This will make life easier
in -portable where not all diff's understand -N.

OpenBSD-Regress-ID: 8b8a407115546be1c6d72d350b1e4f1f960d3cd3

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 shat it was previously.

3 years agoupstream: put sshkey_check_rsa_length() back in sshkey.c to unbreak
djm@openbsd.org [Fri, 28 Oct 2022 02:47:04 +0000 (02:47 +0000)] 
upstream: put sshkey_check_rsa_length() back in sshkey.c to unbreak

OPENSSL=no builds

OpenBSD-Commit-ID: 99eec58abe382ecd14b14043b195ee1babb9cf6e

3 years agoupstream: allow ssh-keyscan(1) to accept CIDR address ranges, e.g.
djm@openbsd.org [Fri, 28 Oct 2022 02:29:34 +0000 (02:29 +0000)] 
upstream: allow ssh-keyscan(1) to accept CIDR address ranges, e.g.

ssh-keyscan 192.168.0.0/24

If a CIDR range is passed, then it will be expanded to all possible
addresses in the range including the all-0s and all-1s addresses.

bz#976 feedback/ok markus@

OpenBSD-Commit-ID: ce6c5211f936ac0053fd4a2ddb415277931e6c4b

3 years agofix merge botch
Damien Miller [Fri, 28 Oct 2022 01:54:35 +0000 (12:54 +1100)] 
fix merge botch

3 years agoupstream: refactor sshkey_private_deserialize
djm@openbsd.org [Fri, 28 Oct 2022 00:44:44 +0000 (00:44 +0000)] 
upstream: refactor sshkey_private_deserialize

feedback/ok markus@

OpenBSD-Commit-ID: f5ca6932fdaf840a5e8250becb38315a29b5fc9f

3 years agoupstream: refactor sshkey_private_serialize_opt()
djm@openbsd.org [Fri, 28 Oct 2022 00:44:17 +0000 (00:44 +0000)] 
upstream: refactor sshkey_private_serialize_opt()

feedback/ok markus@

OpenBSD-Commit-ID: 61e0fe989897901294efe7c3b6d670cefaf44cbd

3 years agoupstream: refactor certify
djm@openbsd.org [Fri, 28 Oct 2022 00:43:30 +0000 (00:43 +0000)] 
upstream: refactor certify

feedback/ok markus@

OpenBSD-Commit-ID: 35d742992e223eaca3537e6fb3d3002c08eed4f6

3 years agoupstream: refactor sshkey_sign() and sshkey_verify()
djm@openbsd.org [Fri, 28 Oct 2022 00:43:08 +0000 (00:43 +0000)] 
upstream: refactor sshkey_sign() and sshkey_verify()

feedback/ok markus@

OpenBSD-Commit-ID: 368e662c128c99d05cc043b1308d2b6c71a4d3cc

3 years agoupstream: refactor sshkey_from_blob_internal()
djm@openbsd.org [Fri, 28 Oct 2022 00:41:52 +0000 (00:41 +0000)] 
upstream: refactor sshkey_from_blob_internal()

feedback/ok markus@

OpenBSD-Commit-ID: 1f46c0cbb8060ee9666a02749594ad6658c8e283

3 years agoupstream: refactor sshkey_from_private()
djm@openbsd.org [Fri, 28 Oct 2022 00:41:17 +0000 (00:41 +0000)] 
upstream: refactor sshkey_from_private()

feedback/ok markus@

OpenBSD-Commit-ID: e5dbe7a3545930c50f70ee75c867a1e08b382b53

3 years agoupstream: factor out key generation
djm@openbsd.org [Fri, 28 Oct 2022 00:39:29 +0000 (00:39 +0000)] 
upstream: factor out key generation

feedback/ok markus@

OpenBSD-Commit-ID: 5b4211bff4de8d9adb84bc72857a8c42c44e7ceb

3 years agoupstream: refactor and simplify sshkey_read()
djm@openbsd.org [Fri, 28 Oct 2022 00:38:58 +0000 (00:38 +0000)] 
upstream: refactor and simplify sshkey_read()

feedback/ok markus@

OpenBSD-Commit-ID: 0d93b7a56e31cd06a8bb0d2191d084ce254b0971

3 years agoupstream: factor out public key serialization
djm@openbsd.org [Fri, 28 Oct 2022 00:37:24 +0000 (00:37 +0000)] 
upstream: factor out public key serialization

feedback/ok markus@

OpenBSD-Commit-ID: a3570c4b97290c5662890aea7328d87f55939033

3 years agoupstream: factor out sshkey_equal_public()
djm@openbsd.org [Fri, 28 Oct 2022 00:36:31 +0000 (00:36 +0000)] 
upstream: factor out sshkey_equal_public()

feedback/ok markus@

OpenBSD-Commit-ID: 1368ba114cb37732fe6ec3d89c7e6d27ea6fdc94

3 years agoupstream: begin big refactor of sshkey
djm@openbsd.org [Fri, 28 Oct 2022 00:35:40 +0000 (00:35 +0000)] 
upstream: begin big refactor of sshkey

Move keytype data and some of the type-specific code (allocation,
cleanup, etc) out into each key type's implementation. Subsequent
commits will move more, with the goal of having each key-*.c file
owning as much of its keytype's implementation as possible.

lots of feedback + ok markus@

OpenBSD-Commit-ID: 0f2b4334f73914344e9e5b3d33522d41762a57ec

3 years agoupstream: Be more paranoid with host/domain names coming from the
djm@openbsd.org [Mon, 24 Oct 2022 22:43:36 +0000 (22:43 +0000)] 
upstream: Be more paranoid with host/domain names coming from the

never write a name with bad characters to a known_hosts file.

reported by David Leadbeater, ok deraadt@

OpenBSD-Commit-ID: ba9b25fa8b5490b49398471e0c9657b0cbc7a5ad

3 years agoupstream: regress test for unmatched glob characters; fails before
djm@openbsd.org [Mon, 24 Oct 2022 21:52:50 +0000 (21:52 +0000)] 
upstream: regress test for unmatched glob characters; fails before

previous commit but passes now. bz3488; prodded by dtucker@

OpenBSD-Regress-ID: 0cc5cc9ea4a6fd170dc61b9212f15badaafb3bbd

3 years agoupstream: when scp(1) is using the SFTP protocol for transport (the
djm@openbsd.org [Mon, 24 Oct 2022 21:51:55 +0000 (21:51 +0000)] 
upstream: when scp(1) is using the SFTP protocol for transport (the

default), better match scp/rcp's handling of globs that don't match the
globbed characters but do match literally (e.g. trying to transfer
"foo.[1]").

Previously scp(1) in SFTP mode would not match these pathnames but
legacy scp/rcp mode would.

Reported by Michael Yagliyan in bz3488; ok dtucker@

OpenBSD-Commit-ID: d8a3773f53015ba811fddba7473769a2fd343e11

3 years agoupstream: use correct type with sizeof ok djm@
jsg@openbsd.org [Thu, 13 Oct 2022 09:09:28 +0000 (09:09 +0000)] 
upstream: use correct type with sizeof ok djm@

OpenBSD-Commit-ID: d6c882c2e8a42ff831a5b3cbc2c961ecb2dd6143

3 years agoupstream: ssh-agent.1: - use Nm not Xr for self-ref - while here,
jmc@openbsd.org [Fri, 7 Oct 2022 06:00:58 +0000 (06:00 +0000)] 
upstream: ssh-agent.1: - use Nm not Xr for self-ref - while here,

wrap a long line

ssh-agent.c:
- add -O to usage()

OpenBSD-Commit-ID: 855dac4695cef22e96d69c53436496bc408ca389

3 years agoupstream: document "-O no-restrict-websafe"; spotted by Ross L
djm@openbsd.org [Fri, 7 Oct 2022 04:06:26 +0000 (04:06 +0000)] 
upstream: document "-O no-restrict-websafe"; spotted by Ross L

Richardson

OpenBSD-Commit-ID: fe9eaa50237693a14ebe5b5614bf32a02145fe8b

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

3 years agorevert c64b62338b4 and guard POLL* defines instead
Damien Miller [Sun, 16 Oct 2022 22:41:47 +0000 (09:41 +1100)] 
revert c64b62338b4 and guard POLL* defines instead

c64b62338b4 broke OSX builds, which do have poll.h but lack ppoll(2)
Spotted by dtucker

3 years agoundef _get{short,long} before redefining
Damien Miller [Fri, 14 Oct 2022 03:52:22 +0000 (14:52 +1100)] 
undef _get{short,long} before redefining

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

3 years agoskip bsd-poll.h if poll.h found; ok dtucker
Damien Miller [Mon, 10 Oct 2022 01:32:43 +0000 (12:32 +1100)] 
skip bsd-poll.h if poll.h found; ok dtucker

3 years agoupstream: honour user's umask if it is more restrictive then the ssh
djm@openbsd.org [Thu, 6 Oct 2022 22:42:37 +0000 (22:42 +0000)] 
upstream: honour user's umask if it is more restrictive then the ssh

default (022); based on patch from Alex Henrie, ok dtucker@ deraadt@

OpenBSD-Commit-ID: fe1b9e15fc9a4f49fc338e848ce14d8727abe82d

3 years agoAdd LibreSSL 3.6.0 to test suite.
Darren Tucker [Thu, 6 Oct 2022 16:54:56 +0000 (03:54 +1100)] 
Add LibreSSL 3.6.0 to test suite.

While there, bump OpenSSL to latest 1.1.1q release.

3 years agoAdd 9.1 branch to CI status page.
Darren Tucker [Thu, 6 Oct 2022 10:18:16 +0000 (21:18 +1100)] 
Add 9.1 branch to CI status page.

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

3 years agowhitespace at EOL
Damien Miller [Tue, 4 Oct 2022 16:47:26 +0000 (03:47 +1100)] 
whitespace at EOL

3 years agomention libfido2 autodetection
Damien Miller [Tue, 4 Oct 2022 16:40:01 +0000 (03:40 +1100)] 
mention libfido2 autodetection

3 years agoremove mention of --with-security-key-builtin
Damien Miller [Tue, 4 Oct 2022 16:37:36 +0000 (03:37 +1100)] 
remove mention of --with-security-key-builtin

it is enabled by default when libfido2 is installed

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

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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

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

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

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

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

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

3 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

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

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

OpenBSD-Commit-ID: c2bcbf93610d3d62ed206cdf9bf9ff98c6aaf232

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

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

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

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

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

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

OpenBSD-Commit-ID: a5d015efbfd228dc598ffdef612d2da3a579e5d8

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

OpenBSD-Commit-ID: d297e4387935d4aef091c5e9432578c2e513f538

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

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

3 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

3 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

3 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

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

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

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

3 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

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

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

3 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

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