]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
4 years agoMove signal.h up include order to match upstream.
Darren Tucker [Sat, 3 Jul 2021 10:38:09 +0000 (20:38 +1000)] 
Move signal.h up include order to match upstream.

4 years agoRemove old OpenBSD version marker.
Darren Tucker [Sat, 3 Jul 2021 10:36:06 +0000 (20:36 +1000)] 
Remove old OpenBSD version marker.

Looks like an accidental leftover from a sync.

4 years agoRemove duplicate error on error path.
Darren Tucker [Sat, 3 Jul 2021 10:34:19 +0000 (20:34 +1000)] 
Remove duplicate error on error path.

There's an extra error() call on the listen error path, it looks like
its removal was missed during an upstream sync.

4 years agoRemove some whitespace not in upstream.
Darren Tucker [Sat, 3 Jul 2021 10:32:46 +0000 (20:32 +1000)] 
Remove some whitespace not in upstream.

Reduces diff vs OpenBSD by a small amount.

4 years agoReplace remaining references to ChallengeResponse.
Darren Tucker [Sat, 3 Jul 2021 09:27:43 +0000 (19:27 +1000)] 
Replace remaining references to ChallengeResponse.

Portable had a few additional references to ChallengeResponse related to
UsePAM, replaces these with equivalent keyboard-interactive ones.

4 years agoSync remaining ChallengeResponse removal.
Darren Tucker [Sat, 3 Jul 2021 09:23:28 +0000 (19:23 +1000)] 
Sync remaining ChallengeResponse removal.

These were omitted from commit 88868fd131.

4 years agoDisable rocky84 to figure out why agent test fails
Darren Tucker [Sat, 3 Jul 2021 09:17:31 +0000 (19:17 +1000)] 
Disable rocky84 to figure out why agent test fails

4 years agoRemove now-unused SSHv1 enums.
Darren Tucker [Fri, 2 Jul 2021 05:43:28 +0000 (15:43 +1000)] 
Remove now-unused SSHv1 enums.

sRhostsRSAAuthentication and sRSAAuthentication are protocol 1 options
and are no longer used.

4 years agoupstream: Remove references to ChallengeResponseAuthentication in
dtucker@openbsd.org [Fri, 2 Jul 2021 05:11:20 +0000 (05:11 +0000)] 
upstream: Remove references to ChallengeResponseAuthentication in

favour of KbdInteractiveAuthentication.  The former is what was in SSHv1, the
latter is what is in SSHv2 (RFC4256) and they were treated as somewhat but
not entirely equivalent.  We retain the old name as deprecated alias so
config files continue to work and a reference in the man page for people
looking for it.

Prompted by bz#3303 which pointed out the discrepancy between the two
when used with Match.  Man page help & ok jmc@, with & ok djm@

OpenBSD-Commit-ID: 2c1bff8e5c9852cfcdab1f3ea94dfef5a22f3b7e

4 years agoFix ifdefs around get_random_bytes_prngd.
Darren Tucker [Fri, 2 Jul 2021 05:20:32 +0000 (15:20 +1000)] 
Fix ifdefs around get_random_bytes_prngd.

get_random_bytes_prngd() is used if either of PRNGD_PORT or PRNGD_SOCKET
are defined, so adjust ifdef accordingly.

4 years agowrap get_random_bytes_prngd() in ifdef
Damien Miller [Fri, 2 Jul 2021 04:30:23 +0000 (14:30 +1000)] 
wrap get_random_bytes_prngd() in ifdef

avoid unused static function warning

4 years agoAdd rocky84 test target.
Darren Tucker [Mon, 28 Jun 2021 03:06:37 +0000 (13:06 +1000)] 
Add rocky84 test target.

4 years agoupstream: fix decoding of X.509 subject name; from Leif Thuresson
djm@openbsd.org [Fri, 25 Jun 2021 06:30:22 +0000 (06:30 +0000)] 
upstream: fix decoding of X.509 subject name; from Leif Thuresson

via bz3327 ok markus@

OpenBSD-Commit-ID: 0ea2e28f39750dd388b7e317bc43dd997a217ae8

4 years agoupstream: Use better language to refer to the user. From l1ving
dtucker@openbsd.org [Fri, 25 Jun 2021 06:20:39 +0000 (06:20 +0000)] 
upstream: Use better language to refer to the user. From l1ving

via github PR#250, ok jmc@

OpenBSD-Commit-ID: 07ca3526626996613e128aeddf7748c93c4d6bbf

4 years agoupstream: Replace SIGCHLD/notify_pipe kludge with pselect.
dtucker@openbsd.org [Fri, 25 Jun 2021 03:38:17 +0000 (03:38 +0000)] 
upstream: Replace SIGCHLD/notify_pipe kludge with pselect.

Previously sshd's SIGCHLD handler would wake up select() by writing a
byte to notify_pipe.  We can remove this by blocking SIGCHLD, checking
for child terminations then passing the original signal mask through
to pselect.  This ensures that the pselect will immediately wake up if
a child terminates between wait()ing on them and the pselect.

In -portable, for platforms that do not have pselect the kludge is still
there but is hidden behind a pselect interface.

Based on other changes for bz#2158, ok djm@

OpenBSD-Commit-ID: 202c85de0b3bdf1744fe53529a05404c5480d813

4 years agoMove closefrom() to before first malloc.
Darren Tucker [Fri, 25 Jun 2021 05:08:18 +0000 (15:08 +1000)] 
Move closefrom() to before first malloc.

When built against tcmalloc, tcmalloc allocates a descriptor for its
internal use, so calling closefrom() afterward causes the descriptor
number to be reused resulting in a corrupted connection.  Moving the
closefrom a little earlier should resolve this.  From kircherlike at
outlook.com via bz#3321, ok djm@

4 years agoPut second -lssh in link line for sftp-server.
Darren Tucker [Fri, 18 Jun 2021 10:41:45 +0000 (20:41 +1000)] 
Put second -lssh in link line for sftp-server.

When building --without-openssl the recent port-prngd.c change adds
a dependency on atomicio, but since nothing else in sftp-server uses
it, the linker may not find it.  Add a second -lssh similar to other
binaries.

4 years agoTry EGD/PRNGD if random device fails.
Darren Tucker [Fri, 18 Jun 2021 08:34:08 +0000 (18:34 +1000)] 
Try EGD/PRNGD if random device fails.

When built --without-openssl, try EGD/PRGGD (if configured) as a last
resort before failing.

4 years agoSplit EGD/PRNGD interface into its own file.
Darren Tucker [Fri, 18 Jun 2021 08:32:51 +0000 (18:32 +1000)] 
Split EGD/PRNGD interface into its own file.

This will allow us to use it when building --without-openssl.

4 years agoHandle GIDs > 2^31 in getgrouplist.
Darren Tucker [Thu, 17 Jun 2021 11:03:19 +0000 (21:03 +1000)] 
Handle GIDs > 2^31 in getgrouplist.

When compiled in 32bit mode, the getgrouplist implementation may fail
for GIDs greater than LONG_MAX.  Analysis and change from ralf.winkel
at tui.com.

4 years agoupstream: Use $SUDO when reading sshd's pidfile here too.
dtucker@openbsd.org [Thu, 10 Jun 2021 09:46:28 +0000 (09:46 +0000)] 
upstream: Use $SUDO when reading sshd's pidfile here too.

OpenBSD-Regress-ID: 6bfb0d455d493f24839034a629c5306f84dbd409

4 years agoupstream: Use $SUDO when reading sshd's pidfile in case it was
dtucker@openbsd.org [Thu, 10 Jun 2021 09:43:51 +0000 (09:43 +0000)] 
upstream: Use $SUDO when reading sshd's pidfile in case it was

created with a very restrictive umask.  This resyncs with -portable.

OpenBSD-Regress-ID: 07fd2af06df759d4f64b82c59094accca1076a5d

4 years agoupstream: Set umask when creating hostkeys to prevent excessive
dtucker@openbsd.org [Thu, 10 Jun 2021 09:37:59 +0000 (09:37 +0000)] 
upstream: Set umask when creating hostkeys to prevent excessive

permissions warning.

OpenBSD-Regress-ID: 382841db0ee28dfef7f7bffbd511803e1b8ab0ef

4 years agoupstream: Add regress test for SIGHUP restart
dtucker@openbsd.org [Thu, 10 Jun 2021 03:45:31 +0000 (03:45 +0000)] 
upstream: Add regress test for SIGHUP restart

while handling active and unauthenticated clients.  Should catch anything
similar to the pselect bug just fixed in sshd.c.

OpenBSD-Regress-ID: 3b3c19b5e75e43af1ebcb9586875b3ae3a4cac73

4 years agoupstream: Continue accept loop when pselect
dtucker@openbsd.org [Thu, 10 Jun 2021 03:14:14 +0000 (03:14 +0000)] 
upstream: Continue accept loop when pselect

returns -1, eg if it was interrupted by a signal.  This should prevent
the hang discovered by sthen@ wherein sshd receives a SIGHUP while it has
an unauthenticated child and goes on to a blocking read on a notify_pipe.
feedback deraadt@, ok djm@

OpenBSD-Commit-ID: 0243c1c5544fca0974dae92cd4079543a3fceaa0

4 years agoupstream: test that UserKnownHostsFile correctly accepts multiple
djm@openbsd.org [Tue, 8 Jun 2021 22:30:27 +0000 (22:30 +0000)] 
upstream: test that UserKnownHostsFile correctly accepts multiple

arguments; would have caught readconf.c r1.356 regression

OpenBSD-Regress-ID: 71ca54e66c2a0211b04999263e56390b1f323a6a

4 years agoupstream: fix regression in r1.356: for ssh_config options that
djm@openbsd.org [Tue, 8 Jun 2021 22:06:12 +0000 (22:06 +0000)] 
upstream: fix regression in r1.356: for ssh_config options that

accepted multiple string arguments, ssh was only recording the first.
Reported by Lucas via bugs@

OpenBSD-Commit-ID: 7cbf182f7449bf1cb7c5b4452667dc2b41170d6d

4 years agoupstream: test argv_split() optional termination on comments
djm@openbsd.org [Tue, 8 Jun 2021 07:40:12 +0000 (07:40 +0000)] 
upstream: test argv_split() optional termination on comments

OpenBSD-Regress-ID: 9fd1c4a27a409897437c010cfd79c54b639a059c

4 years agoupstream: Add testcases from bz#3319 for IPQoS and TunnelDevice
dtucker@openbsd.org [Tue, 8 Jun 2021 07:05:27 +0000 (07:05 +0000)] 
upstream: Add testcases from bz#3319 for IPQoS and TunnelDevice

being overridden on the command line.

OpenBSD-Regress-ID: 801674d5d2d02abd58274a78cab2711f11de14a8

4 years agoupstream: sprinkle some "# comment" at end of configuration lines
djm@openbsd.org [Tue, 8 Jun 2021 06:52:43 +0000 (06:52 +0000)] 
upstream: sprinkle some "# comment" at end of configuration lines

to test comment handling

OpenBSD-Regress-ID: cb82fbf40bda5c257a9f742c63b1798e5a8fdda7

4 years agoupstream: more descriptive failure message
djm@openbsd.org [Tue, 8 Jun 2021 06:51:47 +0000 (06:51 +0000)] 
upstream: more descriptive failure message

OpenBSD-Regress-ID: 5300f6faf1d9e99c0cd10827b51756c5510e3509

4 years agoupstream: test AuthenticationMethods inside a Match block as well
djm@openbsd.org [Mon, 7 Jun 2021 01:16:34 +0000 (01:16 +0000)] 
upstream: test AuthenticationMethods inside a Match block as well

as in the main config section

OpenBSD-Regress-ID: ebe0a686621b7cb8bb003ac520975279c28747f7

4 years agoupstream: prepare for stricter sshd_config parsing that will refuse
djm@openbsd.org [Mon, 7 Jun 2021 00:00:50 +0000 (00:00 +0000)] 
upstream: prepare for stricter sshd_config parsing that will refuse

a config that has {Allow,Deny}{Users,Groups} on a line with no subsequent
arguments. Such lines are permitted but are nonsensical noops ATM

OpenBSD-Regress-ID: ef65463fcbc0bd044e27f3fe400ea56eb4b8f650

4 years agoupstream: switch sshd_config parsing to argv_split()
djm@openbsd.org [Tue, 8 Jun 2021 07:09:42 +0000 (07:09 +0000)] 
upstream: switch sshd_config parsing to argv_split()

similar to the previous commit, this switches sshd_config parsing to
the newer tokeniser. Config parsing will be a little stricter wrt
quote correctness and directives appearing without arguments.

feedback and ok markus@

tested in snaps for the last five or so days - thanks Theo and those who
caught bugs

OpenBSD-Commit-ID: 9c4305631d20c2d194661504ce11e1f68b20d93e

4 years agoupstream: Switch ssh_config parsing to use argv_split()
djm@openbsd.org [Tue, 8 Jun 2021 07:07:15 +0000 (07:07 +0000)] 
upstream: Switch ssh_config parsing to use argv_split()

This fixes a couple of problems with the previous tokeniser,
strdelim()

1. strdelim() is permissive wrt accepting '=' characters. This is
  intended to allow it to tokenise "Option=value" but because it
  cannot keep state, it will incorrectly split "Opt=val=val2".
2. strdelim() has rudimentry handling of quoted strings, but it
  is incomplete and inconsistent. E.g. it doesn't handle escaped
  quotes inside a quoted string.
3. It has no support for stopping on a (unquoted) comment. Because
  of this readconf.c r1.343 added chopping of lines at '#', but
  this caused a regression because these characters may legitimately
  appear inside quoted strings.

The new tokeniser is stricter is a number of cases, including #1 above
but previously it was also possible for some directives to appear
without arguments. AFAIK these were nonsensical in all cases, and the
new tokeniser refuses to accept them.

The new code handles quotes much better, permitting quoted space as
well as escaped closing quotes. Finally, comment handling should be
fixed - the tokeniser will terminate only on unquoted # characters.

feedback & ok markus@

tested in snaps for the last five or so days - thanks Theo and those who
caught bugs

OpenBSD-Commit-ID: dc72fd12af9d5398f4d9e159d671f9269c5b14d5

4 years agoupstream: Check if IPQoS or TunnelDevice are already set before
dtucker@openbsd.org [Tue, 8 Jun 2021 07:02:46 +0000 (07:02 +0000)] 
upstream: Check if IPQoS or TunnelDevice are already set before

overriding. Prevents values in config files from overriding values supplied
on the command line.  bz#3319, ok markus.

OpenBSD-Commit-ID: f3b08b898c324debb9195e6865d8999406938f74

4 years agoupstream: Allow argv_split() to optionally terminate tokenisation
djm@openbsd.org [Tue, 8 Jun 2021 06:54:40 +0000 (06:54 +0000)] 
upstream: Allow argv_split() to optionally terminate tokenisation

when it encounters an unquoted comment.

Add some additional utility function for working with argument
vectors, since we'll be switching to using them to parse
ssh/sshd_config shortly.

ok markus@ as part of a larger diff; tested in snaps

OpenBSD-Commit-ID: fd9c108cef2f713f24e3bc5848861d221bb3a1ac

4 years agoSave logs on failure for upstream test
Darren Tucker [Mon, 7 Jun 2021 09:19:23 +0000 (19:19 +1000)] 
Save logs on failure for upstream test

4 years agoAdd obsdsnap-i386 upstream test target.
Darren Tucker [Mon, 7 Jun 2021 04:36:32 +0000 (14:36 +1000)] 
Add obsdsnap-i386 upstream test target.

4 years agoupstream: fix debug message when finding a private key to match a
djm@openbsd.org [Mon, 7 Jun 2021 03:38:38 +0000 (03:38 +0000)] 
upstream: fix debug message when finding a private key to match a

certificate being attempted for user authentication. Previously it would
print the certificate's path, whereas it was supposed to be showing the
private key's path. Patch from Alex Sherwin via GHPR247

OpenBSD-Commit-ID: d5af3be66d0f22c371dc1fe6195e774a18b2327b

4 years agoupstream: Match host certificates against host public keys, not private
djm@openbsd.org [Sun, 6 Jun 2021 11:34:16 +0000 (11:34 +0000)] 
upstream: Match host certificates against host public keys, not private

keys. Allows use of certificates with private keys held in a ssh-agent.
Reported by Miles Zhou in bz3524; ok dtucker@

OpenBSD-Commit-ID: 25f5bf70003126d19162862d9eb380bf34bac22a

4 years agoupstream: Client-side workaround for a bug in OpenSSH 7.4: this release
djm@openbsd.org [Sun, 6 Jun 2021 03:40:39 +0000 (03:40 +0000)] 
upstream: Client-side workaround for a bug in OpenSSH 7.4: this release

allows RSA/SHA2 signatures for public key authentication but fails to
advertise this correctly via SSH2_MSG_EXT_INFO. This causes clients of these
server to incorrectly match PubkeyAcceptedAlgorithms and potentially refuse
to offer valid keys.

Reported by and based on patch from Gordon Messmer via bz3213, thanks
also for additional analysis by Jakub Jelen. ok dtucker

OpenBSD-Commit-ID: d6d0b7351d5d44c45f3daaa26efac65847a564f7

4 years agoupstream: degrade gracefully if a sftp-server offers the
djm@openbsd.org [Sun, 6 Jun 2021 03:17:02 +0000 (03:17 +0000)] 
upstream: degrade gracefully if a sftp-server offers the

limits@openssh.com extension but fails when the client tries to invoke it.
Reported by Hector Martin via bz3318

OpenBSD-Commit-ID: bd9d1839c41811616ede4da467e25746fcd9b967

4 years agoupstream: the limits@openssh.com extension was incorrectly marked
djm@openbsd.org [Sun, 6 Jun 2021 03:15:39 +0000 (03:15 +0000)] 
upstream: the limits@openssh.com extension was incorrectly marked

as an operation that writes to the filesystem, which made it unavailable in
sftp-server read-only mode. Spotted by Hector Martin via bz3318

OpenBSD-Commit-ID: f054465230787e37516c4b57098fc7975e00f067

4 years agoupstream: PROTOCOL.certkeys: update reference from IETF draft to
naddy@openbsd.org [Sat, 5 Jun 2021 13:47:00 +0000 (13:47 +0000)] 
upstream: PROTOCOL.certkeys: update reference from IETF draft to

RFC

Also fix some typos.
ok djm@

OpenBSD-Commit-ID: 5e855b6c5a22b5b13f8ffa3897a868e40d349b44

4 years agoClear notify_pipe from readset if present.
Darren Tucker [Fri, 4 Jun 2021 13:41:29 +0000 (23:41 +1000)] 
Clear notify_pipe from readset if present.

Prevents leaking an implementation detail to the caller.

4 years agospace->tabs.
Darren Tucker [Fri, 4 Jun 2021 13:24:25 +0000 (23:24 +1000)] 
space->tabs.

4 years agoAdd pselect implementation for platforms without.
Darren Tucker [Fri, 4 Jun 2021 08:39:48 +0000 (18:39 +1000)] 
Add pselect implementation for platforms without.

This is basically the existing notify_pipe kludge from serverloop.c
moved behind a pselect interface.  It works by installing a signal
handler that writes to a pipe that the select is watching, then calls
the original handler.

The select call in serverloop will become pselect soon, at which point the
kludge will be removed from thereand will only exist in the compat layer.
Original code by markus, help from djm.

4 years agoauth_log: dont log partial successes as failures
Vincent Brillault [Sun, 24 May 2020 07:15:06 +0000 (09:15 +0200)] 
auth_log: dont log partial successes as failures

By design, 'partial' logins are successful logins, so initially with
authenticated set to 1, for which another authentication is required. As
a result, authenticated is always reset to 0 when partial is set to 1.
However, even if authenticated is 0, those are not failed login
attempts, similarly to attempts with authctxt->postponed set to 1.

4 years agoupstream: The RB_GENERATE_STATIC(3) macro expands to a series of
djm@openbsd.org [Fri, 4 Jun 2021 06:19:07 +0000 (06:19 +0000)] 
upstream: The RB_GENERATE_STATIC(3) macro expands to a series of

function definitions and not a statement, so there should be no semicolon
following them. Patch from Michael Forney

OpenBSD-Commit-ID: c975dd180580f0bdc0a4d5b7d41ab1f5e9b7bedd

4 years agoupstream: rework authorized_keys example section, removing irrelevant
djm@openbsd.org [Fri, 4 Jun 2021 05:59:18 +0000 (05:59 +0000)] 
upstream: rework authorized_keys example section, removing irrelevant

stuff, de-wrapping the example lines and better aligning the examples with
common usage and FAQs; ok jmc

OpenBSD-Commit-ID: d59f1c9281f828148e2a2e49eb9629266803b75c

4 years agoupstream: adjust SetEnv description to clarify $TERM handling
djm@openbsd.org [Fri, 4 Jun 2021 05:10:03 +0000 (05:10 +0000)] 
upstream: adjust SetEnv description to clarify $TERM handling

OpenBSD-Commit-ID: 8b8cc0124856bc1094949d55615e5c44390bcb22

4 years agoupstream: Switch the listening select loop from select() to
dtucker@openbsd.org [Fri, 4 Jun 2021 05:09:08 +0000 (05:09 +0000)] 
upstream: Switch the listening select loop from select() to

pselect() and mask signals while checking signal flags, umasking for pselect
and restoring afterwards. Also restore signals before sighup_restart so they
don't remain blocked after restart.

This prevents a race where a SIGTERM or SIGHUP can arrive between
checking the flag and calling select (eg if sshd is processing a
new connection) resulting in sshd not shutting down until the next
time it receives a new connection.  bz#2158, with & ok djm@

OpenBSD-Commit-ID: bf85bf880fd78e00d7478657644fcda97b9a936f

4 years agoupstream: allow ssh_config SetEnv to override $TERM, which is otherwise
djm@openbsd.org [Fri, 4 Jun 2021 05:02:40 +0000 (05:02 +0000)] 
upstream: allow ssh_config SetEnv to override $TERM, which is otherwise

handled specially by the protocol. Useful in ~/.ssh/config to set TERM to
something generic (e.g. "xterm" instead of "xterm-256color") for destinations
that lack terminfo entries. feedback and ok dtucker@

OpenBSD-Commit-ID: 38b1ef4d5bc159c7d9d589d05e3017433e2d5758

4 years agoupstream: correct extension name "no-presence-required" =>
djm@openbsd.org [Fri, 4 Jun 2021 04:02:21 +0000 (04:02 +0000)] 
upstream: correct extension name "no-presence-required" =>

"no-touch-required"

document "verify-required" option

OpenBSD-Commit-ID: 1879ff4062cf61d79b515e433aff0bf49a6c55c5

4 years agoRetire fbsd7 test target.
Darren Tucker [Wed, 2 Jun 2021 03:54:11 +0000 (13:54 +1000)] 
Retire fbsd7 test target.

It's the slowest of the selfhosted targets (since it's 32bit but has
most of the crypto algos). We still have coverage for 32bit i386.

4 years agoCheck for $OPENSSL in md5 fallback too.
Darren Tucker [Wed, 2 Jun 2021 01:21:40 +0000 (11:21 +1000)] 
Check for $OPENSSL in md5 fallback too.

4 years agoAdd dfly60 target.
Darren Tucker [Wed, 2 Jun 2021 01:17:54 +0000 (11:17 +1000)] 
Add dfly60 target.

4 years agoupstream: Merge back shell portability changes
dtucker@openbsd.org [Wed, 2 Jun 2021 00:17:45 +0000 (00:17 +0000)] 
upstream: Merge back shell portability changes

bringing it back in sync with -portable.

OpenBSD-Regress-ID: c07905ba931e66ad7d849b87b7d19648007175d1

4 years agoupstream: Use a default value for $OPENSSL,
dtucker@openbsd.org [Tue, 1 Jun 2021 23:56:20 +0000 (23:56 +0000)] 
upstream: Use a default value for $OPENSSL,

allowing it to be overridden. Do the same in the PuTTY tests since it's
needed there and not exported by test-exec.sh.

OpenBSD-Regress-ID: c49dcd6aa7602a8606b7afa192196ca1fa65de16

4 years agoupstream: Find openssl binary via environment variable. This
dtucker@openbsd.org [Mon, 24 May 2021 10:25:18 +0000 (10:25 +0000)] 
upstream: Find openssl binary via environment variable. This

allows overriding if necessary (eg in -portable where we're testing against a
specific version of OpenSSL).

OpenBSD-Regress-ID: 491f39cae9e762c71aa4bf045803d077139815c5

4 years agoupstream: fix memleak in test
djm@openbsd.org [Fri, 21 May 2021 04:03:47 +0000 (04:03 +0000)] 
upstream: fix memleak in test

OpenBSD-Regress-ID: 5e529d0982aa04666604936df43242e97a7a6f81

4 years agoupstream: also check contents of remaining string
djm@openbsd.org [Fri, 21 May 2021 03:59:01 +0000 (03:59 +0000)] 
upstream: also check contents of remaining string

OpenBSD-Regress-ID: d526fa07253f4eebbc7d6205a0ab3d491ec71a28

4 years agoupstream: unit test for misc.c:strdelim() that mostly servces to
djm@openbsd.org [Fri, 21 May 2021 03:48:07 +0000 (03:48 +0000)] 
upstream: unit test for misc.c:strdelim() that mostly servces to

highlight its inconsistencies

OpenBSD-Regress-ID: 8d2bf970fcc01ccc6e36a5065f89b9c7fa934195

4 years agoPut minix3 config in the host-specific block.
Darren Tucker [Thu, 27 May 2021 11:23:15 +0000 (21:23 +1000)] 
Put minix3 config in the host-specific block.

4 years agoupstream: Hash challenge supplied by client during FIDO key enrollment
djm@openbsd.org [Mon, 31 May 2021 06:48:42 +0000 (06:48 +0000)] 
upstream: Hash challenge supplied by client during FIDO key enrollment

prior to passing it to libfido2, which does expect a hash.

There is no effect for users who are simply generating FIDO keys using
ssh-keygen - by default we generate a random 256 bit challenge, but
people building attestation workflows around our tools should now have
a more consistent experience (esp. fewer failures when they fail to
guess the magic 32-byte challenge length requirement).

ok markus@

OpenBSD-Commit-ID: b8d5363a6a7ca3b23dc28f3ca69470472959f2b5

4 years agoInclude login_cap.h for login_getpwclass override.
Darren Tucker [Thu, 27 May 2021 11:14:15 +0000 (21:14 +1000)] 
Include login_cap.h for login_getpwclass override.

On minix3, login_getpwclass is __RENAME'ed to __login_getpwclass50 so
without this the include overriding login_getpwclass causes a compile
error.

4 years agoAdd minix3 test target.
Darren Tucker [Thu, 27 May 2021 11:13:38 +0000 (21:13 +1000)] 
Add minix3 test target.

4 years agoupstream: fix SEGV in UpdateHostkeys debug() message, triggered
djm@openbsd.org [Wed, 26 May 2021 01:47:24 +0000 (01:47 +0000)] 
upstream: fix SEGV in UpdateHostkeys debug() message, triggered

when the update removed more host keys than remain present. Fix tested by
reporter James Cook, via bugs@

OpenBSD-Commit-ID: 44f641f6ee02bb957f0c1d150495b60cf7b869d3

4 years agoupstream: ssh: The client configuration keyword is
naddy@openbsd.org [Sun, 23 May 2021 18:22:57 +0000 (18:22 +0000)] 
upstream: ssh: The client configuration keyword is

"hostbasedacceptedalgorithms"

This fixes a mistake that slipped in when "HostbasedKeyTypes" was
renamed to "HostbasedAcceptedAlgorithms".

Bug report by zack@philomathiclife.com

OpenBSD-Commit-ID: d745a7e8e50b2589fc56877f322ea204bc784f38

4 years agoRename README.md to ci-status.md.
Darren Tucker [Tue, 25 May 2021 01:40:47 +0000 (11:40 +1000)] 
Rename README.md to ci-status.md.

The original intent was to provide a status page for the CIs configured
in that directory, but it had the side effect of replacing the top-level
README.md.

4 years agoupstream: restore blocking status on stdio fds before close
djm@openbsd.org [Wed, 19 May 2021 01:24:05 +0000 (01:24 +0000)] 
upstream: restore blocking status on stdio fds before close

ssh(1) needs to set file descriptors to non-blocking mode to operate
but it was not restoring the original state on exit. This could cause
problems with fds shared with other programs via the shell, e.g.

> $ cat > test.sh << _EOF
> #!/bin/sh
> {
>         ssh -Fnone -oLogLevel=verbose ::1 hostname
>         cat /usr/share/dict/words
> } | sleep 10
> _EOF
> $ ./test.sh
> Authenticated to ::1 ([::1]:22).
> Transferred: sent 2352, received 2928 bytes, in 0.1 seconds
> Bytes per second: sent 44338.9, received 55197.4
> cat: stdout: Resource temporarily unavailable

This restores the blocking status for fds 0,1,2 (stdio) before ssh(1)
abandons/closes them.

This was reported as bz3280 and GHPR246; ok dtucker@

OpenBSD-Commit-ID: 8cc67346f05aa85a598bddf2383fcfcc3aae61ce

4 years agoupstream: fix breakage of -W forwaring introduced in 1.554; reported by
djm@openbsd.org [Mon, 17 May 2021 11:43:16 +0000 (11:43 +0000)] 
upstream: fix breakage of -W forwaring introduced in 1.554; reported by

naddy@ and sthen@, ok sthen@

OpenBSD-Commit-ID: f72558e643a26dc4150cff6e5097b5502f6c85fd

4 years agoupstream: Regenerate moduli.
dtucker@openbsd.org [Mon, 17 May 2021 07:22:45 +0000 (07:22 +0000)] 
upstream: Regenerate moduli.

OpenBSD-Commit-ID: 83c93a2a07c584c347ac6114d6329b18ce515557

4 years agoHandle Android libc returning NULL pw->pw_passwd
Damien Miller [Sun, 16 May 2021 23:40:23 +0000 (09:40 +1000)] 
Handle Android libc returning NULL pw->pw_passwd

Reported by Luke Dashjr

4 years agoupstream: fix previous: test saved no_shell_flag, not the one that just
djm@openbsd.org [Fri, 14 May 2021 05:20:32 +0000 (05:20 +0000)] 
upstream: fix previous: test saved no_shell_flag, not the one that just

got clobbered

OpenBSD-Commit-ID: b8deace085d9d941b2d02f810243b9c302e5355d

4 years agoupstream: Fix ssh started with ControlPersist incorrectly executing a
djm@openbsd.org [Fri, 14 May 2021 03:09:48 +0000 (03:09 +0000)] 
upstream: Fix ssh started with ControlPersist incorrectly executing a

shell when the -N (no shell) option was specified. bz3290 reported by Richard
Schwab; patch from markus@ ok me

OpenBSD-Commit-ID: ea1ea4af16a95687302f7690bdbe36a6aabf87e1

4 years agoupstream: Clarify language about moduli. While both ends of the
dtucker@openbsd.org [Wed, 12 May 2021 11:34:30 +0000 (11:34 +0000)] 
upstream: Clarify language about moduli. While both ends of the

connection do need to use the same parameters (ie groups), the DH-GEX
protocol takes care of that and both ends do not need the same contents in
the moduli file, which is what the previous text suggested.  ok djm@ jmc@

OpenBSD-Commit-ID: f0c18cc8e79c2fbf537a432a9070ed94e96a622a

4 years agoupstream: include pid in LogVerbose spam
djm@openbsd.org [Fri, 7 May 2021 04:11:51 +0000 (04:11 +0000)] 
upstream: include pid in LogVerbose spam

OpenBSD-Commit-ID: aacb86f96ee90c7cb84ec27452374285f89a7f00

4 years agoupstream: don't sigdie() in signal handler in privsep child process;
djm@openbsd.org [Fri, 7 May 2021 03:09:38 +0000 (03:09 +0000)] 
upstream: don't sigdie() in signal handler in privsep child process;

this can end up causing sandbox violations per bz3286; ok dtucker@

OpenBSD-Commit-ID: a7f40b2141dca4287920da68ede812bff7ccfdda

4 years agoupstream: Increase ConnectionAttempts from 4 to 10 as the tests
dtucker@openbsd.org [Fri, 7 May 2021 09:23:40 +0000 (09:23 +0000)] 
upstream: Increase ConnectionAttempts from 4 to 10 as the tests

occasionally time out on heavily loaded hosts.

OpenBSD-Regress-ID: 29a8cdef354fc9da471a301f7f65184770434f3a

4 years agoupstream: dump out a usable private key string too; inspired by Tyson
djm@openbsd.org [Fri, 7 May 2021 02:26:55 +0000 (02:26 +0000)] 
upstream: dump out a usable private key string too; inspired by Tyson

Whitehead

OpenBSD-Regress-ID: 65572d5333801cb2f650ebc778cbdc955e372058

4 years agoupstream: correct mistake in spec - the private key blobs are encoded
djm@openbsd.org [Fri, 7 May 2021 02:29:40 +0000 (02:29 +0000)] 
upstream: correct mistake in spec - the private key blobs are encoded

verbatim and not as strings (i.e. no 4-byte length header)

OpenBSD-Commit-ID: 3606b5d443d72118c5b76c4af6dd87a5d5a4f837

4 years agoupstream: Don't pass NULL as a string in debugging as it does not work
dtucker@openbsd.org [Tue, 4 May 2021 22:53:52 +0000 (22:53 +0000)] 
upstream: Don't pass NULL as a string in debugging as it does not work

on some platforms in -portable.  ok djm@

OpenBSD-Commit-ID: 937c892c99aa3c9c272a8ed78fa7c2aba3a44fc9

4 years agoupstream: more debugging for UpdateHostKeys signature failures
djm@openbsd.org [Mon, 3 May 2021 00:16:45 +0000 (00:16 +0000)] 
upstream: more debugging for UpdateHostKeys signature failures

OpenBSD-Commit-ID: 1ee95f03875e1725df15d5e4bea3e73493d57d36

4 years agoAdd obsd69 test target.
Darren Tucker [Sat, 1 May 2021 10:07:47 +0000 (20:07 +1000)] 
Add obsd69 test target.

4 years agoupstream: a little debugging in the main mux process for status
djm@openbsd.org [Fri, 30 Apr 2021 04:29:53 +0000 (04:29 +0000)] 
upstream: a little debugging in the main mux process for status

confirmation failures in multiplexed sessions

OpenBSD-Commit-ID: 6e27b87c95176107597035424e1439c3232bcb49

4 years agoupstream: Remove now-unused skey function prototypes leftover from
dtucker@openbsd.org [Fri, 30 Apr 2021 04:02:52 +0000 (04:02 +0000)] 
upstream: Remove now-unused skey function prototypes leftover from

skey removal.

OpenBSD-Commit-ID: 2fc36d519fd37c6f10ce74854c628561555a94c3

4 years agoWrap sntrup761x25519 inside ifdef.
Darren Tucker [Thu, 29 Apr 2021 03:01:50 +0000 (13:01 +1000)] 
Wrap sntrup761x25519 inside ifdef.

From balu.gajjala at gmail.com via bz#3306.

4 years agoAdd status badges for Actions-based tests.
Darren Tucker [Wed, 28 Apr 2021 04:44:07 +0000 (14:44 +1000)] 
Add status badges for Actions-based tests.

4 years agoAdd obsdsnap (OpenBSD snapshot) test target.
Darren Tucker [Wed, 28 Apr 2021 02:22:11 +0000 (12:22 +1000)] 
Add obsdsnap (OpenBSD snapshot) test target.

4 years agoAdd test building upstream OpenBSD source.
Darren Tucker [Wed, 28 Apr 2021 01:35:28 +0000 (11:35 +1000)] 
Add test building upstream OpenBSD source.

4 years agoTest against OpenSSL 1.1.0h instead of 1.1.0g.
Darren Tucker [Tue, 27 Apr 2021 04:22:20 +0000 (14:22 +1000)] 
Test against OpenSSL 1.1.0h instead of 1.1.0g.

1.1.0g requires a perl glob module that's not installed by default.

4 years agoUse the default VM type for libcrypto ver tests.
Darren Tucker [Tue, 27 Apr 2021 02:37:59 +0000 (12:37 +1000)] 
Use the default VM type for libcrypto ver tests.

4 years agoAlways build OpenSSL shared.
Darren Tucker [Tue, 27 Apr 2021 02:24:10 +0000 (12:24 +1000)] 
Always build OpenSSL shared.

This is the default for current versions but we need it to test against
earlier versions.

4 years agoFix custom OpenSSL tests.
Darren Tucker [Mon, 26 Apr 2021 23:18:02 +0000 (09:18 +1000)] 
Fix custom OpenSSL tests.

Check out specified OpenSSL version.  Install custom libcrypto where
configure expects to find it.  Remove unneeded OpenSSL config time
options.  Older OpenSSL versions were not make -j safe so remove it.

4 years agoExport CC and CFLAGS for c89 test.
Darren Tucker [Mon, 26 Apr 2021 07:18:25 +0000 (17:18 +1000)] 
Export CC and CFLAGS for c89 test.

4 years agoAdd c89 here too.
Darren Tucker [Mon, 26 Apr 2021 07:13:44 +0000 (17:13 +1000)] 
Add c89 here too.

4 years agoAdd test against OpenSSL w/out ECC.
Darren Tucker [Mon, 26 Apr 2021 05:34:23 +0000 (15:34 +1000)] 
Add test against OpenSSL w/out ECC.

4 years agoEnsure we can still build with C89.
Darren Tucker [Mon, 26 Apr 2021 04:49:59 +0000 (14:49 +1000)] 
Ensure we can still build with C89.