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

5 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

5 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

5 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

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

5 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

5 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

5 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

5 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

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

5 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

5 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

5 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

5 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

5 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

5 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

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

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

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

5 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

5 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

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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

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

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

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

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

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

5 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

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

5 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

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

5 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

5 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

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

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

5 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

5 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

5 years agoupstream: portability fix for sed that always emil a newline even
djm@openbsd.org [Fri, 1 May 2020 03:58:02 +0000 (03:58 +0000)] 
upstream: portability fix for sed that always emil a newline even

if the input does not contain one; from Michael Forney

OpenBSD-Regress-ID: 9190c3ddf0d2562ccc02c4a95fce0e392196bfc7

5 years agoupstream: remove obsolete RSA1 test keys; spotted by Michael Forney
djm@openbsd.org [Fri, 1 May 2020 03:36:25 +0000 (03:36 +0000)] 
upstream: remove obsolete RSA1 test keys; spotted by Michael Forney

OpenBSD-Regress-ID: 6384ba889594e217d166908ed8253718ab0866da

5 years agoUpdate .depend.
Darren Tucker [Sat, 2 May 2020 08:34:47 +0000 (18:34 +1000)] 
Update .depend.

5 years agoRemove use of tail for 'make depend'.
Darren Tucker [Sat, 2 May 2020 08:29:40 +0000 (18:29 +1000)] 
Remove use of tail for 'make depend'.

Not every tail supports +N and we can do with out it so just remove it.
Prompted by mforney at mforney.org.

5 years agoupstream: we have a sshkey_save_public() function to save public keys;
djm@openbsd.org [Sat, 2 May 2020 07:19:43 +0000 (07:19 +0000)] 
upstream: we have a sshkey_save_public() function to save public keys;

use it and save a bunch of redundant code.

Patch from loic AT venez.fr; ok markus@ djm@

OpenBSD-Commit-ID: f93e030a0ebcd0fd9054ab30db501ec63454ea5f

5 years agoUse LONG_LONG_MAX and friends if available.
Darren Tucker [Fri, 1 May 2020 08:32:25 +0000 (18:32 +1000)] 
Use LONG_LONG_MAX and friends if available.

If we don't have LLONG_{MIN,MAX} but do have LONG_LONG_{MIN,MAX}
then use those instead.  We do calculate these values in configure,
but it turns out that at least one compiler (old HP ANSI C) can't
parse "-9223372036854775808LL" without mangling it. (It can parse
"-9223372036854775807LL" which is presumably why its limits.h defines
LONG_LONG_MIN as the latter minus 1.)

Fixes rekey test when compiled with the aforementioned compiler.

5 years agoupstream: when receving a file in sink(), be careful to send at
djm@openbsd.org [Fri, 1 May 2020 06:31:42 +0000 (06:31 +0000)] 
upstream: when receving a file in sink(), be careful to send at

most a single error response after the file has been opened. Otherwise the
source() and sink() can become desyncronised. Reported by Daniel Goujot,
Georges-Axel Jaloyan, Ryan Lahfa, and David Naccache.

ok deraadt@ markus@

OpenBSD-Commit-ID: 6c14d233c97349cb811a8f7921ded3ae7d9e0035

5 years agoupstream: expose vasnmprintf(); ok (as part of other commit) markus
djm@openbsd.org [Fri, 1 May 2020 06:28:52 +0000 (06:28 +0000)] 
upstream: expose vasnmprintf(); ok (as part of other commit) markus

deraadt

OpenBSD-Commit-ID: 2e80cea441c599631a870fd40307d2ade5a7f9b5

5 years agoupstream: avoid NULL dereference when attempting to convert invalid
djm@openbsd.org [Fri, 1 May 2020 04:23:11 +0000 (04:23 +0000)] 
upstream: avoid NULL dereference when attempting to convert invalid

ssh.com private keys using "ssh-keygen -i"; spotted by Michael Forney

OpenBSD-Commit-ID: 2e56e6d26973967d11d13f56ea67145f435bf298

5 years agoSee if SA_RESTART signals will interrupt select().
Darren Tucker [Fri, 1 May 2020 05:09:26 +0000 (15:09 +1000)] 
See if SA_RESTART signals will interrupt select().

On some platforms (at least older HP-UXes such as 11.11, possibly others)
setting SA_RESTART on signal handers will cause it to not interrupt
select(), at least for calls that do not specify a timeout.  Try to
detect this and if found, don't use SA_RESTART.

POSIX says "If SA_RESTART has been set for the interrupting signal, it
is implementation-dependent whether select() restarts or returns with
[EINTR]" so this behaviour is within spec.

5 years agofix reversed test
Damien Miller [Fri, 1 May 2020 03:55:03 +0000 (13:55 +1000)] 
fix reversed test

5 years agowrap sha2.h inclusion in #ifdef HAVE_SHA2_H
Damien Miller [Fri, 1 May 2020 03:29:16 +0000 (13:29 +1000)] 
wrap sha2.h inclusion in #ifdef HAVE_SHA2_H

5 years agoupstream: adapt dummy FIDO middleware to API change; ok markus@
djm@openbsd.org [Tue, 28 Apr 2020 04:59:29 +0000 (04:59 +0000)] 
upstream: adapt dummy FIDO middleware to API change; ok markus@

OpenBSD-Regress-ID: 8bb84ee500c2eaa5616044314dd0247709a1790f

5 years agoupstream: tweak previous; ok markus
jmc@openbsd.org [Thu, 30 Apr 2020 18:28:37 +0000 (18:28 +0000)] 
upstream: tweak previous; ok markus

OpenBSD-Commit-ID: 41895450ce2294ec44a5713134491cc31f0c09fd

5 years agoupstream: bring back debug() removed in rev 1.74; noted by pradeep
markus@openbsd.org [Thu, 30 Apr 2020 17:12:20 +0000 (17:12 +0000)] 
upstream: bring back debug() removed in rev 1.74; noted by pradeep

kumar

OpenBSD-Commit-ID: 8d134d22ab25979078a3b48d058557d49c402e65

5 years agoupstream: run the 2nd ssh with BatchMode for scp -3
markus@openbsd.org [Thu, 30 Apr 2020 17:07:10 +0000 (17:07 +0000)] 
upstream: run the 2nd ssh with BatchMode for scp -3

OpenBSD-Commit-ID: 77994fc8c7ca02d88e6d0d06d0f0fe842a935748

5 years agoupstream: when signing a challenge using a FIDO toke, perform the
djm@openbsd.org [Tue, 28 Apr 2020 04:02:29 +0000 (04:02 +0000)] 
upstream: when signing a challenge using a FIDO toke, perform the

hashing in the middleware layer rather than in ssh code. This allows
middlewares that call APIs that perform the hashing implicitly (including
Microsoft's AFAIK). ok markus@

OpenBSD-Commit-ID: c9fc8630aba26c75d5016884932f08a5a237f37d

5 years agoupstream: Fix comment typo. Patch from mforney at mforney.org.
dtucker@openbsd.org [Sun, 26 Apr 2020 09:38:14 +0000 (09:38 +0000)] 
upstream: Fix comment typo. Patch from mforney at mforney.org.

OpenBSD-Commit-ID: 3565f056003707a5e678e60e03f7a3efd0464a2b

5 years agoupstream: We've standardized on memset over bzero, replace a couple
dtucker@openbsd.org [Sat, 25 Apr 2020 06:59:36 +0000 (06:59 +0000)] 
upstream: We've standardized on memset over bzero, replace a couple

that had slipped in.  ok deraadt markus djm.

OpenBSD-Commit-ID: f5be055554ee93e6cc66b0053b590bef3728dbd6

5 years agoInclude sys/byteorder.h for htons and friends.
Darren Tucker [Fri, 1 May 2020 02:21:58 +0000 (12:21 +1000)] 
Include sys/byteorder.h for htons and friends.

These are usually in netinet/in.h but on HP-UX they are not defined if
_XOPEN_SOURCE_EXTENDED is set.  Only needed for netcat in the regression
tests.

5 years agoFix conditional for openssl-based chacha20.
Darren Tucker [Thu, 30 Apr 2020 23:21:52 +0000 (09:21 +1000)] 
Fix conditional for openssl-based chacha20.

Fixes warnings or link errors when building against older OpenSSLs.
ok djm

5 years agoError out if given RDomain if unsupported.
Darren Tucker [Fri, 24 Apr 2020 05:07:55 +0000 (15:07 +1000)] 
Error out if given RDomain if unsupported.

If the config contained 'RDomain %D' on a platform that did not support
it, the error would not be detected until runtime resulting in a broken
sshd.  Detect this earlier and error out if found.  bz#3126, based on a
patch from jjelen at redhat.com, tweaks and ok djm@

5 years agoupstream: Fix incorrect error message for "too many known hosts files."
dtucker@openbsd.org [Fri, 24 Apr 2020 03:33:21 +0000 (03:33 +0000)] 
upstream: Fix incorrect error message for "too many known hosts files."

bz#3149, patch from jjelen at redhat.com.

OpenBSD-Commit-ID: e0fcb07ed5cf7fd54ce340471a747c24454235e5

5 years agoupstream: Remove leave_non_blocking() which is now dead code
dtucker@openbsd.org [Fri, 24 Apr 2020 02:19:40 +0000 (02:19 +0000)] 
upstream: Remove leave_non_blocking() which is now dead code

because nothing sets in_non_blocking_mode any more. Patch from
michaael.meeks at collabora.com, ok djm@

OpenBSD-Commit-ID: c403cefe97a5a99eca816e19cc849cdf926bd09c

5 years agoupstream: ce examples of "Ar arg Ar arg" with "Ar arg arg" and
jmc@openbsd.org [Thu, 23 Apr 2020 21:28:09 +0000 (21:28 +0000)] 
upstream: ce examples of "Ar arg Ar arg" with "Ar arg arg" and

stop the spread;

OpenBSD-Commit-ID: af0e952ea0f5e2019c2ce953ed1796eca47f0705

5 years agoUpdate .depend.
Darren Tucker [Fri, 24 Apr 2020 01:10:18 +0000 (11:10 +1000)] 
Update .depend.

5 years agoMailing list is now closed to non-subscribers.
Darren Tucker [Wed, 22 Apr 2020 04:07:00 +0000 (14:07 +1000)] 
Mailing list is now closed to non-subscribers.

While there, add a reference to the bugzilla.  ok djm@

5 years agoPut the values from env vars back.
Darren Tucker [Wed, 22 Apr 2020 02:09:40 +0000 (12:09 +1000)] 
Put the values from env vars back.

This merges the values from the recently removed environment into make's
command line arguments since we actually need those.

5 years agoPass configure's egrep through to test-exec.sh.
Darren Tucker [Wed, 22 Apr 2020 01:33:15 +0000 (11:33 +1000)] 
Pass configure's egrep through to test-exec.sh.

Use it to create a wrapper function to call it from tests.  Fixes the
keygen-comment test on platforms with impoverished default egrep (eg
Solaris).

5 years agoRemove unneeded env vars from t-exec invocation.
Darren Tucker [Wed, 22 Apr 2020 00:56:44 +0000 (10:56 +1000)] 
Remove unneeded env vars from t-exec invocation.

5 years agoupstream: Backslash '$' at then end of string. Prevents warning on
dtucker@openbsd.org [Tue, 21 Apr 2020 23:14:58 +0000 (23:14 +0000)] 
upstream: Backslash '$' at then end of string. Prevents warning on

some shells.

OpenBSD-Regress-ID: 5dc27ab624c09d34078fd326b10e38c1ce9c741f

5 years agoSync rev 1.49.
Darren Tucker [Tue, 21 Apr 2020 08:27:23 +0000 (18:27 +1000)] 
Sync rev 1.49.

Prevent infinite for loop since i went from ssize_t to size_t.  Patch from
eagleoflqj via OpenSSH github PR#178, ok djm@, feedback & ok millert@

5 years agoupstream: regression test for printing of private key fingerprints and
djm@openbsd.org [Mon, 20 Apr 2020 04:44:47 +0000 (04:44 +0000)] 
upstream: regression test for printing of private key fingerprints and

key comments, mostly by loic AT venez.fr (slightly tweaked for portability)
ok dtucker@

OpenBSD-Regress-ID: 8dc6c4feaf4fe58b6d634cd89afac9a13fd19004

5 years agoupstream: fix a bug I introduced in r1.406: when printing private key
djm@openbsd.org [Mon, 20 Apr 2020 04:43:57 +0000 (04:43 +0000)] 
upstream: fix a bug I introduced in r1.406: when printing private key

fingerprint of old-format key, key comments were not being displayed. Spotted
by loic AT venez.fr, ok dtucker

OpenBSD-Commit-ID: 2d98e4f9eb168eea733d17e141e1ead9fe26e533

5 years agoupstream: repair private key fingerprint printing to also print
djm@openbsd.org [Fri, 17 Apr 2020 07:16:07 +0000 (07:16 +0000)] 
upstream: repair private key fingerprint printing to also print

comment after regression caused by my recent pubkey loading refactor.
Reported by loic AT venez.fr, ok dtucker@

OpenBSD-Commit-ID: f8db49acbee6a6ccb2a4259135693b3cceedb89e

5 years agoupstream: refactor out some duplicate private key loading code;
djm@openbsd.org [Fri, 17 Apr 2020 07:15:11 +0000 (07:15 +0000)] 
upstream: refactor out some duplicate private key loading code;

based on patch from loic AT venez.fr, ok dtucker@

OpenBSD-Commit-ID: 5eff2476b0d8d0614924c55e350fb7bb9c84f45e

5 years agoupstream: add space beteen macro arg and punctuation;
jmc@openbsd.org [Fri, 17 Apr 2020 06:12:41 +0000 (06:12 +0000)] 
upstream: add space beteen macro arg and punctuation;

OpenBSD-Commit-ID: c93a6cbb4bf9468fc4c13e64bc1fd4efee201a44

5 years agoupstream: auth2-pubkey r1.89 changed the order of operations to
djm@openbsd.org [Fri, 17 Apr 2020 04:27:03 +0000 (04:27 +0000)] 
upstream: auth2-pubkey r1.89 changed the order of operations to

checking AuthorizedKeysFile first and falling back to AuthorizedKeysCommand
if no key was found in a file. Document this order here; bz3134

OpenBSD-Commit-ID: afce0872cbfcfc1d4910ad7722e50f792a1dce12

5 years agosys/sysctl.h is only used on OpenBSD
Damien Miller [Fri, 17 Apr 2020 04:07:15 +0000 (14:07 +1000)] 
sys/sysctl.h is only used on OpenBSD

so change the preprocessor test used to include it to check
__OpenBSD__, matching the code that uses the symbols it declares.

5 years agoupstream: fix reversed test that caused IdentitiesOnly=yes to not
djm@openbsd.org [Fri, 17 Apr 2020 03:38:47 +0000 (03:38 +0000)] 
upstream: fix reversed test that caused IdentitiesOnly=yes to not

apply to keys loaded from a PKCS11Provider; bz3141, ok dtucker@

OpenBSD-Commit-ID: e3dd6424b94685671fe84c9b9dbe352fb659f677