]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
5 years agoupstream: avoid spurious error message when ssh-keygen creates files
djm@openbsd.org [Fri, 26 Jun 2020 05:42:16 +0000 (05:42 +0000)] 
upstream: avoid spurious error message when ssh-keygen creates files

outside ~/.ssh; with dtucker@

OpenBSD-Commit-ID: ac0c662d44607e00ec78c266ee60752beb1c7e08

5 years agomissing ifdef SELINUX; spotted by dtucker
Damien Miller [Fri, 26 Jun 2020 05:30:06 +0000 (15:30 +1000)] 
missing ifdef SELINUX; spotted by dtucker

5 years agoupstream: regress test for ssh-add -d; ok dtucker@
djm@openbsd.org [Fri, 26 Jun 2020 05:12:21 +0000 (05:12 +0000)] 
upstream: regress test for ssh-add -d; ok dtucker@

OpenBSD-Regress-ID: 3a2e044be616afc7dd4f56c100179e83b33d8abf

5 years agoupstream: add test for mux w/-Oproxy; ok djm
markus@openbsd.org [Wed, 24 Jun 2020 15:16:23 +0000 (15:16 +0000)] 
upstream: add test for mux w/-Oproxy; ok djm

OpenBSD-Regress-ID: 764d5c696e2a259f1316a056e225e50023abb027

5 years agoupstream: handle EINTR in waitfd() and timeout_connect() helpers;
djm@openbsd.org [Fri, 26 Jun 2020 05:16:38 +0000 (05:16 +0000)] 
upstream: handle EINTR in waitfd() and timeout_connect() helpers;

bz#3071; ok dtucker@

OpenBSD-Commit-ID: 08fa87be50070bd8b754d9b1ebb1138d7bc9d8ee

5 years agoupstream: allow "ssh-add -d -" to read keys to be deleted from
djm@openbsd.org [Fri, 26 Jun 2020 05:04:07 +0000 (05:04 +0000)] 
upstream: allow "ssh-add -d -" to read keys to be deleted from

stdin bz#3180; ok dtucker@

OpenBSD-Commit-ID: 15c7f10289511eb19fce7905c9cae8954e3857ff

5 years agoupstream: constify a few things; ok dtucker (as part of another
djm@openbsd.org [Fri, 26 Jun 2020 05:03:36 +0000 (05:03 +0000)] 
upstream: constify a few things; ok dtucker (as part of another

diff)

OpenBSD-Commit-ID: 7c17fc987085994d752304bd20b1ae267a9bcdf6

5 years agoupstream: Defer creation of ~/.ssh by ssh(1) until we attempt to
dtucker@openbsd.org [Fri, 26 Jun 2020 05:02:03 +0000 (05:02 +0000)] 
upstream: Defer creation of ~/.ssh by ssh(1) until we attempt to

write to it so we don't leave an empty .ssh directory when it's not needed.
Use the same function to replace the code in ssh-keygen that does the same
thing. bz#3156, ok djm@

OpenBSD-Commit-ID: 59c073b569be1a60f4de36f491a4339bc4ae870f

5 years agoupstream: Expand path to ~/.ssh/rc rather than relying on it
dtucker@openbsd.org [Fri, 26 Jun 2020 04:45:11 +0000 (04:45 +0000)] 
upstream: Expand path to ~/.ssh/rc rather than relying on it

being relative to the current directory, so that it'll still be found if the
shell startup changes its directory.  Since the path is potentially longer,
make the cmd buffer that uses it dynamically sized.  bz#3185, with & ok djm@

OpenBSD-Commit-ID: 36e33ff01497af3dc8226d0c4c1526fc3a1e46bf

5 years agoupstream: fix kex mem-leak in ssh_packet_close; ok djm
markus@openbsd.org [Wed, 24 Jun 2020 15:12:09 +0000 (15:12 +0000)] 
upstream: fix kex mem-leak in ssh_packet_close; ok djm

OpenBSD-Commit-ID: e2e9533f393620383afd0b68ef435de8d5e8abe4

5 years agoupstream: fix ssh -O proxy w/mux which got broken by no longer
markus@openbsd.org [Wed, 24 Jun 2020 15:10:38 +0000 (15:10 +0000)] 
upstream: fix ssh -O proxy w/mux which got broken by no longer

making ssh->kex optional in packet.c revision 1.278 ok djm@

OpenBSD-Commit-ID: 2b65df04a064c2c6277359921d2320c90ab7d917

5 years agoupstream: support loading big sshd_config files w/o realloc; ok
markus@openbsd.org [Wed, 24 Jun 2020 15:09:53 +0000 (15:09 +0000)] 
upstream: support loading big sshd_config files w/o realloc; ok

djm

OpenBSD-Commit-ID: ba9238e810074ac907f0cf8cee1737ac04983171

5 years agoupstream: allow sshd_config longer than 256k; ok djm
markus@openbsd.org [Wed, 24 Jun 2020 15:08:53 +0000 (15:08 +0000)] 
upstream: allow sshd_config longer than 256k; ok djm

OpenBSD-Commit-ID: 83f40dd5457a64c1d3928eb4364461b22766beb3

5 years agoupstream: only call sshkey_xmss_init() once for KEY_XMSS_CERT; ok
markus@openbsd.org [Wed, 24 Jun 2020 15:07:33 +0000 (15:07 +0000)] 
upstream: only call sshkey_xmss_init() once for KEY_XMSS_CERT; ok

djm

OpenBSD-Commit-ID: d0002ffb7f20f538b014d1d0735facd5a81ff096

5 years agoupstream: some clarifying comments
djm@openbsd.org [Mon, 22 Jun 2020 23:44:27 +0000 (23:44 +0000)] 
upstream: some clarifying comments

OpenBSD-Commit-ID: 5268479000fd97bfa30ab819f3517139daa054a2

5 years agoupstream: updated argument name for -P in first synopsis was
jmc@openbsd.org [Mon, 22 Jun 2020 06:37:38 +0000 (06:37 +0000)] 
upstream: updated argument name for -P in first synopsis was

missed in previous;

OpenBSD-Commit-ID: 8d84dc3050469884ea91e29ee06a371713f2d0b7

5 years agoupstream: supply word missing in previous;
jmc@openbsd.org [Mon, 22 Jun 2020 06:36:40 +0000 (06:36 +0000)] 
upstream: supply word missing in previous;

OpenBSD-Commit-ID: 16a38b049f216108f66c8b699aa046063381bd23

5 years agomissing files for webauthn/sshsig unit test
Damien Miller [Mon, 22 Jun 2020 06:54:02 +0000 (16:54 +1000)] 
missing files for webauthn/sshsig unit test

5 years agoupstream: add support for verification of webauthn sshsig signature,
djm@openbsd.org [Mon, 22 Jun 2020 06:00:06 +0000 (06:00 +0000)] 
upstream: add support for verification of webauthn sshsig signature,

and example HTML/JS to generate webauthn signatures in SSH formats (also used
to generate the testdata/* for the test).

OpenBSD-Regress-ID: dc575be5bb1796fdf4b8aaee0ef52a6671a0f6fb

5 years agoupstream: Add support for FIDO webauthn (verification only).
djm@openbsd.org [Mon, 22 Jun 2020 05:58:35 +0000 (05:58 +0000)] 
upstream: Add support for FIDO webauthn (verification only).

webauthn is a standard for using FIDO keys in web browsers. webauthn
signatures are a slightly different format to plain FIDO signatures - this
support allows verification of these. Feedback and ok markus@

OpenBSD-Commit-ID: ab7e3a9fb5782d99d574f408614d833379e564ad

5 years agoupstream: refactor ECDSA-SK verification a little ahead of adding
djm@openbsd.org [Mon, 22 Jun 2020 05:56:23 +0000 (05:56 +0000)] 
upstream: refactor ECDSA-SK verification a little ahead of adding

support for FIDO webauthn signature verification support; ok markus@

OpenBSD-Commit-ID: c9f478fd8e0c1bd17e511ce8694f010d8e32043e

5 years agoupstream: support for RFC4648 base64url encoding; ok markus
djm@openbsd.org [Mon, 22 Jun 2020 05:54:10 +0000 (05:54 +0000)] 
upstream: support for RFC4648 base64url encoding; ok markus

OpenBSD-Commit-ID: 0ef22c55e772dda05c112c88412c0797fec66eb4

5 years agoupstream: better terminology for permissions; feedback & ok markus@
djm@openbsd.org [Mon, 22 Jun 2020 05:53:26 +0000 (05:53 +0000)] 
upstream: better terminology for permissions; feedback & ok markus@

OpenBSD-Commit-ID: ff2a71803b5ea57b83cc3fa9b3be42b70e462fb9

5 years agoupstream: better terminology for permissions; feedback & ok markus@
djm@openbsd.org [Mon, 22 Jun 2020 05:52:05 +0000 (05:52 +0000)] 
upstream: better terminology for permissions; feedback & ok markus@

OpenBSD-Commit-ID: ffb220b435610741dcb4de0e7fc68cbbdc876d2c

5 years agoupstream: Correct synopsis and usage for the options accepted when
dtucker@openbsd.org [Fri, 19 Jun 2020 07:21:42 +0000 (07:21 +0000)] 
upstream: Correct synopsis and usage for the options accepted when

passing a command to ssh-agent.  ok jmc@

OpenBSD-Commit-ID: b36f0679cb0cac0e33b361051b3406ade82ea846

5 years agoAdd OPENBSD ORIGINAL marker to bcrypt_pbkdf.
Darren Tucker [Fri, 19 Jun 2020 09:22:00 +0000 (19:22 +1000)] 
Add OPENBSD ORIGINAL marker to bcrypt_pbkdf.

5 years agoExtra brackets around sizeof() in bcrypt.
Darren Tucker [Fri, 19 Jun 2020 09:10:47 +0000 (19:10 +1000)] 
Extra brackets around sizeof() in bcrypt.

Prevents following warning from clang 10:
bcrypt_pbkdf.c:94:40: error: expression does not compute the number of
  elements in this array; element type is ´uint32_tÂ[...]
  place parentheses around the ´sizeof(uint64_t)´ expression to
  silence this warning

5 years agoAdd includes.h to new test.
Darren Tucker [Fri, 19 Jun 2020 08:47:56 +0000 (18:47 +1000)] 
Add includes.h to new test.

Fixes warnings eg "´bounded´ attribute directive ignor" from gcc.

5 years agoSkip OpenSSL specific tests w/out OpenSSL.
Darren Tucker [Fri, 19 Jun 2020 08:38:39 +0000 (18:38 +1000)] 
Skip OpenSSL specific tests w/out OpenSSL.

Allows unit tests to pass when configure'ed --without-openssl.

5 years agoHook sshsig tests up to Portable Makefiles.
Darren Tucker [Fri, 19 Jun 2020 07:15:27 +0000 (17:15 +1000)] 
Hook sshsig tests up to Portable Makefiles.

5 years agoupstream: Test that ssh-agent exits when running as as subprocess
dtucker@openbsd.org [Fri, 19 Jun 2020 05:07:09 +0000 (05:07 +0000)] 
upstream: Test that ssh-agent exits when running as as subprocess

of a specified command (ie "ssh-agent command").  Would have caught bz#3181.

OpenBSD-Regress-ID: 895b4765ba5153eefaea3160a7fe08ac0b6db8b3

5 years agoupstream: run sshsig unit tests
djm@openbsd.org [Fri, 19 Jun 2020 04:34:21 +0000 (04:34 +0000)] 
upstream: run sshsig unit tests

OpenBSD-Regress-ID: 706ef17e2b545b64873626e0e35553da7c06052a

5 years agoupstream: basic unit test for sshsig.[ch], including FIDO keys
djm@openbsd.org [Fri, 19 Jun 2020 04:32:09 +0000 (04:32 +0000)] 
upstream: basic unit test for sshsig.[ch], including FIDO keys

verification only so far

OpenBSD-Regress-ID: fb1f946c8fc59206bc6a6666e577b5d5d7e45896

5 years agoupstream: basic unit test for FIDO kep parsing
djm@openbsd.org [Fri, 19 Jun 2020 03:48:49 +0000 (03:48 +0000)] 
upstream: basic unit test for FIDO kep parsing

OpenBSD-Regress-ID: 8089b88393dd916d7c95422b442a6fd4cfe00c82

5 years agoupstream: check public host key matches private; ok markus@ (as
djm@openbsd.org [Thu, 18 Jun 2020 23:34:19 +0000 (23:34 +0000)] 
upstream: check public host key matches private; ok markus@ (as

part of previous diff)

OpenBSD-Commit-ID: 65a4f66436028748b59fb88b264cb8c94ce2ba63

5 years agoupstream: avoid spurious "Unable to load host key" message when
djm@openbsd.org [Thu, 18 Jun 2020 23:33:38 +0000 (23:33 +0000)] 
upstream: avoid spurious "Unable to load host key" message when

sshd can load a private key but no public counterpart; with & ok markus@

OpenBSD-Commit-ID: 0713cbdf9aa1ff8ac7b1f78b09ac911af510f81b

5 years agoupstream: correct RFC number; from HARUYAMA Seigo via GH PR191
djm@openbsd.org [Fri, 12 Jun 2020 05:26:37 +0000 (05:26 +0000)] 
upstream: correct RFC number; from HARUYAMA Seigo via GH PR191

OpenBSD-Commit-ID: 8d03b6c96ca98bfbc23d3754c3c33e1fe0852e10

6 years agoupstream: unbreak "sshd -ddd" - close of config passing fd happened too
djm@openbsd.org [Fri, 5 Jun 2020 06:18:07 +0000 (06:18 +0000)] 
upstream: unbreak "sshd -ddd" - close of config passing fd happened too

early. ok markus@

OpenBSD-Commit-ID: 49346e945c6447aca3e904e65fc400128d2f8ed0

6 years agoAdd support for AUDIT_ARCH_RISCV64
Andreas Schwab [Mon, 25 May 2020 09:10:44 +0000 (11:10 +0200)] 
Add support for AUDIT_ARCH_RISCV64

6 years agoupstream: make sshbuf_putb(b, NULL) a no-op
djm@openbsd.org [Fri, 5 Jun 2020 03:25:35 +0000 (03:25 +0000)] 
upstream: make sshbuf_putb(b, NULL) a no-op

OpenBSD-Commit-ID: 976fdc99b500e347023d430df372f31c1dd128f7

6 years agoupstream: make sshbuf_dump() args const
djm@openbsd.org [Fri, 5 Jun 2020 03:24:36 +0000 (03:24 +0000)] 
upstream: make sshbuf_dump() args const

OpenBSD-Commit-ID: b4a5accae750875d665b862504169769bcf663bd

6 years agoupstream: wrap long line
djm@openbsd.org [Fri, 5 Jun 2020 03:24:16 +0000 (03:24 +0000)] 
upstream: wrap long line

OpenBSD-Commit-ID: ed405a12bd27bdc9c52e169bc5ff3529b4ebbbb2

6 years agoupstream: Correct historical comment: provos@ modified OpenSSH to
dtucker@openbsd.org [Fri, 5 Jun 2020 03:15:26 +0000 (03:15 +0000)] 
upstream: Correct historical comment: provos@ modified OpenSSH to

work with SSLeay (very quickly replaced by OpenSSL) not SSL in general.  ok
deraadt, historical context markus@

OpenBSD-Commit-ID: 7209e07a2984b50411ed8ca5a4932da5030d2b90

6 years agoupstream: Import regenerated moduli file.
dtucker@openbsd.org [Wed, 3 Jun 2020 08:23:18 +0000 (08:23 +0000)] 
upstream: Import regenerated moduli file.

OpenBSD-Commit-ID: 52ff0e3205036147b2499889353ac082e505ea54

6 years agoTest fallthrough in OSSH_CHECK_CFLAG_COMPILE.
Darren Tucker [Fri, 5 Jun 2020 03:20:10 +0000 (13:20 +1000)] 
Test fallthrough in OSSH_CHECK_CFLAG_COMPILE.

clang 10's -Wimplicit-fallthrough does not understand /* FALLTHROUGH */
comments and we don't use the __attribute__((fallthrough)) that it's
looking for.  This has the effect of turning off -Wimplicit-fallthrough
where it does not currently help (particularly with -Werror).  ok djm@

6 years agoupstream: Import regenerated moduli file.
dtucker@openbsd.org [Wed, 3 Jun 2020 08:23:18 +0000 (08:23 +0000)] 
upstream: Import regenerated moduli file.

OpenBSD-Commit-ID: 52ff0e3205036147b2499889353ac082e505ea54

6 years agoupstream: Remove now-unused proto_spec and associated definitions.
dtucker@openbsd.org [Mon, 1 Jun 2020 07:11:38 +0000 (07:11 +0000)] 
upstream: Remove now-unused proto_spec and associated definitions.

ok djm@

OpenBSD-Commit-ID: 2e2b18e3aa6ee22a7b69c39f2d3bd679ec35c362

6 years agoupstream: Fix error message on close(2) and add printf format
millert@openbsd.org [Fri, 29 May 2020 21:22:02 +0000 (21:22 +0000)] 
upstream: Fix error message on close(2) and add printf format

attributes. From Christos Zoulas, OK markus@

OpenBSD-Commit-ID: 41523c999a9e3561fcc7082fd38ea2e0629ee07e

6 years agoupstream: Make dollar_expand variadic and pass a real va_list to
dtucker@openbsd.org [Fri, 29 May 2020 11:17:56 +0000 (11:17 +0000)] 
upstream: Make dollar_expand variadic and pass a real va_list to

vdollar_percent_expand. Fixes build error on arm64 spotted by otto@.

OpenBSD-Commit-ID: 181910d7ae489f40ad609b4cf4a20f3d068a7279

6 years agoOmit ToS setting if we don't have IPV6_TCLASS too.
Darren Tucker [Fri, 29 May 2020 10:39:00 +0000 (20:39 +1000)] 
Omit ToS setting if we don't have IPV6_TCLASS too.

Fixes tests on old BSDs.

6 years agoupstream: Pass a NULL instead of zeroed out va_list from
dtucker@openbsd.org [Fri, 29 May 2020 09:02:44 +0000 (09:02 +0000)] 
upstream: Pass a NULL instead of zeroed out va_list from

dollar_expand.  The original intent was in case there's some platform where
va_list is not a pointer equivalent, but on i386 this chokes on the memset.
This unbreaks that build, but will require further consideration.

OpenBSD-Commit-ID: 7b90afcd8e1137a1d863204060052aef415baaf7

6 years agoupstream: remove a stray .El;
jmc@openbsd.org [Fri, 29 May 2020 05:48:39 +0000 (05:48 +0000)] 
upstream: remove a stray .El;

OpenBSD-Commit-ID: 58ddfe6f8a15fe10209db6664ecbe7896f1d167c

6 years agoupstream: Add regression and unit tests for ${ENV} style
dtucker@openbsd.org [Fri, 29 May 2020 04:32:26 +0000 (04:32 +0000)] 
upstream: Add regression and unit tests for ${ENV} style

environment variable expansion in various keywords (bz#3140).  ok djm@

OpenBSD-Regress-ID: 4d9ceb95d89365b7b674bc26cf064c15a5bbb197

6 years agoupstream: Unit test for convtime. ok djm@
dtucker@openbsd.org [Fri, 29 May 2020 01:21:35 +0000 (01:21 +0000)] 
upstream: Unit test for convtime. ok djm@

OpenBSD-Regress-ID: cec4239efa2fc4c7062064f07a847e1cbdbcd5dd

6 years agoupstream: mention that wildcards are processed in lexical order;
djm@openbsd.org [Fri, 29 May 2020 05:37:03 +0000 (05:37 +0000)] 
upstream: mention that wildcards are processed in lexical order;

bz#3165

OpenBSD-Commit-ID: 8856f3d1612bd42e9ee606d89386cae456dd165c

6 years agoupstream: Allow some keywords to expand shell-style ${ENV}
dtucker@openbsd.org [Fri, 29 May 2020 04:25:40 +0000 (04:25 +0000)] 
upstream: Allow some keywords to expand shell-style ${ENV}

environment variables on the client side.  The supported keywords are
CertificateFile, ControlPath, IdentityAgent and IdentityFile, plus
LocalForward and RemoteForward when used for Unix domain socket paths.  This
would for example allow forwarding of Unix domain socket paths that change at
runtime.  bz#3140, ok djm@

OpenBSD-Commit-ID: a4a2e801fc2d4df2fe0e58f50d9c81b03822dffa

6 years agodepend
Damien Miller [Fri, 29 May 2020 04:49:16 +0000 (14:49 +1000)] 
depend

6 years agopartial sync of regress/netcat.c with upstream
sobrado [Thu, 3 Sep 2015 23:06:28 +0000 (23:06 +0000)] 
partial sync of regress/netcat.c with upstream

synchronize synopsis and usage.

6 years agopartial sync of regress/netcat.c with upstream
chl [Sun, 26 Jul 2015 19:12:28 +0000 (19:12 +0000)] 
partial sync of regress/netcat.c with upstream

remove unused variable

ok tedu@

6 years agopartial sync of regress/netcat.c with upstream
tobias [Thu, 26 Mar 2015 21:22:50 +0000 (21:22 +0000)] 
partial sync of regress/netcat.c with upstream

The code in socks.c writes multiple times in a row to a socket. If the socket becomes invalid between these calls (e.g. connection closed), write will throw SIGPIPE. With this patch, SIGPIPE is ignored so we can handle write's -1 return value (errno will be EPIPE). Ultimately, it leads to program exit, too -- but with nicer error message. :)

with input by and ok djm

6 years agopartial sync of regress/netcat.c with upstream
tobias [Thu, 26 Mar 2015 10:36:03 +0000 (10:36 +0000)] 
partial sync of regress/netcat.c with upstream

Check for short writes in fdpass(). Clean up while at it.

ok djm

6 years agopartial sync of regress/netcat.c with upstream
jca [Sat, 14 Feb 2015 22:40:22 +0000 (22:40 +0000)] 
partial sync of regress/netcat.c with upstream

Support for nc -T on IPv6 addresses.

ok sthen@

6 years agoupstream: fix compilation on !HAVE_DLOPEN platforms; stub function
djm@openbsd.org [Fri, 29 May 2020 03:14:02 +0000 (03:14 +0000)] 
upstream: fix compilation on !HAVE_DLOPEN platforms; stub function

was not updated to match API change. From Dale Rahn via beck@ ok markus@

OpenBSD-Commit-ID: 2b8d054afe34c9ac85e417dae702ef981917b836

6 years agoupstream: fix exit status for downloading of FIDO resident keys;
djm@openbsd.org [Fri, 29 May 2020 03:11:54 +0000 (03:11 +0000)] 
upstream: fix exit status for downloading of FIDO resident keys;

from Pedro Martelletto, ok markus@

OpenBSD-Commit-ID: 0da77dc24a1084798eedd83c39a002a9d231faef

6 years agoupstream: Fix multiplier in convtime when handling seconds after
dtucker@openbsd.org [Fri, 29 May 2020 01:20:46 +0000 (01:20 +0000)] 
upstream: Fix multiplier in convtime when handling seconds after

other units. bz#3171, spotted by ronf at timeheart.net, ok djm@.

OpenBSD-Commit-ID: 95b7a848e1083974a65fbb6ccb381d438e1dd5be

6 years agoupstream: fix Include before Match in sshd_config; bz#3122 patch
djm@openbsd.org [Wed, 27 May 2020 22:37:53 +0000 (22:37 +0000)] 
upstream: fix Include before Match in sshd_config; bz#3122 patch

from Jakub Jelen

OpenBSD-Commit-ID: 1b0aaf135fe6732b5d326946042665dd3beba5f4

6 years agoupstream: Do not call process_queued_listen_addrs() for every
djm@openbsd.org [Wed, 27 May 2020 21:59:11 +0000 (21:59 +0000)] 
upstream: Do not call process_queued_listen_addrs() for every

included file from sshd_config; patch from Jakub Jelen

OpenBSD-Commit-ID: 0ff603d6f06a7fab4881f12503b53024799d0a49

6 years agoupstream: fix crash in recallocarray when deleting SendEnv
djm@openbsd.org [Wed, 27 May 2020 21:25:18 +0000 (21:25 +0000)] 
upstream: fix crash in recallocarray when deleting SendEnv

variables; spotted by & ok sthen@

OpenBSD-Commit-ID: b881e8e849edeec5082b5c0a87d8d7cff091a8fd

6 years agoupstream: two new tests for Include in sshd_config, checking whether
djm@openbsd.org [Wed, 27 May 2020 22:35:19 +0000 (22:35 +0000)] 
upstream: two new tests for Include in sshd_config, checking whether

Port directives are processed correctly and handling of Include directives
that appear before Match. Both tests currently fail. bz#3122 and bz#3169 -
patch from Jakub Jelen

OpenBSD-Regress-ID: 8ad5a4a385a63f0a1c59c59c763ff029b45715df

6 years agoDocument that libfido2 >= 1.4.0 is needed.
Darren Tucker [Wed, 27 May 2020 13:26:23 +0000 (23:26 +1000)] 
Document that libfido2 >= 1.4.0 is needed.

6 years agoupstream: fix memleak of signature; from Pedro Martelletto
djm@openbsd.org [Tue, 26 May 2020 01:59:46 +0000 (01:59 +0000)] 
upstream: fix memleak of signature; from Pedro Martelletto

OpenBSD-Commit-ID: d0a6eb07e77c001427d738b220dd024ddc64b2bb

6 years agoupstream: Restrict ssh-agent from signing web challenges for FIDO
djm@openbsd.org [Tue, 26 May 2020 01:26:58 +0000 (01:26 +0000)] 
upstream: Restrict ssh-agent from signing web challenges for FIDO

keys.

When signing messages in ssh-agent using a FIDO key that has an
application string that does not start with "ssh:", ensure that the
message being signed is one of the forms expected for the SSH protocol
(currently pubkey authentication and sshsig signatures).

This prevents ssh-agent forwarding on a host that has FIDO keys
attached granting the ability for the remote side to sign challenges
for web authentication using those keys too.

Note that the converse case of web browsers signing SSH challenges is
already precluded because no web RP can have the "ssh:" prefix in the
application string that we require.

ok markus@

OpenBSD-Commit-ID: 9ab6012574ed0352d2f097d307f4a988222d1b19

6 years agoupstream: improve logging for MaxStartups connection throttling:
djm@openbsd.org [Tue, 26 May 2020 01:09:05 +0000 (01:09 +0000)] 
upstream: improve logging for MaxStartups connection throttling:

have sshd log when it starts and stops throttling and periodically while in
this state. bz#3055 ok markus@

OpenBSD-Commit-ID: 2e07a09a62ab45d790d3d2d714f8cc09a9ac7ab9

6 years agoupstream: add fmt_timeframe() (from bgpd) to format a time
djm@openbsd.org [Tue, 26 May 2020 01:06:52 +0000 (01:06 +0000)] 
upstream: add fmt_timeframe() (from bgpd) to format a time

interval in a human- friendly format. Switch copyright for this file from BSD
to MIT to make it easier to add Henning's copyright for this function. ok
markus@

OpenBSD-Commit-ID: 414a831c662df7e68893e5233e86f2cac081ccf9

6 years agoupstream: avoid possible NULL deref; from Pedro Martelletto
djm@openbsd.org [Mon, 18 May 2020 04:29:35 +0000 (04:29 +0000)] 
upstream: avoid possible NULL deref; from Pedro Martelletto

OpenBSD-Commit-ID: e6099c3fbb70aa67eb106e84d8b43f1fa919b721

6 years agoupstream: sshd listener must not block if reexecd sshd exits
markus@openbsd.org [Fri, 15 May 2020 08:34:03 +0000 (08:34 +0000)] 
upstream: sshd listener must not block if reexecd sshd exits

in write(2) on config_s[0] if the forked child exits early before finishing
recv_rexec_state (e.g. with fatal()) because config_s[1] stays open in the
parent. this prevents the parent from accepting new connections. ok djm,
deraadt

OpenBSD-Commit-ID: 92ccfeb939ccd55bda914dc3fe84582158c4a9ef

6 years agoupstream: fix off-by-one error that caused sftp downloads to make
djm@openbsd.org [Fri, 15 May 2020 03:57:33 +0000 (03:57 +0000)] 
upstream: fix off-by-one error that caused sftp downloads to make

one more concurrent request that desired. This prevented using sftp(1) in
unpipelined request/response mode, which is useful when debugging. Patch from
Stephen Goetze in bz#3054

OpenBSD-Commit-ID: 41b394ebe57037dbc43bdd0eef21ff0511191f28

6 years agoupstream: we are still aiming for pre-C99 ...
deraadt@openbsd.org [Wed, 13 May 2020 22:38:41 +0000 (22:38 +0000)] 
upstream: we are still aiming for pre-C99 ...

OpenBSD-Commit-ID: a240fc9cbe60bc4e6c3d24d022eb4ab01fe1cb38

6 years agoupstream: Enable credProtect extension when generating a resident
djm@openbsd.org [Wed, 13 May 2020 10:08:02 +0000 (10:08 +0000)] 
upstream: Enable credProtect extension when generating a resident

key.

The FIDO 2.1 Client to Authenticator Protocol introduced a "credProtect"
feature to better protect resident keys. This option allows (amone other
possibilities) requiring a PIN prior to all operations that may retrieve
the key handle.

Patch by Pedro Martelletto; ok djm and markus

OpenBSD-Commit-ID: 013bc06a577dcaa66be3913b7f183eb8cad87e73

6 years agoupstream: always call fido_init(); previous behaviour only called
djm@openbsd.org [Wed, 13 May 2020 09:57:17 +0000 (09:57 +0000)] 
upstream: always call fido_init(); previous behaviour only called

fido_init() when SK_DEBUG was defined. Harmless with current libfido2, but
this isn't guaranteed in the future.

OpenBSD-Commit-ID: c7ea20ff2bcd98dd12015d748d3672d4f01f0864

6 years agoupstream: preserve group/world read permission on known_hosts
djm@openbsd.org [Wed, 13 May 2020 09:55:57 +0000 (09:55 +0000)] 
upstream: preserve group/world read permission on known_hosts

file across runs of "ssh-keygen -Rf /path". The old behaviour was to remove
all rights for group/other. bz#3146 ok dtucker@

OpenBSD-Commit-ID: dc369d0e0b5dd826430c63fd5f4b269953448a8a

6 years agoupstream: when ordering the hostkey algorithms to request from a
djm@openbsd.org [Wed, 13 May 2020 09:52:41 +0000 (09:52 +0000)] 
upstream: when ordering the hostkey algorithms to request from a

server, prefer certificate types if the known_hosts files contain a key
marked as a @cert-authority; bz#3157 ok markus@

OpenBSD-Commit-ID: 8f194573e5bb7c01b69bbfaabc68f27c9fa5e0db

6 years agoupstream: fix non-ASCII quote that snuck in; spotted by Gabriel
djm@openbsd.org [Tue, 12 May 2020 01:41:32 +0000 (01:41 +0000)] 
upstream: fix non-ASCII quote that snuck in; spotted by Gabriel

Kihlman

OpenBSD-Commit-ID: 04bcde311de2325d9e45730c744c8de079b49800

6 years agoupstream: clarify role of FIDO tokens in multi-factor
djm@openbsd.org [Mon, 11 May 2020 02:11:29 +0000 (02:11 +0000)] 
upstream: clarify role of FIDO tokens in multi-factor

authentictation; mostly from Pedro Martelletto

OpenBSD-Commit-ID: fbe05685a1f99c74b1baca7130c5a03c2df7c0ac

6 years agoupstream: fix compilation with DEBUG_KEXDH; bz#3160 ok dtucker@
djm@openbsd.org [Fri, 8 May 2020 05:13:14 +0000 (05:13 +0000)] 
upstream: fix compilation with DEBUG_KEXDH; bz#3160 ok dtucker@

OpenBSD-Commit-ID: 832e771948fb45f2270e8b8895aac36d176ba17a

6 years agoprefer ln to cp for temporary copy of sshd
Damien Miller [Thu, 14 May 2020 02:22:09 +0000 (12:22 +1000)] 
prefer ln to cp for temporary copy of sshd

I saw failures on the reexec fallback test on Darwin 19.4 where
fork()ed children of a process that had it's executable removed
would instantly fail. Using ln to preserve the inode avoids this.

6 years agoActually skip pty tests when needed.
Darren Tucker [Wed, 13 May 2020 05:24:51 +0000 (15:24 +1000)] 
Actually skip pty tests when needed.

6 years agoSkip building sk-dummy library if no SK support.
Darren Tucker [Wed, 13 May 2020 03:56:45 +0000 (13:56 +1000)] 
Skip building sk-dummy library if no SK support.

6 years agoexplicitly manage .depend and .depend.bak
Damien Miller [Wed, 13 May 2020 02:08:34 +0000 (12:08 +1000)] 
explicitly manage .depend and .depend.bak

Bring back removal of .depend to give the file a known state before
running makedepend, but manually move aside the current .depend file
and restore it as .depend.bak afterwards so the stale .depend check
works as expected.

6 years agomake depend
Damien Miller [Wed, 13 May 2020 02:03:42 +0000 (12:03 +1000)] 
make depend

6 years agorevert removal of .depend before makedepend
Damien Miller [Wed, 13 May 2020 02:01:10 +0000 (12:01 +1000)] 
revert removal of .depend before makedepend

Commit 83657eac4 started removing .depend before running makedepend
to reset the contents of .depend to a known state. Unfortunately
this broke the depend-check step as now .depend.bak would only ever
be created as an empty file.

ok dtucker

6 years agoprepare for 8.3 release
Damien Miller [Tue, 12 May 2020 02:58:46 +0000 (12:58 +1000)] 
prepare for 8.3 release

6 years agoEnsure SA_SIGNAL test only signals itself.
Darren Tucker [Fri, 8 May 2020 11:50:43 +0000 (21:50 +1000)] 
Ensure SA_SIGNAL test only signals itself.

When the test's child signals its parent and it exits the result of
getppid changes.  On Ubuntu 20.04 this results in the ppid being that
of the GDM session, causing it to exit.  Analysis and testing from pedro
at ambientworks.net

6 years agosync config.guess/config.sub with latest versions
Damien Miller [Fri, 8 May 2020 03:31:53 +0000 (13:31 +1000)] 
sync config.guess/config.sub with latest versions

ok dtucker@

6 years agoupstream: openssh-8.3; ok deraadt@
djm@openbsd.org [Wed, 6 May 2020 20:58:01 +0000 (20:58 +0000)] 
upstream: openssh-8.3; ok deraadt@

OpenBSD-Commit-ID: c8831ec88b9c750f5816aed9051031fb535d22c1

6 years agoupstream: another case where a utimes() failure could make scp send
djm@openbsd.org [Wed, 6 May 2020 20:57:38 +0000 (20:57 +0000)] 
upstream: another case where a utimes() failure could make scp send

a desynchronising error; reminded by Aymeric Vincent ok deraadt markus

OpenBSD-Commit-ID: 2ea611d34d8ff6d703a7a8bf858aa5dbfbfa7381

6 years agoCheck if -D_REENTRANT is needed for localtime_r.
Darren Tucker [Thu, 7 May 2020 05:34:12 +0000 (15:34 +1000)] 
Check if -D_REENTRANT is needed for localtime_r.

On at least HP-UX 11.11, the localtime_r declararation is behind
ifdef _REENTRANT.  Check for and add if needed.

6 years agoSkip security key tests if ENABLE_SK not set.
Darren Tucker [Tue, 5 May 2020 01:32:43 +0000 (11:32 +1000)] 
Skip security key tests if ENABLE_SK not set.

6 years agoupstream: sure enough, some of the test data that we though were in
djm@openbsd.org [Fri, 1 May 2020 04:03:14 +0000 (04:03 +0000)] 
upstream: sure enough, some of the test data that we though were in

new format were actually in the old format; fix from Michael Forney

OpenBSD-Regress-ID: a41a5c43a61b0f0b1691994dbf16dfb88e8af933

6 years agoupstream: make mktestdata.sh generate old/new format keys that we
djm@openbsd.org [Fri, 1 May 2020 04:00:29 +0000 (04:00 +0000)] 
upstream: make mktestdata.sh generate old/new format keys that we

expect. This script was written before OpenSSH switched to new-format private
keys by default and was never updated to the change (until now) From Michael
Forney

OpenBSD-Regress-ID: 38cf354715c96852e5b71c2393fb6e7ad28b7ca7