]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
6 years agoupstream: Update names of host key files in CLEANFILES to match
dtucker@openbsd.org [Tue, 16 Jul 2019 02:09:29 +0000 (02:09 +0000)] 
upstream: Update names of host key files in CLEANFILES to match

recent changes to the tests.

OpenBSD-Regress-ID: 28743052de3acf70b06f18333561497cd47c4ecf

6 years agodepend
Damien Miller [Tue, 16 Jul 2019 13:26:53 +0000 (23:26 +1000)] 
depend

6 years agoupstream: remove mostly vestigal uuencode.[ch]; moving the only unique
djm@openbsd.org [Tue, 16 Jul 2019 13:18:39 +0000 (13:18 +0000)] 
upstream: remove mostly vestigal uuencode.[ch]; moving the only unique

functionality there (wrapping of base64-encoded data) to sshbuf functions;
feedback and ok markus@

OpenBSD-Commit-ID: 4dba6735d88c57232f6fccec8a08bdcfea44ac4c

6 years agoHook memmem compat code into build.
Darren Tucker [Mon, 15 Jul 2019 23:20:23 +0000 (09:20 +1000)] 
Hook memmem compat code into build.

This fixes builds on platforms that don't have it (at least old DragonFly,
probably others).

6 years agoImport memmem.c from OpenBSD.
Darren Tucker [Mon, 15 Jul 2019 23:07:18 +0000 (09:07 +1000)] 
Import memmem.c from OpenBSD.

6 years agoupstream: unit tests for sshbuf_cmp() and sshbuf_find(); ok markus
djm@openbsd.org [Mon, 15 Jul 2019 13:12:02 +0000 (13:12 +0000)] 
upstream: unit tests for sshbuf_cmp() and sshbuf_find(); ok markus

OpenBSD-Regress-ID: b52d36bc3ab6dc158c1e59a9a4735f821cf9e1fd

6 years agoupstream: support PKCS8 as an optional format for storage of
djm@openbsd.org [Mon, 15 Jul 2019 13:16:29 +0000 (13:16 +0000)] 
upstream: support PKCS8 as an optional format for storage of

private keys, enabled via "ssh-keygen -m PKCS8" on operations that save
private keys to disk.

The OpenSSH native key format remains the default, but PKCS8 is a
superior format to PEM if interoperability with non-OpenSSH software
is required, as it may use a less terrible KDF (IIRC PEM uses a single
round of MD5 as a KDF).

adapted from patch by Jakub Jelen via bz3013; ok markus

OpenBSD-Commit-ID: 027824e3bc0b1c243dc5188504526d73a55accb1

6 years agoupstream: two more bounds-checking sshbuf counterparts to common
djm@openbsd.org [Mon, 15 Jul 2019 13:11:38 +0000 (13:11 +0000)] 
upstream: two more bounds-checking sshbuf counterparts to common

string operations: sshbuf_cmp() (bcmp-like) and sshbuf_find() (memmem like)

feedback and ok markus@

OpenBSD-Commit-ID: fd071ec2485c7198074a168ff363a0d6052a706a

6 years agoClear valgrind-out dir to prevent collisions.
Darren Tucker [Mon, 15 Jul 2019 02:52:45 +0000 (12:52 +1000)] 
Clear valgrind-out dir to prevent collisions.

6 years agoAllow agent tests to write to valgrind dir.
Darren Tucker [Mon, 15 Jul 2019 02:02:27 +0000 (12:02 +1000)] 
Allow agent tests to write to valgrind dir.

6 years agoupstream: unit tests for sshbuf_peek/poke bounds-checked random access
djm@openbsd.org [Sun, 14 Jul 2019 23:33:19 +0000 (23:33 +0000)] 
upstream: unit tests for sshbuf_peek/poke bounds-checked random access

functions. ok markus@

OpenBSD-Regress-ID: 034c4284b1da6b12e25c762a6b958efacdafbaef

6 years agoupstream: add some functions to perform random-access read/write
djm@openbsd.org [Sun, 14 Jul 2019 23:32:27 +0000 (23:32 +0000)] 
upstream: add some functions to perform random-access read/write

operations inside buffers with bounds checking. Intended to replace manual
pointer arithmetic wherever possible.

feedback and ok markus@

OpenBSD-Commit-ID: 91771fde7732738f1ffed078aa5d3bee6d198409

6 years agoupstream: include SHA2-variant RSA key algorithms in KEX proposal;
djm@openbsd.org [Fri, 12 Jul 2019 04:08:39 +0000 (04:08 +0000)] 
upstream: include SHA2-variant RSA key algorithms in KEX proposal;

allows ssh-keyscan to harvest keys from servers that disable olde SHA1
ssh-rsa. bz#3029 from Jakub Jelen

OpenBSD-Commit-ID: 9f95ebf76a150c2f727ca4780fb2599d50bbab7a

6 years agoupstream: print explicit "not modified" message if a file was
djm@openbsd.org [Fri, 12 Jul 2019 03:56:21 +0000 (03:56 +0000)] 
upstream: print explicit "not modified" message if a file was

requested for resumed download but was considered already complete.

bz#2978 ok dtucker

OpenBSD-Commit-ID: f32084b26a662f16215ee4ca4a403d67e49ab986

6 years agoupstream: Fix a typo and make <esc><right> move right to the
tb@openbsd.org [Wed, 10 Jul 2019 07:04:27 +0000 (07:04 +0000)] 
upstream: Fix a typo and make <esc><right> move right to the

closest end of a word just like <esc><left> moves left to the closest
beginning of a word.

ok djm

OpenBSD-Commit-ID: 6afe01b05ed52d8b12eb1fda6e9af5afb5e198ee

6 years agofix typo that prevented detection of Linux VRF
Damien Miller [Tue, 9 Jul 2019 23:43:19 +0000 (09:43 +1000)] 
fix typo that prevented detection of Linux VRF

Reported by hexiaowen AT huawei.com

6 years agoupstream: cap the number of permiopen/permitlisten directives we're
djm@openbsd.org [Tue, 9 Jul 2019 04:15:00 +0000 (04:15 +0000)] 
upstream: cap the number of permiopen/permitlisten directives we're

willing to parse on a single authorized_keys line; ok deraadt@

OpenBSD-Commit-ID: a43a752c2555d26aa3fc754805a476f6e3e30f46

6 years agoMove log.h include inside ifdefs.
Darren Tucker [Mon, 8 Jul 2019 07:27:26 +0000 (17:27 +1000)] 
Move log.h include inside ifdefs.

Fixes build on some other platforms that don't have va_list immediately
available (eg NetBSD).

6 years agoInclude log.h for debug() and friends.
Darren Tucker [Sat, 6 Jul 2019 13:07:04 +0000 (23:07 +1000)] 
Include log.h for debug() and friends.

Should fix some compiler warnings on IRIX (bz#3032).

6 years agosftp-realpath.c needs includes.h
Damien Miller [Mon, 8 Jul 2019 03:44:32 +0000 (13:44 +1000)] 
sftp-realpath.c needs includes.h

6 years agoremove realpath() compat replacement
Damien Miller [Mon, 8 Jul 2019 03:38:39 +0000 (13:38 +1000)] 
remove realpath() compat replacement

We shipped a BSD implementation of realpath() because sftp-server
depended on its behaviour.

OpenBSD is now moving to a more strictly POSIX-compliant realpath(2),
so sftp-server now unconditionally requires its own BSD-style realpath
implementation. As such, there is no need to carry another independant
implementation in openbsd-compat.

ok dtucker@

6 years agoupstream: Remove some set but never used variables. ok daraadt@
dtucker@openbsd.org [Sun, 7 Jul 2019 01:05:00 +0000 (01:05 +0000)] 
upstream: Remove some set but never used variables. ok daraadt@

OpenBSD-Commit-ID: 824baf9c59afc66a4637017e397b9b74a41684e7

6 years agoupstream: still compile uuencode.c, unbreaks build
deraadt@openbsd.org [Fri, 5 Jul 2019 12:35:40 +0000 (12:35 +0000)] 
upstream: still compile uuencode.c, unbreaks build

OpenBSD-Commit-ID: 5ea3d63ab972691f43e9087ab5fd8376d48e898f

6 years agoupstream: revert header removal that snuck into previous
djm@openbsd.org [Fri, 5 Jul 2019 07:32:01 +0000 (07:32 +0000)] 
upstream: revert header removal that snuck into previous

OpenBSD-Commit-ID: 3919cdd58989786660b8269b325646ef8856428e

6 years agoupstream: add a local implementation of BSD realpath() for
djm@openbsd.org [Fri, 5 Jul 2019 04:55:40 +0000 (04:55 +0000)] 
upstream: add a local implementation of BSD realpath() for

sftp-server use ahead of OpenBSD's realpath changing to match POSIX;

ok deraadt@ (thanks for snaps testing)

OpenBSD-Commit-ID: 4f8cbf7ed8679f6237264301d104ecec64885d55

6 years agoAdd prototype for strnlen to prevent warnings.
Darren Tucker [Sat, 6 Jul 2019 03:13:57 +0000 (13:13 +1000)] 
Add prototype for strnlen to prevent warnings.

6 years agoCast *ID types to unsigned long when printing.
Darren Tucker [Sat, 6 Jul 2019 03:02:34 +0000 (13:02 +1000)] 
Cast *ID types to unsigned long when printing.

UID and GID types vary by platform so cast to u_long and use %lu when
printing them to prevent warnings.

6 years agoAdd prototype for compat strndup.(bz#3032).
Darren Tucker [Sat, 6 Jul 2019 02:54:43 +0000 (12:54 +1000)] 
Add prototype for compat strndup.(bz#3032).

6 years agoAdd missing bracket in EGD seeding code.
Darren Tucker [Sat, 6 Jul 2019 02:00:41 +0000 (12:00 +1000)] 
Add missing bracket in EGD seeding code.

When configured --with-prngd-socket the code had a missing bracket after
an API change.  Fix that and a couple of warnings.  bz#3032 , from
ole.weidner at protonmail.ch

6 years agoupstream: Add (recently added) rsa_oldfmt to CLEANFILES.
dtucker@openbsd.org [Fri, 5 Jul 2019 04:19:39 +0000 (04:19 +0000)] 
upstream: Add (recently added) rsa_oldfmt to CLEANFILES.

OpenBSD-Regress-ID: 405beda94e32aa6cc9c80969152fab91f7c54bd3

6 years agoupstream: Adapt the PuTTY/Conch tests to new key names.
dtucker@openbsd.org [Fri, 5 Jul 2019 04:12:46 +0000 (04:12 +0000)] 
upstream: Adapt the PuTTY/Conch tests to new key names.

A recent regress change (2a9b3a2ce411d16cda9c79ab713c55f65b0ec257 in
portable) broke the PuTTY and Twisted Conch interop tests, because the
key they want to use is now called ssh-rsa rather than rsa.  Adapt the
tests to the new file names.  bz#3020, patch from cjwatson at debian.org.

OpenBSD-Regress-ID: fd342a37db4d55aa4ec85316f73082c8eb96e64e

6 years agoupstream: Add a sleep to allow forwards to come up.
dtucker@openbsd.org [Fri, 5 Jul 2019 04:03:13 +0000 (04:03 +0000)] 
upstream: Add a sleep to allow forwards to come up.

Currently when the multiplex client requests a forward it returns
once the request has been sent but not necessarily when the forward
is up.  This causes intermittent text failures due to this race,
so add some sleeps to mitigate this until we can fix it properly.

OpenBSD-Regress-ID: 384c7d209d2443d25ea941d7f677e932621fb253

6 years agoRemove nc stderr redirection to resync w/OpenBSD.
Darren Tucker [Fri, 5 Jul 2019 04:58:57 +0000 (14:58 +1000)] 
Remove nc stderr redirection to resync w/OpenBSD.

6 years agoDo not fatal on failed lookup of group "tty".
Darren Tucker [Fri, 5 Jul 2019 03:21:45 +0000 (13:21 +1000)] 
Do not fatal on failed lookup of group "tty".

Some platforms (eg AIX and Cygwin) do not have a "tty" group.  In those
cases we will fall back to making the tty device the user's primary
group, so do not fatal if the group lookup fails.  ok djm@

6 years agoupstream: fatal() if getgrnam() cannot find "tty"
deraadt@openbsd.org [Thu, 4 Jul 2019 16:20:10 +0000 (16:20 +0000)] 
upstream: fatal() if getgrnam() cannot find "tty"

OpenBSD-Commit-ID: d148c1c052fa0ed7d105b5428b5c1bab91630048

6 years agoupstream: stat() returns precisely -1 to indicate error
deraadt@openbsd.org [Thu, 4 Jul 2019 16:16:51 +0000 (16:16 +0000)] 
upstream: stat() returns precisely -1 to indicate error

OpenBSD-Commit-ID: 668e8d022ed4ab847747214f64119e5865365fa1

6 years agoupstream: snprintf/vsnprintf return < 0 on error, rather than -1.
deraadt@openbsd.org [Wed, 3 Jul 2019 03:24:02 +0000 (03:24 +0000)] 
upstream: snprintf/vsnprintf return < 0 on error, rather than -1.

OpenBSD-Commit-ID: a261c421140a0639bb2b66bbceca72bf8239749d

6 years agoupstream: When system calls indicate an error they return -1, not
deraadt@openbsd.org [Fri, 28 Jun 2019 13:35:04 +0000 (13:35 +0000)] 
upstream: When system calls indicate an error they return -1, not

some arbitrary value < 0.  errno is only updated in this case.  Change all
(most?) callers of syscalls to follow this better, and let's see if this
strictness helps us in the future.

OpenBSD-Commit-ID: 48081f00db7518e3b712a49dca06efc2a5428075

6 years agoupstream: asprintf returns -1, not an arbitrary value < 0. Also
deraadt@openbsd.org [Fri, 28 Jun 2019 05:44:09 +0000 (05:44 +0000)] 
upstream: asprintf returns -1, not an arbitrary value < 0. Also

upon error the (very sloppy specification) leaves an undefined value in *ret,
so it is wrong to inspect it, the error condition is enough. discussed a
little with nicm, and then much more with millert until we were exasperated

OpenBSD-Commit-ID: 29258fa51edf8115d244b9d4b84028487bf8923e

6 years agoupstream: oops, from asou
deraadt@openbsd.org [Fri, 28 Jun 2019 01:23:50 +0000 (01:23 +0000)] 
upstream: oops, from asou

OpenBSD-Commit-ID: 702e765d1639b732370d8f003bb84a1c71c4d0c6

6 years agoupstream: Some asprintf() calls were checked < 0, rather than the
deraadt@openbsd.org [Thu, 27 Jun 2019 18:03:37 +0000 (18:03 +0000)] 
upstream: Some asprintf() calls were checked < 0, rather than the

precise == -1. ok millert nicm tb, etc

OpenBSD-Commit-ID: caecf8f57938685c04f125515b9f2806ad408d53

6 years agoupstream: fix NULL deference (bzero) on err
djm@openbsd.org [Thu, 27 Jun 2019 06:29:35 +0000 (06:29 +0000)] 
upstream: fix NULL deference (bzero) on err

=?UTF-8?q?or=20path=20added=20in=20last=20commit;=20spotted=20by=20Reynir?=
=?UTF-8?q?=20Bj=C3=B6rnsson?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

ok deraadt@ markus@ tb@

OpenBSD-Commit-ID: b11b084bcc551b2c630560eb08618dd501027bbd

6 years agoUpdate README doc to include missing test cases
Jitendra Sharma [Fri, 21 Jun 2019 04:24:17 +0000 (09:54 +0530)] 
Update README doc to include missing test cases

Readme regress document is missing various individual tests,
which are supported currently. Update README to
include those test cases.

6 years agoupstream: Remove unneeded unlink of xauthfile o
dtucker@openbsd.org [Wed, 26 Jun 2019 22:29:43 +0000 (22:29 +0000)] 
upstream: Remove unneeded unlink of xauthfile o

=?UTF-8?q?n=20error=20path.=20=20From=20Erik=20Sj=C3=B6lund=20via=20githu?=
=?UTF-8?q?b,=20ok=20djm@=20deraadt@?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

OpenBSD-Commit-ID: 62a4893cf83b29a4bbfedc40e7067c25c203e632

6 years agoupstream: fix mismatch proto/decl from key shielding change; spotted
djm@openbsd.org [Sun, 23 Jun 2019 12:21:46 +0000 (12:21 +0000)] 
upstream: fix mismatch proto/decl from key shielding change; spotted

via oss-fuzz

OpenBSD-Commit-ID: 1ea0ba05ded2c5557507bd844cd446e5c8b5b3b7

6 years agoupstream: adapt for key shielding API changes (const removal)
djm@openbsd.org [Fri, 21 Jun 2019 04:21:45 +0000 (04:21 +0000)] 
upstream: adapt for key shielding API changes (const removal)

OpenBSD-Regress-ID: 298890bc52f0cd09dba76dc1022fabe89bc0ded6

6 years agoupstream: Add protection for private keys at rest in RAM against
djm@openbsd.org [Fri, 21 Jun 2019 04:21:04 +0000 (04:21 +0000)] 
upstream: Add protection for private keys at rest in RAM against

speculation and memory sidechannel attacks like Spectre, Meltdown, Rowhammer
and Rambleed. This change encrypts private keys when they are not in use with
a symmetic key that is derived from a relatively large "prekey" consisting of
random data (currently 16KB).

Attackers must recover the entire prekey with high accuracy before
they can attempt to decrypt the shielded private key, but the current
generation of attacks have bit error rates that, when applied
cumulatively to the entire prekey, make this unlikely.

Implementation-wise, keys are encrypted "shielded" when loaded and then
automatically and transparently unshielded when used for signatures or
when being saved/serialised.

Hopefully we can remove this in a few years time when computer
architecture has become less unsafe.

been in snaps for a bit already; thanks deraadt@

ok dtucker@ deraadt@

OpenBSD-Commit-ID: 19767213c312e46f94b303a512ef8e9218a39bd4

6 years agoupstream: print the correct AuthorizedPrincipalsCommand rather than
djm@openbsd.org [Fri, 21 Jun 2019 03:19:59 +0000 (03:19 +0000)] 
upstream: print the correct AuthorizedPrincipalsCommand rather than

an uninitialised variable; spotted by dtucker@

OpenBSD-Commit-ID: 02802018784250f68202f01c8561de82e17b0638

6 years agoupstream: from tim: - for reput, it is remote-path which is
jmc@openbsd.org [Wed, 19 Jun 2019 20:12:44 +0000 (20:12 +0000)] 
upstream: from tim: - for reput, it is remote-path which is

optional, not local-path - sync help

from deraadt:
- prefer -R and undocument -r (but add a comment for future editors)

from schwarze:
- prefer -p and undocument -P (as above. the comment was schwarze's too)

more:
- add the -f flag to reput and reget
- sort help (i can;t remember who suggested this originally)

djm and deraadt were ok with earlier versions of this;
tim and schwarze ok

OpenBSD-Commit-ID: 3c699b53b46111f5c57eed4533f132e7e58bacdd

6 years agoupstream: check for convtime() refusing to accept times that
djm@openbsd.org [Fri, 14 Jun 2019 04:03:48 +0000 (04:03 +0000)] 
upstream: check for convtime() refusing to accept times that

resolve to LONG_MAX Reported by Kirk Wolf bz2977; ok dtucker

OpenBSD-Regress-ID: 15c9fe87be1ec241d24707006a31123d3a3117e0

6 years agoupstream: Add unit tests for user@host and URI parsing.
dtucker@openbsd.org [Sun, 28 Apr 2019 22:53:26 +0000 (22:53 +0000)] 
upstream: Add unit tests for user@host and URI parsing.

OpenBSD-Regress-ID: 69d5b6f278e04ed32377046f7692c714c2d07a68

6 years agoupstream: Add tests for sshd -T -C with Match.
dtucker@openbsd.org [Thu, 18 Apr 2019 18:57:16 +0000 (18:57 +0000)] 
upstream: Add tests for sshd -T -C with Match.

OpenBSD-Regress-ID: d4c34916fe20d717692f10ef50b5ae5a271c12c7

6 years agoInclude stdio.h for vsnprintf.
Darren Tucker [Sun, 16 Jun 2019 02:55:27 +0000 (12:55 +1000)] 
Include stdio.h for vsnprintf.

Patch from mforney at mforney.org.

6 years agoupstream rev 1.27: fix integer overflow.
Darren Tucker [Fri, 7 Jun 2019 23:07:04 +0000 (09:07 +1000)] 
upstream rev 1.27: fix integer overflow.

Cast bitcount to u_in64_t before bit shifting to prevent integer overflow
on 32bit platforms which cause incorrect results when adding a block
>=512M in size.  sha1 patch from ante84 at gmail.com via openssh github,
sha2 with djm@, ok tedu@

6 years agoupstream rev 1.25: add DEF_WEAK.
Darren Tucker [Fri, 7 Jun 2019 23:06:06 +0000 (09:06 +1000)] 
upstream rev 1.25: add DEF_WEAK.

Wrap blowfish, sha*, md5, and rmd160 so that internal calls go direct
ok deraadt@

6 years agoupstream rev 1.25: add sys/types.h
Darren Tucker [Fri, 7 Jun 2019 23:02:24 +0000 (09:02 +1000)] 
upstream rev 1.25: add sys/types.h

6 years agoupstream: Use explicit_bzero instead of memset
Darren Tucker [Fri, 7 Jun 2019 23:01:14 +0000 (09:01 +1000)] 
upstream: Use explicit_bzero instead of memset

in hash Final and End functions.  OK deraadt@ djm@

6 years agoupstream: slightly more instructive error message when the user
djm@openbsd.org [Fri, 14 Jun 2019 04:13:58 +0000 (04:13 +0000)] 
upstream: slightly more instructive error message when the user

specifies multiple -J options on the commandline. bz3015 ok dtucker@

OpenBSD-Commit-ID: 181c15a65cac3b575819bc8d9a56212c3c748179

6 years agoupstream: process agent requests for RSA certificate private keys using
djm@openbsd.org [Fri, 14 Jun 2019 03:51:47 +0000 (03:51 +0000)] 
upstream: process agent requests for RSA certificate private keys using

correct signature algorithm when requested. Patch from Jakub Jelen in bz3016
ok dtucker markus

OpenBSD-Commit-ID: 61f86efbeb4a1857a3e91298c1ccc6cf49b79624

6 years agoupstream: for public key authentication, check AuthorizedKeysFiles
djm@openbsd.org [Fri, 14 Jun 2019 03:39:59 +0000 (03:39 +0000)] 
upstream: for public key authentication, check AuthorizedKeysFiles

files before consulting AuthorizedKeysCommand; ok dtucker markus

OpenBSD-Commit-ID: 13652998bea5cb93668999c39c3c48e8429db8b3

6 years agoupstream: if passed a bad fd, log what it was
djm@openbsd.org [Fri, 14 Jun 2019 03:28:19 +0000 (03:28 +0000)] 
upstream: if passed a bad fd, log what it was

OpenBSD-Commit-ID: 582e2bd05854e49365195b58989b68ac67f09140

6 years agoupstream: Hostname->HostName cleanup; from lauri tirkkonen ok
jmc@openbsd.org [Wed, 12 Jun 2019 11:31:50 +0000 (11:31 +0000)] 
upstream: Hostname->HostName cleanup; from lauri tirkkonen ok

dtucker

OpenBSD-Commit-ID: 4ade73629ede63b691f36f9a929f943d4e7a44e4

6 years agoupstream: deraadt noticed some inconsistency in the way we denote
jmc@openbsd.org [Wed, 12 Jun 2019 05:53:21 +0000 (05:53 +0000)] 
upstream: deraadt noticed some inconsistency in the way we denote

the "Hostname" and "X11UseLocalhost" keywords; this makes things consistent
(effectively reversing my commit of yesterday);

ok deraadt markus djm

OpenBSD-Commit-ID: 255c02adb29186ac91dcf47dfad7adb1b1e54667

6 years agoupstream: consistent lettering for "HostName" keyword; from lauri
jmc@openbsd.org [Tue, 11 Jun 2019 13:39:40 +0000 (13:39 +0000)] 
upstream: consistent lettering for "HostName" keyword; from lauri

tirkkonen

OpenBSD-Commit-ID: 0c267a1257ed7482b13ef550837b6496e657d563

7 years agoTypo fixes in error messages.
Darren Tucker [Fri, 7 Jun 2019 14:10:59 +0000 (00:10 +1000)] 
Typo fixes in error messages.

Patch from knweiss at gmail.com via github pull req #97 (portable-
specific parts).

7 years agoupstream: Typo and spelling fixes in comments and error messages.
dtucker@openbsd.org [Fri, 7 Jun 2019 14:18:48 +0000 (14:18 +0000)] 
upstream: Typo and spelling fixes in comments and error messages.

Patch from knweiss at gmail.com via -portable.

OpenBSD-Commit-ID: 2577465442f761a39703762c4f87a8dfcb918b4b

7 years agoInclude missed bits from previous sync.
Darren Tucker [Fri, 7 Jun 2019 14:47:07 +0000 (00:47 +1000)] 
Include missed bits from previous sync.

7 years agoupstream: Check for user@host when parsing sftp target. This
dtucker@openbsd.org [Fri, 7 Jun 2019 03:47:12 +0000 (03:47 +0000)] 
upstream: Check for user@host when parsing sftp target. This

allows user@[1.2.3.4] to work without a path in addition to with one.
bz#2999, ok djm@

OpenBSD-Commit-ID: d989217110932490ba8ce92127a9a6838878928b

7 years agoupstream: Replace calls to ssh_malloc_init() by a static init of
otto@openbsd.org [Thu, 6 Jun 2019 05:13:13 +0000 (05:13 +0000)] 
upstream: Replace calls to ssh_malloc_init() by a static init of

malloc_options. Prepares for changes in the way malloc is initialized.  ok
guenther@ dtucker@

OpenBSD-Commit-ID: 154f4e3e174f614b09f792d4d06575e08de58a6b

7 years agoupstream: fix ssh-keysign fd handling problem introduced in r1.304
djm@openbsd.org [Fri, 31 May 2019 03:20:07 +0000 (03:20 +0000)] 
upstream: fix ssh-keysign fd handling problem introduced in r1.304

caused by a typo (STDIN_FILENO vs STDERR_FILENO)

OpenBSD-Commit-ID: 57a0b4be7bef23963afe24150e24bf014fdd9cb0

7 years agoupstream: Make the standard output messages of both methods of
lum@openbsd.org [Wed, 29 May 2019 08:30:26 +0000 (08:30 +0000)] 
upstream: Make the standard output messages of both methods of

changing a key pair's comments (using -c and -C) more applicable to both
methods. ok and suggestions djm@ dtucker@

OpenBSD-Commit-ID: b379338118109eb36e14a65bc0a12735205b3de6

7 years agoAlways clean up before and after utimensat test.
Darren Tucker [Fri, 7 Jun 2019 14:03:07 +0000 (00:03 +1000)] 
Always clean up before and after utimensat test.

7 years agoUpdate utimensat test.
Darren Tucker [Fri, 7 Jun 2019 13:47:37 +0000 (23:47 +1000)] 
Update utimensat test.

POSIX specifies that when given a symlink, AT_SYMLINK_NOFOLLOW should
update the symlink and not the destination.  The compat code doesn't
have a way to do this, so where possible it fails instead of following a
symlink when explicitly asked not to. Instead of checking for an explicit
failure, check that it does not update the destination, which both the
real and compat implmentations should honour.

Inspired by github pull req #125 from chutzpah at gentoo.org.

7 years agoHave pthread_create return errno on failure.
Darren Tucker [Fri, 7 Jun 2019 04:26:54 +0000 (14:26 +1000)] 
Have pthread_create return errno on failure.

According to POSIX, pthread_create returns the failure reason in
the non-zero function return code so make the fork wrapper do that.
Matches previous change.

7 years agopthread_create(3) returns positive values on failure.
Elliott Hughes [Thu, 25 Apr 2019 20:36:27 +0000 (13:36 -0700)] 
pthread_create(3) returns positive values on failure.

Found by inspection after finding similar bugs in other code used by
Android.

7 years agoallow s390 specific ioctl for ecc hardware support
Harald Freudenberger [Fri, 24 May 2019 08:11:15 +0000 (10:11 +0200)] 
allow s390 specific ioctl for ecc hardware support

Adding another s390 specific ioctl to be able to support ECC hardware
acceleration to the sandbox seccomp filter rules.

Now the ibmca openssl engine provides elliptic curve cryptography
support with the help of libica and CCA crypto cards. This is done via
jet another ioctl call to the zcrypt device driver and so there is a
need to enable this on the openssl sandbox.

Code is s390 specific and has been tested, verified and reviewed.

Please note that I am also the originator of the previous changes in
that area.  I posted these changes to Eduardo and he forwarded the
patches to the openssl community.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Joerg Schmidbauer <jschmidb@de.ibm.com>
7 years agoopenssl-devel is obsoleted by libssl-devel
Sorin Adrian Savu [Sun, 26 May 2019 18:50:08 +0000 (21:50 +0300)] 
openssl-devel is obsoleted by libssl-devel

openssl-devel is no longer installable via the cygwin setup and
it's hidden by default, so you can't see the replacement very easy.

7 years agoupstream: tweak previous;
jmc@openbsd.org [Mon, 20 May 2019 06:01:59 +0000 (06:01 +0000)] 
upstream: tweak previous;

OpenBSD-Commit-ID: 42f39f22f53cfcb913bce401ae0f1bb93e08dd6c

7 years agoupstream: embiggen format buffer size for certificate serial number so
djm@openbsd.org [Mon, 20 May 2019 00:25:55 +0000 (00:25 +0000)] 
upstream: embiggen format buffer size for certificate serial number so

that it will fit a full 64 bit integer. bz#3012 from Manoel Domingues Junior

OpenBSD-Commit-ID: a51f3013056d05b976e5af6b978dcb9e27bbc12b

7 years agoupstream: When signing certificates with an RSA key, default to
djm@openbsd.org [Mon, 20 May 2019 00:20:35 +0000 (00:20 +0000)] 
upstream: When signing certificates with an RSA key, default to

using the rsa-sha2-512 signature algorithm. Certificates signed by RSA keys
will therefore be incompatible with OpenSSH < 7.2 unless the default is
overridden.

Document the ability of the ssh-keygen -t flag to override the
signature algorithm when signing certificates, and the new default.

ok deraadt@

OpenBSD-Commit-ID: 400c9c15013978204c2cb80f294b03ae4cfc8b95

7 years agoAdd no-op implementation of pam_putenv.
Darren Tucker [Fri, 17 May 2019 03:14:12 +0000 (13:14 +1000)] 
Add no-op implementation of pam_putenv.

Some platforms such as HP-UX do not have pam_putenv.  Currently the
calls are ifdef'ed out, but a new one was recently added.  Remove the
ifdefs and add a no-op implementation.  bz#3008, ok djm.

7 years agoUse the correct macro for SSH_ALLOWED_CA_SIGALGS.
Darren Tucker [Fri, 17 May 2019 02:42:17 +0000 (12:42 +1000)] 
Use the correct macro for SSH_ALLOWED_CA_SIGALGS.

7 years agoFix building w/out ECC.
Darren Tucker [Fri, 17 May 2019 00:54:51 +0000 (10:54 +1000)] 
Fix building w/out ECC.

Ifdef out ECC specific code so that that it'll build against an OpenSSL
configured w/out ECC.  With & ok djm@

7 years agoConditionalize ECDH methods in CA algos.
Darren Tucker [Fri, 17 May 2019 00:50:29 +0000 (10:50 +1000)] 
Conditionalize ECDH methods in CA algos.

When building against an OpenSSL configured without ECC, don't include
those algos in CASignatureAlgorithms.  ok djm@

7 years agoupstream: Move a variable declaration to the block where it's used
dtucker@openbsd.org [Thu, 16 May 2019 08:47:27 +0000 (08:47 +0000)] 
upstream: Move a variable declaration to the block where it's used

to make things a little tidier for -portable.

OpenBSD-Commit-ID: 616379861be95619e5358768b7dee4793e2f3a75

7 years agoupstream: When doing the fork+exec'ing for ssh-keysign, rearrange
deraadt@openbsd.org [Wed, 15 May 2019 04:43:31 +0000 (04:43 +0000)] 
upstream: When doing the fork+exec'ing for ssh-keysign, rearrange

the socket into fd3, so as to not mistakenly leak other fd forward
accidentally. ok djm

OpenBSD-Commit-ID: 24cc753f5aa2c6a7d0fbf62766adbc75cd785296

7 years agoupstream: Delete some .Sx macros that were used in a wrong way.
schwarze@openbsd.org [Tue, 14 May 2019 12:47:17 +0000 (12:47 +0000)] 
upstream: Delete some .Sx macros that were used in a wrong way.

Part of a patch from Stephen Gregoratto <dev at sgregoratto dot me>.

OpenBSD-Commit-ID: 15501ed13c595f135e7610b1a5d8345ccdb513b7

7 years agoupstream: For PermitOpen violations add the remote host and port to
florian@openbsd.org [Fri, 10 May 2019 18:55:17 +0000 (18:55 +0000)] 
upstream: For PermitOpen violations add the remote host and port to

be able to find out from where the request was comming.

Add the same logging for PermitListen violations which where not
logged at all.

Pointed out by Robert Kisteleki (robert AT ripe.net)

input markus
OK deraadt

OpenBSD-Commit-ID: 8a7d0f1b7175504c0d1dca8d9aca1588b66448c8

7 years agoAdd OpenSSL 1.1.1 to the supported list.
Darren Tucker [Wed, 15 May 2019 21:53:20 +0000 (07:53 +1000)] 
Add OpenSSL 1.1.1 to the supported list.

Clarify the language around prngd and egd.

7 years agoFix typo in man page formatter selector.
Darren Tucker [Wed, 15 May 2019 06:19:14 +0000 (16:19 +1000)] 
Fix typo in man page formatter selector.

7 years agoUse "doc" man page format if mandoc present.
Darren Tucker [Fri, 10 May 2019 05:04:42 +0000 (15:04 +1000)] 
Use "doc" man page format if mandoc present.

Previously configure would not select the "doc" man page format if
mandoc was present but nroff was not.  This checks for mandoc first
and removes a now-superflous AC_PATH_PROG.  Based on a patch from
vehk at vehk.de and feedback from schwarze at usta.de.

7 years agoupstream: Use the correct (according to POSIX) format for
dtucker@openbsd.org [Fri, 3 May 2019 06:06:30 +0000 (06:06 +0000)] 
upstream: Use the correct (according to POSIX) format for

left-justification in snmprintf. bz#3002, patch from velemas at gmail.com, ok
markus@.

OpenBSD-Commit-ID: 65d252b799be0cc8f68b6c47cece0a57bb00fea7

7 years agoupstream: Free channel objects on exit path. Patch from markus at
dtucker@openbsd.org [Fri, 3 May 2019 04:11:00 +0000 (04:11 +0000)] 
upstream: Free channel objects on exit path. Patch from markus at

blueflash.cc, ok deraadt

OpenBSD-Commit-ID: dbe4db381603909482211ffdd2b48abd72169117

7 years agoupstream: Free host on exit path. Patch from markus at
dtucker@openbsd.org [Fri, 3 May 2019 03:27:38 +0000 (03:27 +0000)] 
upstream: Free host on exit path. Patch from markus at

blueflash.cc, ok djm@

OpenBSD-Commit-ID: c54e9945d93c4ce28350d8b9fa8b71f744ef2b5a

7 years agoupstream: Wrap XMSS including in ifdef. Patch from markus at
dtucker@openbsd.org [Fri, 3 May 2019 03:25:18 +0000 (03:25 +0000)] 
upstream: Wrap XMSS including in ifdef. Patch from markus at

blueflash.cc, ok djm

OpenBSD-Commit-ID: e3b34fc35cf12d33bde91ac03633210a3bc0f8b5

7 years agoupstream: Import regenerated moduli.
dtucker@openbsd.org [Fri, 26 Apr 2019 08:37:17 +0000 (08:37 +0000)] 
upstream: Import regenerated moduli.

OpenBSD-Commit-ID: db6375fc302e3bdf07d96430c63c991b2c2bd3ff

7 years agoupstream: Use the LogLevel typdef instead of int where appropriate. Patch from Markus...
dtucker@openbsd.org [Tue, 23 Apr 2019 11:56:41 +0000 (11:56 +0000)] 
upstream: Use the LogLevel typdef instead of int where appropriate. Patch from Markus Schmidt via openssh-unix-dev, ok markus@

OpenBSD-Commit-ID: 4c0f0f458e3da7807806b35e3eb5c1e8403c968a

7 years agoupstream: Document new default RSA key size. From
dtucker@openbsd.org [Fri, 19 Apr 2019 05:47:44 +0000 (05:47 +0000)] 
upstream: Document new default RSA key size. From

sebastiaanlokhorst at gmail.com via bz#2997.

OpenBSD-Commit-ID: bdd62ff5d4d649d2147904e91bf7cefa82fe11e1

7 years agoupstream: When running sshd -T, assume any attibute not provided by
dtucker@openbsd.org [Thu, 18 Apr 2019 18:56:16 +0000 (18:56 +0000)] 
upstream: When running sshd -T, assume any attibute not provided by

-C does not match, which allows it to work when sshd_config contains a Match
directive with or without -C.  bz#2858, ok djm@

OpenBSD-Commit-ID: 1a701f0a33e3bc96753cfda2fe0b0378520b82eb

7 years agoupstream: Remove crc32.{c,h} which were only used by the now-gone
dtucker@openbsd.org [Thu, 18 Apr 2019 07:32:56 +0000 (07:32 +0000)] 
upstream: Remove crc32.{c,h} which were only used by the now-gone

SSH1 protocol. Patch from yumkam at gmail.com, ok deraadt.

OpenBSD-Commit-ID: cceda5876c5ba6b4d8abcd52335329198cee3240