]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
6 years agoshorten temporary SSH_REGRESS_TMP path V_7_8 288/head anongit/V_7_8 github-selfhosted/V_7_8 github/V_7_8 V_7_8_P1
Damien Miller [Thu, 23 Aug 2018 05:41:42 +0000 (15:41 +1000)] 
shorten temporary SSH_REGRESS_TMP path

Previous path was exceeding max socket length on at least one platform (OSX)

6 years agorebuild dependencies
Damien Miller [Thu, 23 Aug 2018 03:06:02 +0000 (13:06 +1000)] 
rebuild dependencies

6 years agofix path in distclean target
Damien Miller [Thu, 23 Aug 2018 03:03:32 +0000 (13:03 +1000)] 
fix path in distclean target

Patch from Jakub Jelen

6 years agoupstream: memleak introduced in r1.83; from Colin Watson
djm@openbsd.org [Thu, 23 Aug 2018 03:01:08 +0000 (03:01 +0000)] 
upstream: memleak introduced in r1.83; from Colin Watson

OpenBSD-Commit-ID: 5c019104c280cbd549a264a7217b67665e5732dc

6 years agoupstream: AIX reports the CODESET as "ISO8859-1" in the POSIX locale.
schwarze@openbsd.org [Tue, 21 Aug 2018 13:56:27 +0000 (13:56 +0000)] 
upstream: AIX reports the CODESET as "ISO8859-1" in the POSIX locale.

Treating that as a safe encoding is OK because even when other systems return
that string for real ISO8859-1, it is still safe in the sense that it is
ASCII-compatible and stateless.

Issue reported by Val dot Baranov at duke dot edu.  Additional
information provided by Michael dot Felt at felt dot demon dot nl.
Tested by Michael Felt on AIX 6.1 and by Val Baranov on AIX 7.1.
Tweak and OK djm@.

OpenBSD-Commit-ID: 36f1210e0b229817d10eb490d6038f507b8256a7

6 years ago modified: openbsd-compat/port-uw.c
Tim Rice [Tue, 21 Aug 2018 15:57:24 +0000 (08:57 -0700)] 
modified:   openbsd-compat/port-uw.c
remove obsolete and un-needed include

6 years agoMissing unistd.h for regress/mkdtemp.c
Damien Miller [Mon, 20 Aug 2018 05:57:29 +0000 (15:57 +1000)] 
Missing unistd.h for regress/mkdtemp.c

7 years agoupdate version numbers in anticipation of release
Damien Miller [Thu, 16 Aug 2018 19:45:20 +0000 (05:45 +1000)] 
update version numbers in anticipation of release

7 years agoconfigure: work around GCC shortcoming on Cygwin
Corinna Vinschen [Mon, 13 Aug 2018 15:08:51 +0000 (17:08 +0200)] 
configure: work around GCC shortcoming on Cygwin

Cygwin's latest 7.x GCC allows to specify -mfunction-return=thunk
as well as -mindirect-branch=thunk on the command line, albeit
producing invalid code, leading to an error at link stage.

The check in configure.ac only checks if the option is present,
but not if it produces valid code.

This patch fixes it by special-casing Cygwin.  Another solution
may be to change these to linker checks.

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
7 years agocygwin: add missing stdarg.h include
Corinna Vinschen [Mon, 13 Aug 2018 15:05:05 +0000 (17:05 +0200)] 
cygwin: add missing stdarg.h include

Further header file standarization in Cygwin uncovered a lazy
indirect include in bsd-cygwin_util.c

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
7 years agoupstream: revert compat.[ch] section of the following change. It
djm@openbsd.org [Mon, 13 Aug 2018 02:41:05 +0000 (02:41 +0000)] 
upstream: revert compat.[ch] section of the following change. It

causes double-free under some circumstances.

--

date: 2018/07/31 03:07:24;  author: djm;  state: Exp;  lines: +33 -18;  commitid: f7g4UI8eeOXReTPh;
fix some memory leaks spotted by Coverity via Jakub Jelen in bz#2366
feedback and ok dtucker@

OpenBSD-Commit-ID: 1e77547f60fdb5e2ffe23e2e4733c54d8d2d1137

7 years agoupstream: better diagnosics on alg list assembly errors; ok
djm@openbsd.org [Sun, 12 Aug 2018 20:19:13 +0000 (20:19 +0000)] 
upstream: better diagnosics on alg list assembly errors; ok

deraadt@ markus@

OpenBSD-Commit-ID: 5a557e74b839daf13cc105924d2af06a1560faee

7 years agoSome AIX fixes; report from Michael Felt
Damien Miller [Sun, 12 Aug 2018 01:08:45 +0000 (18:08 -0700)] 
Some AIX fixes; report from Michael Felt

7 years agoupstream: The script that cooks up PuTTY format host keys does not
dtucker@openbsd.org [Fri, 10 Aug 2018 01:35:49 +0000 (01:35 +0000)] 
upstream: The script that cooks up PuTTY format host keys does not

understand the new key format so convert back to old format to create the
PuTTY key and remove it once done.

OpenBSD-Regress-ID: 2a449a18846c3a144bc645135b551ba6177e38d3

7 years agoupstream: improve
djm@openbsd.org [Fri, 10 Aug 2018 00:44:01 +0000 (00:44 +0000)] 
upstream: improve

OpenBSD-Commit-ID: 40d839db0977b4e7ac8b647b16d5411d4faf2f60

7 years agoupstream: Describe pubkey format, prompted by bz#2853
djm@openbsd.org [Fri, 10 Aug 2018 00:42:29 +0000 (00:42 +0000)] 
upstream: Describe pubkey format, prompted by bz#2853

While I'm here, describe and link to the remaining local PROTOCOL.*
docs that weren't already mentioned (PROTOCOL.key, PROTOCOL.krl and
PROTOCOL.mux)

OpenBSD-Commit-ID: 2a900f9b994ba4d53e7aeb467d44d75829fd1231

7 years agoupstream: fix numbering
djm@openbsd.org [Fri, 10 Aug 2018 00:27:15 +0000 (00:27 +0000)] 
upstream: fix numbering

OpenBSD-Commit-ID: bc7a1764dff23fa4c5ff0e3379c9c4d5b63c9596

7 years agoupstream: Use new private key format by default. This format is
djm@openbsd.org [Wed, 8 Aug 2018 01:16:01 +0000 (01:16 +0000)] 
upstream: Use new private key format by default. This format is

suported by OpenSSH >= 6.5 (released January 2014), so it should be supported
by most OpenSSH versions in active use.

It is possible to convert new-format private keys to the older
format using "ssh-keygen -f /path/key -pm PEM".

ok deraadt dtucker

OpenBSD-Commit-ID: e3bd4f2509a2103bfa2f710733426af3ad6d8ab8

7 years agoupstream: invalidate dh->priv_key after freeing it in error path;
djm@openbsd.org [Sat, 4 Aug 2018 00:55:06 +0000 (00:55 +0000)] 
upstream: invalidate dh->priv_key after freeing it in error path;

avoids unlikely double-free later. Reported by Viktor Dukhovni via
https://github.com/openssh/openssh-portable/pull/96 feedback jsing@ tb@

OpenBSD-Commit-ID: e317eb17c3e05500ae851f279ef6486f0457c805

7 years agoupstream: delay bailout for invalid authentic
djm@openbsd.org [Tue, 31 Jul 2018 03:10:27 +0000 (03:10 +0000)] 
upstream: delay bailout for invalid authentic

=?UTF-8?q?ating=20user=20until=20after=20the=20packet=20containing=20the?=
=?UTF-8?q?=20request=20has=20been=20fully=20parsed.=20Reported=20by=20Dar?=
=?UTF-8?q?iusz=20Tytko=20and=20Micha=C5=82=20Sajdak;=20ok=20deraadt?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

OpenBSD-Commit-ID: b4891882fbe413f230fe8ac8a37349b03bd0b70d

7 years agoupstream: fix some memory leaks spotted by Coverity via Jakub Jelen
djm@openbsd.org [Tue, 31 Jul 2018 03:07:24 +0000 (03:07 +0000)] 
upstream: fix some memory leaks spotted by Coverity via Jakub Jelen

in bz#2366 feedback and ok dtucker@

OpenBSD-Commit-ID: 8402bbae67d578bedbadb0ce68ff7c5a136ef563

7 years agoRemove support for S/Key
Damien Miller [Fri, 20 Jul 2018 03:18:28 +0000 (13:18 +1000)] 
Remove support for S/Key

Most people will 1) be using modern multi-factor authentication methods
like TOTP/OATH etc and 2) be getting support for multi-factor
authentication via PAM or BSD Auth.

7 years agoupstream: avoid expensive channel_open_message() calls; ok djm@
markus@openbsd.org [Fri, 27 Jul 2018 12:03:17 +0000 (12:03 +0000)] 
upstream: avoid expensive channel_open_message() calls; ok djm@

OpenBSD-Commit-ID: aea3b5512ad681cd8710367d743e8a753d4425d9

7 years agoupstream: Now that ssh can't be setuid, remove the
dtucker@openbsd.org [Fri, 27 Jul 2018 05:34:42 +0000 (05:34 +0000)] 
upstream: Now that ssh can't be setuid, remove the

original_real_uid and original_effective_uid globals and replace with calls
to plain getuid(). ok djm@

OpenBSD-Commit-ID: 92561c0cd418d34e6841e20ba09160583e27b68c

7 years agoupstream: Remove uid checks from low port binds. Now that ssh
dtucker@openbsd.org [Fri, 27 Jul 2018 05:13:02 +0000 (05:13 +0000)] 
upstream: Remove uid checks from low port binds. Now that ssh

cannot be setuid and sshd always has privsep on, we can remove the uid checks
for low port binds and just let the system do the check. We leave a sanity
check for the !privsep case so long as the code is stil there.  with & ok
djm@

OpenBSD-Commit-ID: 9535cfdbd1cd54486fdbedfaee44ce4367ec7ca0

7 years agoupstream: ssh(1) no longer supports being setuid root. Remove reference
dtucker@openbsd.org [Fri, 27 Jul 2018 03:55:22 +0000 (03:55 +0000)] 
upstream: ssh(1) no longer supports being setuid root. Remove reference

to crc32 which went with protocol 1.  Pointed out by deraadt@.

OpenBSD-Commit-ID: f8763c25fd96ed91dd1abdab5667fd2e27e377b6

7 years agocorrect snprintf truncation check in closefrom()
Damien Miller [Fri, 27 Jul 2018 04:15:28 +0000 (14:15 +1000)] 
correct snprintf truncation check in closefrom()

Truncation cannot happen unless the system has set PATH_MAX to some
nonsensically low value.

bz#2862, patch from Daniel Le

7 years agoInclude stdarg.h in mkdtemp for va_list.
Darren Tucker [Fri, 27 Jul 2018 03:46:06 +0000 (13:46 +1000)] 
Include stdarg.h in mkdtemp for va_list.

7 years agoupstream: Don't redefine Makefile choices which come correct from
deraadt@openbsd.org [Wed, 25 Jul 2018 17:12:35 +0000 (17:12 +0000)] 
upstream: Don't redefine Makefile choices which come correct from

bsd.*.mk ok markus

OpenBSD-Commit-ID: 814b2f670df75759e1581ecef530980b2b3d7e0f

7 years agoupstream: fix indent; Clemens Goessnitzer
deraadt@openbsd.org [Wed, 25 Jul 2018 13:56:23 +0000 (13:56 +0000)] 
upstream: fix indent; Clemens Goessnitzer

OpenBSD-Commit-ID: b5149a6d92b264d35f879d24608087b254857a83

7 years agoupstream: Use the caller provided (copied) pwent struct in
beck@openbsd.org [Wed, 25 Jul 2018 13:10:56 +0000 (13:10 +0000)] 
upstream: Use the caller provided (copied) pwent struct in

load_public_identity_files instead of calling getpwuid() again and discarding
the argument. This prevents a client crash where tilde_expand_filename calls
getpwuid() again before the pwent pointer is used. Issue noticed and reported
by Pierre-Olivier Martel <pom@apple.com> ok djm@ deraadt@

OpenBSD-Commit-ID: a067d74b5b098763736c94cc1368de8ea3f0b157

7 years agoupstream: oops, failed to notice that SEE ALSO got messed up;
jmc@openbsd.org [Mon, 23 Jul 2018 19:53:55 +0000 (19:53 +0000)] 
upstream: oops, failed to notice that SEE ALSO got messed up;

OpenBSD-Commit-ID: 61c1306542cefdc6e59ac331751afe961557427d

7 years agoupstream: Point to glob in section 7 for the actual list of special
kn@openbsd.org [Mon, 23 Jul 2018 19:02:49 +0000 (19:02 +0000)] 
upstream: Point to glob in section 7 for the actual list of special

characters instead the C API in section 3.

OK millert jmc nicm, "the right idea" deraadt

OpenBSD-Commit-ID: a74fd215488c382809e4d041613aeba4a4b1ffc6

7 years agoupstream: Switch authorized_keys example from ssh-dss to ssh-rsa
dtucker@openbsd.org [Sun, 22 Jul 2018 12:16:59 +0000 (12:16 +0000)] 
upstream: Switch authorized_keys example from ssh-dss to ssh-rsa

since the former is no longer enabled by default.  Pointed out by Daniel A.
Maierhofer, ok jmc

OpenBSD-Commit-ID: 6a196cef53d7524e0c9b58cdbc1b5609debaf8c7

7 years agoupstream: slightly-clearer description for AuthenticationMethods - the
djm@openbsd.org [Fri, 20 Jul 2018 05:01:10 +0000 (05:01 +0000)] 
upstream: slightly-clearer description for AuthenticationMethods - the

lists have comma-separated elements; bz#2663 from Hans Meier

OpenBSD-Commit-ID: 931c983d0fde4764d0942fb2c2b5017635993b5a

7 years agoCreate control sockets in clean temp directories
Damien Miller [Fri, 20 Jul 2018 04:53:42 +0000 (14:53 +1000)] 
Create control sockets in clean temp directories

Adds a regress/mkdtemp tool and uses it to create empty temp
directories for tests needing control sockets.

Patch from Colin Watson via bz#2660; ok dtucker

7 years agoupstream: remove unused zlib.h
djm@openbsd.org [Fri, 20 Jul 2018 03:46:34 +0000 (03:46 +0000)] 
upstream: remove unused zlib.h

OpenBSD-Commit-ID: 8d274a9b467c7958df12668b49144056819f79f1

7 years agoupstream: Fix typo in comment. From Alexandru Iacob via github.
dtucker@openbsd.org [Thu, 19 Jul 2018 23:03:16 +0000 (23:03 +0000)] 
upstream: Fix typo in comment. From Alexandru Iacob via github.

OpenBSD-Commit-ID: eff4ec07c6c8c5483533da43a4dda37d72ef7f1d

7 years agoExplicitly include openssl before zlib.
Darren Tucker [Fri, 20 Jul 2018 03:48:51 +0000 (13:48 +1000)] 
Explicitly include openssl before zlib.

Some versions of OpenSSL have "free_func" in their headers, which zlib
typedefs.  Including openssl after zlib (eg via sshkey.h) results in
"syntax error before `free_func'", which this fixes.

7 years agoupstream: Deprecate UsePrivilegedPort now that support for running
dtucker@openbsd.org [Thu, 19 Jul 2018 10:28:47 +0000 (10:28 +0000)] 
upstream: Deprecate UsePrivilegedPort now that support for running

ssh(1) setuid has been removed, remove supporting code and clean up
references to it in the man pages

We have not shipped ssh(1) the setuid bit since 2002.  If ayone
really needs to make connections from a low port number this can
be implemented via a small setuid ProxyCommand.

ok markus@ jmc@ djm@

OpenBSD-Commit-ID: d03364610b7123ae4c6792f5274bd147b6de717e

7 years agoupstream: Remove support for running ssh(1) setuid and fatal if
dtucker@openbsd.org [Wed, 18 Jul 2018 11:34:04 +0000 (11:34 +0000)] 
upstream: Remove support for running ssh(1) setuid and fatal if

attempted. Do not link uidwap.c into ssh any more.  Neuters
UsePrivilegedPort, which will be marked as deprecated shortly. ok markus@
djm@

OpenBSD-Commit-ID: c4ba5bf9c096f57a6ed15b713a1d7e9e2e373c42

7 years agoupstream: Slot 0 in the hostbased key array was previously RSA1,
dtucker@openbsd.org [Mon, 16 Jul 2018 22:25:01 +0000 (22:25 +0000)] 
upstream: Slot 0 in the hostbased key array was previously RSA1,

but that is now gone and the slot is unused so remove it.  Remove two
now-unused macros, and add an array bounds check to the two remaining ones
(array is statically sized, so mostly a safety check on future changes). ok
markus@

OpenBSD-Commit-ID: 2e4c0ca6cc1d8daeccead2aa56192a3f9d5e1e7a

7 years agoupstream: Remove support for loading HostBasedAuthentication keys
dtucker@openbsd.org [Mon, 16 Jul 2018 11:05:41 +0000 (11:05 +0000)] 
upstream: Remove support for loading HostBasedAuthentication keys

directly in ssh(1) and always use ssh-keysign.  This removes one of the few
remaining reasons why ssh(1) might be setuid.  ok markus@

OpenBSD-Commit-ID: 97f01e1448707129a20d75f86bad5d27c3cf0b7d

7 years agoupstream: keep options.identity_file_userprovided array in sync when we
djm@openbsd.org [Mon, 16 Jul 2018 07:06:50 +0000 (07:06 +0000)] 
upstream: keep options.identity_file_userprovided array in sync when we

load keys, fixing some spurious error messages; ok markus

OpenBSD-Commit-ID: c63e3d5200ee2cf9e35bda98de847302566c6a00

7 years agoupstream: memleak in unittest; found by valgrind
djm@openbsd.org [Mon, 16 Jul 2018 03:09:59 +0000 (03:09 +0000)] 
upstream: memleak in unittest; found by valgrind

OpenBSD-Regress-ID: 168c23b0fb09fc3d0b438628990d3fd9260a8a5e

7 years agoupstream: memleaks; found by valgrind
djm@openbsd.org [Mon, 16 Jul 2018 03:09:13 +0000 (03:09 +0000)] 
upstream: memleaks; found by valgrind

OpenBSD-Commit-ID: 6c3ba22be53e753c899545f771e8399fc93cd844

7 years agoUndef a few new macros in sys-queue.h.
Darren Tucker [Sat, 14 Jul 2018 06:49:01 +0000 (16:49 +1000)] 
Undef a few new macros in sys-queue.h.

Prevents macro redefinition warnings on OSX.

7 years agoInclude unistd.h for geteuid declaration.
Darren Tucker [Fri, 13 Jul 2018 03:40:20 +0000 (13:40 +1000)] 
Include unistd.h for geteuid declaration.

7 years agoFallout from buffer conversion in AUDIT_EVENTS.
Darren Tucker [Fri, 13 Jul 2018 03:38:10 +0000 (13:38 +1000)] 
Fallout from buffer conversion in AUDIT_EVENTS.

Supply missing "int r" and fix error path for sshbuf_new().

7 years agoupstream: make this use ssh_proxy rather than starting/stopping a
djm@openbsd.org [Fri, 13 Jul 2018 02:13:50 +0000 (02:13 +0000)] 
upstream: make this use ssh_proxy rather than starting/stopping a

daemon for each testcase

OpenBSD-Regress-ID: 608b7655ea65b1ba8fff5a13ce9caa60ef0c8166

7 years agoupstream: fix leaks in unit test; with this, all unit tests are
djm@openbsd.org [Fri, 13 Jul 2018 02:13:19 +0000 (02:13 +0000)] 
upstream: fix leaks in unit test; with this, all unit tests are

leak free (as far as valgrind can spot anyway)

OpenBSD-Regress-ID: b824d8b27998365379963440e5d18b95ca03aa17

7 years agoEnable leak checks for unit tests with valgrind
Damien Miller [Fri, 13 Jul 2018 01:39:25 +0000 (11:39 +1000)] 
Enable leak checks for unit tests with valgrind

Leave the leak checking on unconditionally when running with valgrind.
The unit tests are leak-free and I want them to stay that way.

7 years agoincrease timeout to match cfgmatch.sh
Damien Miller [Fri, 13 Jul 2018 01:38:59 +0000 (11:38 +1000)] 
increase timeout to match cfgmatch.sh

lets test pass under valgrind (on my workstation at least)

7 years agorm regress/misc/kexfuzz/*.o in distclean target
Damien Miller [Thu, 12 Jul 2018 04:54:18 +0000 (14:54 +1000)] 
rm regress/misc/kexfuzz/*.o in distclean target

7 years agorepair !WITH_OPENSSL build
Damien Miller [Thu, 12 Jul 2018 04:49:26 +0000 (14:49 +1000)] 
repair !WITH_OPENSSL build

7 years agomissing headers
Damien Miller [Thu, 12 Jul 2018 04:49:14 +0000 (14:49 +1000)] 
missing headers

7 years agoRemove key.h from portable files too.
Darren Tucker [Thu, 12 Jul 2018 04:57:46 +0000 (14:57 +1000)] 
Remove key.h from portable files too.

Commit 5467fbcb removed key.h so stop including it in portable files
too.  Fixes builds on lots of platforms.

7 years agoupstream: remove prototype to long-gone function
djm@openbsd.org [Thu, 12 Jul 2018 04:35:25 +0000 (04:35 +0000)] 
upstream: remove prototype to long-gone function

OpenBSD-Commit-ID: 0414642ac7ce01d176b9f359091a66a8bbb640bd

7 years agoupstream: treat ssh_packet_write_wait() errors as fatal; ok djm@
markus@openbsd.org [Wed, 11 Jul 2018 18:55:11 +0000 (18:55 +0000)] 
upstream: treat ssh_packet_write_wait() errors as fatal; ok djm@

OpenBSD-Commit-ID: f88ba43c9d54ed2d911218aa8d3f6285430629c3

7 years agoupstream: remove legacy key emulation layer; ok djm@
markus@openbsd.org [Wed, 11 Jul 2018 18:53:29 +0000 (18:53 +0000)] 
upstream: remove legacy key emulation layer; ok djm@

OpenBSD-Commit-ID: 2b1f9619259e222bbd4fe9a8d3a0973eafb9dd8d

7 years agoupstream: s/wuth/with/ in comment
martijn@openbsd.org [Wed, 11 Jul 2018 08:19:35 +0000 (08:19 +0000)] 
upstream: s/wuth/with/ in comment

OpenBSD-Commit-ID: 9de41468afd75f54a7f47809d2ad664aa577902c

7 years agoInclude stdlib.h for declaration of free.
Darren Tucker [Wed, 11 Jul 2018 02:12:38 +0000 (12:12 +1000)] 
Include stdlib.h for declaration of free.

Fixes build with -Werror on at least Fedora and probably others.

7 years agoVALGRIND_CHECK_LEAKS logic was backwards :(
Damien Miller [Wed, 11 Jul 2018 00:19:56 +0000 (10:19 +1000)] 
VALGRIND_CHECK_LEAKS logic was backwards :(

7 years agoFix sshbuf_new error path in skey.
Darren Tucker [Wed, 11 Jul 2018 00:10:26 +0000 (10:10 +1000)] 
Fix sshbuf_new error path in skey.

7 years agoSupply missing third arg in skey.
Darren Tucker [Wed, 11 Jul 2018 00:06:18 +0000 (10:06 +1000)] 
Supply missing third arg in skey.

During the change to the new buffer api the third arg to
sshbuf_get_cstring was ommitted.  Fixes build when configured with skey.

7 years agoSupply some more missing "int r" in skey
Darren Tucker [Wed, 11 Jul 2018 00:03:34 +0000 (10:03 +1000)] 
Supply some more missing "int r" in skey

7 years agodisable valgrind memleak checking by default
Damien Miller [Tue, 10 Jul 2018 23:56:36 +0000 (09:56 +1000)] 
disable valgrind memleak checking by default

Add VALGRIND_CHECK_LEAKS knob to turn it back on.

7 years agoSupply missing "int r" in skey code.
Darren Tucker [Tue, 10 Jul 2018 23:54:00 +0000 (09:54 +1000)] 
Supply missing "int r" in skey code.

7 years agoupstream: re-remove some pre-auth compression bits
sf@openbsd.org [Tue, 10 Jul 2018 09:36:58 +0000 (09:36 +0000)] 
upstream: re-remove some pre-auth compression bits

This time, make sure to not remove things that are necessary for
pre-auth compression on the client. Add a comment that pre-auth
compression is still supported in the client.

ok markus@

OpenBSD-Commit-ID: 282c6fec7201f18a5c333bbb68d9339734d2f784

7 years agoAdapt portable to legacy buffer API removal
Damien Miller [Tue, 10 Jul 2018 09:39:52 +0000 (19:39 +1000)] 
Adapt portable to legacy buffer API removal

7 years agoupstream: kerberos/gssapi fixes for buffer removal
djm@openbsd.org [Tue, 10 Jul 2018 09:13:30 +0000 (09:13 +0000)] 
upstream: kerberos/gssapi fixes for buffer removal

OpenBSD-Commit-ID: 1cdf56fec95801e4563c47f21696f04cd8b60c4c

7 years agoupstream: buffer.[ch] and bufaux.c are no more
djm@openbsd.org [Tue, 10 Jul 2018 06:45:29 +0000 (06:45 +0000)] 
upstream: buffer.[ch] and bufaux.c are no more

OpenBSD-Commit-ID: d1a1852284e554f39525eb4d4891b207cfb3d3a0

7 years agoupstream: one mention of Buffer that almost got away :)
djm@openbsd.org [Tue, 10 Jul 2018 06:43:52 +0000 (06:43 +0000)] 
upstream: one mention of Buffer that almost got away :)

OpenBSD-Commit-ID: 30d7c27a90b4544ad5dfacf654595710cd499f02

7 years agoupstream: replace cast with call to sshbuf_mutable_ptr(); ok djm@
markus@openbsd.org [Mon, 9 Jul 2018 21:59:10 +0000 (21:59 +0000)] 
upstream: replace cast with call to sshbuf_mutable_ptr(); ok djm@

OpenBSD-Commit-ID: 4dfe9d29fa93d9231645c89084f7217304f7ba29

7 years agoupstream: remove legacy buffer API emulation layer; ok djm@
markus@openbsd.org [Mon, 9 Jul 2018 21:56:06 +0000 (21:56 +0000)] 
upstream: remove legacy buffer API emulation layer; ok djm@

OpenBSD-Commit-ID: 2dd5dc17cbc23195be4299fa93be2707a0e08ad9

7 years agoupstream: sshd: switch monitor to sshbuf API; lots of help & ok
markus@openbsd.org [Mon, 9 Jul 2018 21:53:45 +0000 (21:53 +0000)] 
upstream: sshd: switch monitor to sshbuf API; lots of help & ok

djm@

OpenBSD-Commit-ID: d89bd02d33974fd35ca0b8940d88572227b34a48

7 years agoupstream: sshd: switch GSSAPI to sshbuf API; ok djm@
markus@openbsd.org [Mon, 9 Jul 2018 21:37:55 +0000 (21:37 +0000)] 
upstream: sshd: switch GSSAPI to sshbuf API; ok djm@

OpenBSD-Commit-ID: e48449ab4be3f006f7ba33c66241b7d652973e30

7 years agoupstream: sshd: switch authentication to sshbuf API; ok djm@
markus@openbsd.org [Mon, 9 Jul 2018 21:35:50 +0000 (21:35 +0000)] 
upstream: sshd: switch authentication to sshbuf API; ok djm@

OpenBSD-Commit-ID: 880aa06bce4b140781e836bb56bec34873290641

7 years agoupstream: sshd: switch config to sshbuf API; ok djm@
markus@openbsd.org [Mon, 9 Jul 2018 21:29:36 +0000 (21:29 +0000)] 
upstream: sshd: switch config to sshbuf API; ok djm@

OpenBSD-Commit-ID: 72b02017bac7feac48c9dceff8355056bea300bd

7 years agoupstream: sshd: switch loginmsg to sshbuf API; ok djm@
markus@openbsd.org [Mon, 9 Jul 2018 21:26:02 +0000 (21:26 +0000)] 
upstream: sshd: switch loginmsg to sshbuf API; ok djm@

OpenBSD-Commit-ID: f3cb4e54bff15c593602d95cc43e32ee1a4bac42

7 years agoupstream: ttymodes: switch to sshbuf API; ok djm@
markus@openbsd.org [Mon, 9 Jul 2018 21:20:26 +0000 (21:20 +0000)] 
upstream: ttymodes: switch to sshbuf API; ok djm@

OpenBSD-Commit-ID: 5df340c5965e822c9da21e19579d08dea3cbe429

7 years agoupstream: client: switch mux to sshbuf API; with & ok djm@
markus@openbsd.org [Mon, 9 Jul 2018 21:18:10 +0000 (21:18 +0000)] 
upstream: client: switch mux to sshbuf API; with & ok djm@

OpenBSD-Commit-ID: 5948fb98d704f9c4e075b92edda64e0290b5feb2

7 years agoupstream: client: switch to sshbuf API; ok djm@
markus@openbsd.org [Mon, 9 Jul 2018 21:03:30 +0000 (21:03 +0000)] 
upstream: client: switch to sshbuf API; ok djm@

OpenBSD-Commit-ID: 60cb0356114acc7625ab85105f6f6a7cd44a8d05

7 years agoupstream: pkcs11: switch to sshbuf API; ok djm@
markus@openbsd.org [Mon, 9 Jul 2018 20:39:28 +0000 (20:39 +0000)] 
upstream: pkcs11: switch to sshbuf API; ok djm@

OpenBSD-Commit-ID: 98cc4e800f1617c51caf59a6cb3006f14492db79

7 years agoupstream: Revert previous two commits
sf@openbsd.org [Mon, 9 Jul 2018 13:37:10 +0000 (13:37 +0000)] 
upstream: Revert previous two commits

It turns out we still support pre-auth compression on the client.
Therefore revert the previous two commits:

date: 2018/07/06 09:06:14;  author: sf;  commitid: yZVYKIRtUZWD9CmE;
 Rename COMP_DELAYED to COMP_ZLIB

 Only delayed compression is supported nowadays.

 ok markus@

date: 2018/07/06 09:05:01;  author: sf;  commitid: rEGuT5UgI9f6kddP;
 Remove leftovers from pre-authentication compression

 Support for this has been removed in 2016.
 COMP_DELAYED will be renamed in a later commit.

 ok markus@

OpenBSD-Commit-ID: cdfef526357e4e1483c86cf599491b2dafb77772

7 years agoupstream: Rename COMP_DELAYED to COMP_ZLIB
sf@openbsd.org [Fri, 6 Jul 2018 09:06:14 +0000 (09:06 +0000)] 
upstream: Rename COMP_DELAYED to COMP_ZLIB

Only delayed compression is supported nowadays.

ok markus@

OpenBSD-Commit-ID: 5b1dbaf3d9a4085aaa10fec0b7a4364396561821

7 years agoupstream: Remove leftovers from pre-authentication compression
sf@openbsd.org [Fri, 6 Jul 2018 09:05:01 +0000 (09:05 +0000)] 
upstream: Remove leftovers from pre-authentication compression

Support for this has been removed in 2016.
COMP_DELAYED will be renamed in a later commit.

ok markus@

OpenBSD-Commit-ID: 6a99616c832627157113fcb0cf5a752daf2e6b58

7 years agoupstream: Remove unused ssh_packet_start_compression()
sf@openbsd.org [Fri, 6 Jul 2018 09:03:02 +0000 (09:03 +0000)] 
upstream: Remove unused ssh_packet_start_compression()

ok markus@

OpenBSD-Commit-ID: 9d34cf2f59aca5422021ae2857190578187dc2b4

7 years agoDefer setting bufsiz in getdelim.
Darren Tucker [Fri, 6 Jul 2018 03:32:02 +0000 (13:32 +1000)] 
Defer setting bufsiz in getdelim.

Do not write to bufsiz until we are sure the malloc has succeeded,
in case any callers rely on it (which they shouldn't).  ok djm@

7 years agoFix other callers of read_environment_file.
Darren Tucker [Thu, 5 Jul 2018 03:32:01 +0000 (13:32 +1000)] 
Fix other callers of read_environment_file.

read_environment_file recently gained an extra argument   Some platform
specific code also calls it so add the argument to those too.  Fixes
build on Solaris and AIX.

7 years agoupstream: deal with API rename: match_filter_list() =>
djm@openbsd.org [Wed, 4 Jul 2018 13:51:45 +0000 (13:51 +0000)] 
upstream: deal with API rename: match_filter_list() =>

match_filter_blacklist()

OpenBSD-Regress-ID: 2da342be913efeb51806351af906fab01ba4367f

7 years agoupstream: exercise new expansion behaviour of
djm@openbsd.org [Wed, 4 Jul 2018 13:51:12 +0000 (13:51 +0000)] 
upstream: exercise new expansion behaviour of

PubkeyAcceptedKeyTypes and, by proxy, test kex_assemble_names()

ok markus@

OpenBSD-Regress-ID: 292978902e14d5729aa87e492dd166c842f72736

7 years agoupstream: add a comment that could have saved me 45 minutes of wild
djm@openbsd.org [Tue, 3 Jul 2018 13:53:26 +0000 (13:53 +0000)] 
upstream: add a comment that could have saved me 45 minutes of wild

goose chasing

OpenBSD-Regress-ID: d469b29ffadd3402c090e21b792d627d46fa5297

7 years agoupstream: repair PubkeyAcceptedKeyTypes (and friends) after RSA
djm@openbsd.org [Wed, 4 Jul 2018 13:49:31 +0000 (13:49 +0000)] 
upstream: repair PubkeyAcceptedKeyTypes (and friends) after RSA

signature work - returns ability to add/remove/specify algorithms by
wildcard.

Algorithm lists are now fully expanded when the server/client configs
are finalised, so errors are reported early and the config dumps
(e.g. "ssh -G ...") now list the actual algorithms selected.

Clarify that, while wildcards are accepted in algorithm lists, they
aren't full pattern-lists that support negation.

(lots of) feedback, ok markus@

OpenBSD-Commit-ID: a8894c5c81f399a002f02ff4fe6b4fa46b1f3207

7 years agoupstream: some magic for RSA-SHA2 checks
djm@openbsd.org [Tue, 3 Jul 2018 11:43:49 +0000 (11:43 +0000)] 
upstream: some magic for RSA-SHA2 checks

OpenBSD-Regress-ID: e5a9b11368ff6d86e7b25ad10ebe43359b471cd4

7 years agodepend
Damien Miller [Tue, 3 Jul 2018 13:27:11 +0000 (23:27 +1000)] 
depend

7 years agoupstream: some finesse to fix RSA-SHA2 certificate authentication
djm@openbsd.org [Tue, 3 Jul 2018 13:20:25 +0000 (13:20 +0000)] 
upstream: some finesse to fix RSA-SHA2 certificate authentication

for certs hosted in ssh-agent

OpenBSD-Commit-ID: e5fd5edd726137dda2d020e1cdebc464110a010f

7 years agoupstream: check correct variable; unbreak agent keys
djm@openbsd.org [Tue, 3 Jul 2018 13:07:58 +0000 (13:07 +0000)] 
upstream: check correct variable; unbreak agent keys

OpenBSD-Commit-ID: c36981fdf1f3ce04966d3310826a3e1e6233d93e

7 years agoupstream: crank version number to 7.8; needed for new compat flag
djm@openbsd.org [Tue, 3 Jul 2018 11:42:12 +0000 (11:42 +0000)] 
upstream: crank version number to 7.8; needed for new compat flag

for prior version; part of RSA-SHA2 strictification, ok markus@

OpenBSD-Commit-ID: 84a11fc0efd2674c050712336b5093f5d408e32b

7 years agoupstream: Improve strictness and control over RSA-SHA2 signature
djm@openbsd.org [Tue, 3 Jul 2018 11:39:54 +0000 (11:39 +0000)] 
upstream: Improve strictness and control over RSA-SHA2 signature

In ssh, when an agent fails to return a RSA-SHA2 signature when
requested and falls back to RSA-SHA1 instead, retry the signature to
ensure that the public key algorithm sent in the SSH_MSG_USERAUTH
matches the one in the signature itself.

In sshd, strictly enforce that the public key algorithm sent in the
SSH_MSG_USERAUTH message matches what appears in the signature.

Make the sshd_config PubkeyAcceptedKeyTypes and
HostbasedAcceptedKeyTypes options control accepted signature algorithms
(previously they selected supported key types). This allows these
options to ban RSA-SHA1 in favour of RSA-SHA2.

Add new signature algorithms "rsa-sha2-256-cert-v01@openssh.com" and
"rsa-sha2-512-cert-v01@openssh.com" to force use of RSA-SHA2 signatures
with certificate keys.

feedback and ok markus@

OpenBSD-Commit-ID: c6e9f6d45eed8962ad502d315d7eaef32c419dde