]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
6 years agoupstream: include time.h for time(3)/nanosleep(2); from Ian
djm@openbsd.org [Thu, 17 Jan 2019 04:20:53 +0000 (04:20 +0000)] 
upstream: include time.h for time(3)/nanosleep(2); from Ian

McKellar

OpenBSD-Commit-ID: 6412ccd06a88f65b207a1089345f51fa1244ea51

6 years agoupstream: many of the global variables in this file can be made static;
djm@openbsd.org [Thu, 17 Jan 2019 01:50:24 +0000 (01:50 +0000)] 
upstream: many of the global variables in this file can be made static;

patch from Markus Schmidt

OpenBSD-Commit-ID: f3db619f67beb53257b21bac0e92b4fb7d5d5737

6 years agoupstream: Add "-h" flag to sftp chown/chgrp/chmod commands to
djm@openbsd.org [Wed, 16 Jan 2019 23:23:45 +0000 (23:23 +0000)] 
upstream: Add "-h" flag to sftp chown/chgrp/chmod commands to

request they do not follow symlinks. Requires recently-committed
lsetstat@openssh.com extension on the server side.

ok markus@ dtucker@

OpenBSD-Commit-ID: f93bb3f6f7eb2fb7ef1e59126e72714f1626d604

6 years agoupstream: add support for a "lsetstat@openssh.com" extension. This
djm@openbsd.org [Wed, 16 Jan 2019 23:22:10 +0000 (23:22 +0000)] 
upstream: add support for a "lsetstat@openssh.com" extension. This

replicates the functionality of the existing SSH2_FXP_SETSTAT operation but
does not follow symlinks. Based on a patch from Bert Haverkamp in bz#2067 but
with more attribute modifications supported.

ok markus@ dtucker@

OpenBSD-Commit-ID: f7234f6e90db19655d55d936a115ee4ccb6aaf80

6 years agoupstream: eliminate function-static attempt counters for
djm@openbsd.org [Fri, 4 Jan 2019 03:27:50 +0000 (03:27 +0000)] 
upstream: eliminate function-static attempt counters for

passwd/kbdint authmethods by moving them to the client authctxt; Patch from
Markus Schmidt, ok markus@

OpenBSD-Commit-ID: 4df4404a5d5416eb056f68e0e2f4fa91ba3b3f7f

6 years agoupstream: fix memory leak of ciphercontext when rekeying; bz#2942
djm@openbsd.org [Fri, 4 Jan 2019 03:23:00 +0000 (03:23 +0000)] 
upstream: fix memory leak of ciphercontext when rekeying; bz#2942

Patch from Markus Schmidt; ok markus@

OpenBSD-Commit-ID: 7877f1b82e249986f1ef98d0ae76ce987d332bdd

6 years agoupstream: static on global vars, const on handler tables that contain
djm@openbsd.org [Tue, 1 Jan 2019 23:10:53 +0000 (23:10 +0000)] 
upstream: static on global vars, const on handler tables that contain

function pointers; from Mike Frysinger

OpenBSD-Commit-ID: 7ef2305e50d3caa6326286db43cf2cfaf03960e0

6 years agoupstream: Request RSA-SHA2 signatures for
djm@openbsd.org [Thu, 27 Dec 2018 23:02:11 +0000 (23:02 +0000)] 
upstream: Request RSA-SHA2 signatures for

rsa-sha2-{256|512}-cert-v01@openssh.com cert algorithms; ok markus@

OpenBSD-Commit-ID: afc6f7ca216ccd821656d1c911d2a3deed685033

6 years agoupstream: ssh_packet_set_state() now frees ssh->kex implicitly, so
djm@openbsd.org [Thu, 27 Dec 2018 03:37:49 +0000 (03:37 +0000)] 
upstream: ssh_packet_set_state() now frees ssh->kex implicitly, so

don't do explicit kex_free() beforehand

OpenBSD-Regress-ID: f2f73bad47f62a2040ccba0a72cadcb12eda49cf

6 years agoupstream: remove unused and problematic sudo clean. ok espie
tedu@openbsd.org [Sat, 15 Dec 2018 00:50:21 +0000 (00:50 +0000)] 
upstream: remove unused and problematic sudo clean. ok espie

OpenBSD-Regress-ID: ca90c20a15a85b661e13e98b80c10e65cd662f7b

6 years agoupstream: move client/server SSH-* banners to buffers under
djm@openbsd.org [Thu, 27 Dec 2018 03:25:24 +0000 (03:25 +0000)] 
upstream: move client/server SSH-* banners to buffers under

ssh->kex and factor out the banner exchange. This eliminates some common code
from the client and server.

Also be more strict about handling \r characters - these should only
be accepted immediately before \n (pointed out by Jann Horn).

Inspired by a patch from Markus Schmidt.
(lots of) feedback and ok markus@

OpenBSD-Commit-ID: 1cc7885487a6754f63641d7d3279b0941890275b

6 years agoupstream: Fix calculation of initial bandwidth limits. Account for
dtucker@openbsd.org [Fri, 7 Dec 2018 04:36:09 +0000 (04:36 +0000)] 
upstream: Fix calculation of initial bandwidth limits. Account for

written bytes before the initial timer check so that the first buffer written
is accounted.  Set the threshold after which the timer is checked such that
the limit starts being computed as soon as possible, ie after the second
buffer is written.  This prevents an initial burst of traffic and provides a
more accurate bandwidth limit.  bz#2927, ok djm.

OpenBSD-Commit-ID: ff3ef76e4e43040ec198c2718d5682c36b255cb6

6 years agoupstream: only consider the ext-info-c extension during the initial
djm@openbsd.org [Fri, 7 Dec 2018 03:39:40 +0000 (03:39 +0000)] 
upstream: only consider the ext-info-c extension during the initial

KEX. It shouldn't be sent in subsequent ones, but if it is present we should
ignore it.

This prevents sshd from sending a SSH_MSG_EXT_INFO for REKEX for buggy
these clients. Reported by Jakub Jelen via bz2929; ok dtucker@

OpenBSD-Commit-ID: 91564118547f7807030ec537480303e2371902f9

6 years agoupstream: fix option letter pasto in previous
djm@openbsd.org [Fri, 7 Dec 2018 03:33:18 +0000 (03:33 +0000)] 
upstream: fix option letter pasto in previous

OpenBSD-Commit-ID: e26c8bf2f2a808f3c47960e1e490d2990167ec39

6 years agoupstream: mention that the ssh-keygen -F (find host in
djm@openbsd.org [Fri, 7 Dec 2018 03:32:26 +0000 (03:32 +0000)] 
upstream: mention that the ssh-keygen -F (find host in

authorized_keys) and -R (remove host from authorized_keys) options may accept
either a bare hostname or a [hostname]:port combo. bz#2935

OpenBSD-Commit-ID: 5535cf4ce78375968b0d2cd7aa316fa3eb176780

6 years agoexpose $SSH_CONNECTION in the PAM environment
Damien Miller [Fri, 7 Dec 2018 04:41:16 +0000 (15:41 +1100)] 
expose $SSH_CONNECTION in the PAM environment

This makes the connection 4-tuple available to PAM modules that
wish to use it in decision-making. bz#2741

6 years agoDon't pass loginmsg by address now that it's an sshbuf*
Kevin Adler [Thu, 13 Dec 2018 04:12:45 +0000 (22:12 -0600)] 
Don't pass loginmsg by address now that it's an sshbuf*

In 120a1ec74, loginmsg was changed from the legacy Buffer type
to struct sshbuf*, but it missed changing calls to
sys_auth_allowed_user and sys_auth_record_login which passed
loginmsg by address. Now that it's a pointer, just pass it directly.

This only affects AIX, unless there are out of tree users.

6 years agoupstream: no need to allocate channels_pre/channels_post in
djm@openbsd.org [Fri, 7 Dec 2018 02:31:20 +0000 (02:31 +0000)] 
upstream: no need to allocate channels_pre/channels_post in

channel_init_channels() as we do it anyway in channel_handler_init() that we
call at the end of the function. Fix from Markus Schmidt via bz#2938

OpenBSD-Commit-ID: 74893638af49e3734f1e33a54af1b7ea533373ed

6 years agoupstream: don't attempt to connect to empty SSH_AUTH_SOCK; bz#293
djm@openbsd.org [Fri, 30 Nov 2018 02:24:52 +0000 (02:24 +0000)] 
upstream: don't attempt to connect to empty SSH_AUTH_SOCK; bz#293

OpenBSD-Commit-ID: 0e8fc8f19f14b21adef7109e0faa583d87c0e929

6 years agoupstream: don't truncate user or host name in "user@host's
djm@openbsd.org [Wed, 28 Nov 2018 06:00:38 +0000 (06:00 +0000)] 
upstream: don't truncate user or host name in "user@host's

OpenBSD-Commit-ID: e6ca01a8d58004b7f2cac0b1b7ce8f87e425e360

6 years agoupstream: tweak previous;
jmc@openbsd.org [Fri, 23 Nov 2018 06:58:28 +0000 (06:58 +0000)] 
upstream: tweak previous;

OpenBSD-Commit-ID: 08f096922eb00c98251501c193ff9e83fbb5de4f

6 years agoInclude stdio.h for FILE if needed.
Darren Tucker [Sun, 25 Nov 2018 10:44:05 +0000 (21:44 +1100)] 
Include stdio.h for FILE if needed.

6 years agoReverse order of OpenSSL init functions.
Darren Tucker [Sun, 25 Nov 2018 03:05:57 +0000 (14:05 +1100)] 
Reverse order of OpenSSL init functions.

Try the new init function (OPENSSL_init_crypto) before falling back to
the old one (OpenSSL_add_all_algorithms).

6 years agoImprove OpenSSL_add_all_algorithms check.
Darren Tucker [Sun, 25 Nov 2018 03:05:08 +0000 (14:05 +1100)] 
Improve OpenSSL_add_all_algorithms check.

OpenSSL_add_all_algorithms() may be a macro so check for that too.

6 years agoupstream: add a ssh_config "Match final" predicate
djm@openbsd.org [Fri, 23 Nov 2018 05:08:07 +0000 (05:08 +0000)] 
upstream: add a ssh_config "Match final" predicate

Matches in same pass as "Match canonical" but doesn't require
hostname canonicalisation be enabled. bz#2906 ok markus

OpenBSD-Commit-ID: fba1dfe9f6e0cabcd0e2b3be13f7a434199beffa

6 years agoupstream: Remove now-unneeded ifdef SIGINFO around handler since it is
dtucker@openbsd.org [Fri, 23 Nov 2018 02:53:57 +0000 (02:53 +0000)] 
upstream: Remove now-unneeded ifdef SIGINFO around handler since it is

now always used for SIGUSR1 even when SIGINFO is not defined.  This will make
things simpler in -portable.

OpenBSD-Regress-ID: 4ff0265b335820b0646d37beb93f036ded0dc43f

6 years agoMove RANDOM_SEED_SIZE outside ifdef.
Darren Tucker [Fri, 23 Nov 2018 03:11:20 +0000 (14:11 +1100)] 
Move RANDOM_SEED_SIZE outside ifdef.

RANDOM_SEED_SIZE is used by both the OpenSSL and non-OpenSSL code
This fixes the build with configureed --without-openssl.

6 years agoResync with OpenBSD by pulling in an ifdef SIGINFO.
Darren Tucker [Thu, 22 Nov 2018 08:59:28 +0000 (19:59 +1100)] 
Resync with OpenBSD by pulling in an ifdef SIGINFO.

6 years agofix configure test for OpenSSL version
Damien Miller [Thu, 22 Nov 2018 23:45:20 +0000 (10:45 +1100)] 
fix configure test for OpenSSL version

square brackets in case statements may be eaten by autoconf.

Report and fix from Filipp Gunbin; tweaked by naddy@

6 years agorefactor libcrypto initialisation
Damien Miller [Thu, 22 Nov 2018 23:40:06 +0000 (10:40 +1100)] 
refactor libcrypto initialisation

Don't call OpenSSL_add_all_algorithms() unless OpenSSL actually
supports it.

Move all libcrypto initialisation to a single function, and call that
from seed_rng() that is called early in each tool's main().

Prompted by patch from Rosen Penev

6 years agoupstream: Output info on SIGUSR1 as well as
dtucker@openbsd.org [Thu, 22 Nov 2018 08:59:11 +0000 (08:59 +0000)] 
upstream: Output info on SIGUSR1 as well as

SIGINFO to resync with portable.  (ID sync only).

OpenBSD-Regress-ID: 699d153e2de22dce51a1b270c40a98472d1a1b16

6 years agoupstream: Append pid to temp files in /var/run and set a cleanup
dtucker@openbsd.org [Thu, 22 Nov 2018 08:48:32 +0000 (08:48 +0000)] 
upstream: Append pid to temp files in /var/run and set a cleanup

trap for them. This allows multiple instances of tests to run without
colliding.

OpenBSD-Regress-ID: 57add105ecdfc54752d8003acdd99eb68c3e0b4c

6 years agoupstream: UsePrivilegeSeparation no is deprecated
dtucker@openbsd.org [Wed, 31 Oct 2018 11:09:27 +0000 (11:09 +0000)] 
upstream: UsePrivilegeSeparation no is deprecated

test "yes" and "sandbox".

OpenBSD-Regress-ID: 80e685ed8990766527dc629b1affc09a75bfe2da

6 years agoupstream: add some knobs:
djm@openbsd.org [Wed, 17 Oct 2018 23:28:05 +0000 (23:28 +0000)] 
upstream: add some knobs:

UNITTEST_FAST?= no     # Skip slow tests (e.g. less intensive fuzzing).
UNITTEST_SLOW?= no     # Include slower tests (e.g. more intensive fuzzing).
UNITTEST_VERBOSE?= no  # Verbose test output (inc. per-test names).

useful if you want to run the tests as a smoke test to exercise the
functionality without waiting for all the fuzzers to run.

OpenBSD-Regress-ID: e04d82ebec86068198cd903acf1c67563c57315e

6 years agoResync Makefile.inc with upstream.
Darren Tucker [Thu, 22 Nov 2018 04:52:26 +0000 (15:52 +1100)] 
Resync Makefile.inc with upstream.

It's unused in -portable, but having it out of sync makes other syncs
fail to apply.

6 years agoupstream: silence (to log level debug2) failure messages when
djm@openbsd.org [Mon, 19 Nov 2018 04:12:32 +0000 (04:12 +0000)] 
upstream: silence (to log level debug2) failure messages when

loading the default hostkeys. Hostkeys explicitly specified in the
configuration or on the command-line are still reported as errors, and
failure to load at least one host key remains a fatal error.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Based on patch from Dag-Erling Smørgrav via
https://github.com/openssh/openssh-portable/pull/103

ok markus@

OpenBSD-Commit-ID: ffc2e35a75d1008effaf05a5e27425041c27b684

6 years agoupstream: Fix inverted logic for redirecting ProxyCommand stderr to
dtucker@openbsd.org [Sun, 18 Nov 2018 22:43:29 +0000 (22:43 +0000)] 
upstream: Fix inverted logic for redirecting ProxyCommand stderr to

/dev/null. Fixes mosh in proxycommand mode that was broken by the previous
ProxyCommand change that was reported by matthieu@. ok djm@ danj@

OpenBSD-Commit-ID: c6fc9641bc250221a0a81c6beb2e72d603f8add6

6 years agoupstream: redirect stderr of ProxyCommands to /dev/null when ssh is
djm@openbsd.org [Fri, 16 Nov 2018 06:17:38 +0000 (06:17 +0000)] 
upstream: redirect stderr of ProxyCommands to /dev/null when ssh is

started with ControlPersist; based on patch from Steffen Prohaska

OpenBSD-Commit-ID: 1bcaa14a03ae80369d31021271ec75dce2597957

6 years agoupstream: make grandparent-parent-child sshbuf chains robust to
djm@openbsd.org [Fri, 16 Nov 2018 06:10:29 +0000 (06:10 +0000)] 
upstream: make grandparent-parent-child sshbuf chains robust to

use-after-free faults if the ancestors are freed before the descendents.
Nothing in OpenSSH uses this deallocation pattern. Reported by Jann Horn

OpenBSD-Commit-ID: d93501d1d2734245aac802a252b9bb2eccdba0f2

6 years agoupstream: use path_absolute() for pathname checks; from Manoj Ampalam
djm@openbsd.org [Fri, 16 Nov 2018 03:26:01 +0000 (03:26 +0000)] 
upstream: use path_absolute() for pathname checks; from Manoj Ampalam

OpenBSD-Commit-ID: 482ce71a5ea5c5f3bc4d00fd719481a6a584d925

6 years agoTest for OPENSSL_init_crypto before using.
Darren Tucker [Fri, 16 Nov 2018 03:11:44 +0000 (14:11 +1100)] 
Test for OPENSSL_init_crypto before using.

Check for the presence of OPENSSL_init_crypto and all the flags we want
before trying to use it (bz#2931).

6 years agoupstream: disallow empty incoming filename or ones that refer to the
djm@openbsd.org [Fri, 16 Nov 2018 03:03:10 +0000 (03:03 +0000)] 
upstream: disallow empty incoming filename or ones that refer to the

current directory; based on report/patch from Harry Sintonen

OpenBSD-Commit-ID: f27651b30eaee2df49540ab68d030865c04f6de9

6 years agoupstream: fix bug in client that was keeping a redundant ssh-agent
djm@openbsd.org [Fri, 16 Nov 2018 02:46:20 +0000 (02:46 +0000)] 
upstream: fix bug in client that was keeping a redundant ssh-agent

socket around for the life of the connection; bz#2912; reported by Simon
Tatham; ok dtucker@

OpenBSD-Commit-ID: 4ded588301183d343dce3e8c5fc1398e35058478

6 years agoupstream: fix bug in HostbasedAcceptedKeyTypes and
djm@openbsd.org [Fri, 16 Nov 2018 02:43:56 +0000 (02:43 +0000)] 
upstream: fix bug in HostbasedAcceptedKeyTypes and

PubkeyAcceptedKeyTypes options. If only RSA-SHA2 siganture types were
specified, then authentication would always fail for RSA keys as the monitor
checks only the base key (not the signature algorithm) type against
*AcceptedKeyTypes. bz#2746; reported by Jakub Jelen; ok dtucker

OpenBSD-Commit-ID: 117bc3dc54578dbdb515a1d3732988cb5b00461b

6 years agoupstream: support a prefix of '@' to suppress echo of sftp batch
djm@openbsd.org [Fri, 16 Nov 2018 02:30:20 +0000 (02:30 +0000)] 
upstream: support a prefix of '@' to suppress echo of sftp batch

commands; bz#2926; ok dtucker@

OpenBSD-Commit-ID: 9d635636bc84aeae796467e059f7634de990a79d

6 years agoupstream: fix markup error (missing blank before delimiter); from
schwarze@openbsd.org [Tue, 13 Nov 2018 07:22:45 +0000 (07:22 +0000)] 
upstream: fix markup error (missing blank before delimiter); from

Mike Frysinger <vapier at gentoo dot org>

OpenBSD-Commit-ID: 1bc5392f795ca86318d695e0947eaf71a5a4f6d9

6 years agoupstream: typo in error message; caught by Debian lintian, via
djm@openbsd.org [Fri, 9 Nov 2018 02:57:58 +0000 (02:57 +0000)] 
upstream: typo in error message; caught by Debian lintian, via

Colin Watson

OpenBSD-Commit-ID: bff614c7bd1f4ca491a84e9b5999f848d0d66758

6 years agoupstream: correct local variable name; from yawang AT microsoft.com
djm@openbsd.org [Fri, 9 Nov 2018 02:56:22 +0000 (02:56 +0000)] 
upstream: correct local variable name; from yawang AT microsoft.com

OpenBSD-Commit-ID: a0c228390856a215bb66319c89cb3959d3af8c87

6 years agoupstream: Import new moduli.
dtucker@openbsd.org [Wed, 31 Oct 2018 11:20:05 +0000 (11:20 +0000)] 
upstream: Import new moduli.

OpenBSD-Commit-ID: c07772f58028fda683ee6abd41c73da3ff70d403

6 years agoupstream: mention ssh-ed25519-cert-v01@openssh.com in list of cert
djm@openbsd.org [Fri, 26 Oct 2018 01:23:03 +0000 (01:23 +0000)] 
upstream: mention ssh-ed25519-cert-v01@openssh.com in list of cert

key type at start of doc

OpenBSD-Commit-ID: b46b0149256d67f05f2d5d01e160634ed1a67324

6 years agoRemove fallback check for /usr/local/ssl.
Darren Tucker [Fri, 16 Nov 2018 02:32:13 +0000 (13:32 +1100)] 
Remove fallback check for /usr/local/ssl.

If configure could not find a working OpenSSL installation it would
fall back to checking in /usr/local/ssl.  This made sense back when
systems did not ship with OpenSSL, but most do and OpenSSL 1.1 doesn't
use that as a default any more.  The fallback behaviour also meant
that if you pointed --with-ssl-dir at a specific directory and it
didn't work, it would silently use either the system libs or the ones
in /usr/local/ssl.  If you want to use /usr/local/ssl you'll need to
pass configure --with-ssl-dir=/usr/local/ssl.  ok djm@

6 years agoFix check for OpenSSL 1.0.1 exactly.
Darren Tucker [Fri, 16 Nov 2018 01:44:01 +0000 (12:44 +1100)] 
Fix check for OpenSSL 1.0.1 exactly.

Both INSTALL and configure.ac claim OpenSSL >= 1.0.1 is supported; fix
compile-time check for 1.0.1 to match.

6 years agoImprove warnings in cygwin service setup.
Darren Tucker [Sun, 11 Nov 2018 04:58:20 +0000 (15:58 +1100)] 
Improve warnings in cygwin service setup.

bz#2922, patch from vinschen at redhat.com.

6 years agoRemove hardcoded service name in cygwin setup.
Darren Tucker [Sun, 11 Nov 2018 04:54:54 +0000 (15:54 +1100)] 
Remove hardcoded service name in cygwin setup.

bz#2922, patch from Christian.Lupien at USherbrooke.ca, sanity check
by vinschen at redhat.com.

6 years agoAC_CHECK_SIZEOF() no longer needs a second argument.
Dag-Erling Smørgrav [Tue, 9 Oct 2018 21:03:40 +0000 (23:03 +0200)] 
AC_CHECK_SIZEOF() no longer needs a second argument.

6 years agoFix error message w/out nistp521.
Manoj Ampalam [Fri, 9 Nov 2018 06:41:59 +0000 (22:41 -0800)] 
Fix error message w/out nistp521.

Correct error message when OpenSSL doesn't support certain ECDSA key
lengths.

6 years agofix compilation with openssl built without ECC
Eneas U de Queiroz [Tue, 9 Oct 2018 19:17:42 +0000 (16:17 -0300)] 
fix compilation with openssl built without ECC

ECDSA code in openssh-compat.h and libressl-api-compat.c needs to be
guarded by OPENSSL_HAS_ECC

Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
6 years agoSimplify OpenSSL 1.1 function checks.
Darren Tucker [Thu, 8 Nov 2018 04:03:11 +0000 (15:03 +1100)] 
Simplify OpenSSL 1.1 function checks.

Replace AC_SEARCH_LIBS checks for OpenSSL 1.1 functions with a single
AC_CHECK_FUNCS.  ok djm@

6 years agoFix pasto for HAVE_EVP_CIPHER_CTX_SET_IV.
Darren Tucker [Mon, 5 Nov 2018 06:31:24 +0000 (17:31 +1100)] 
Fix pasto for HAVE_EVP_CIPHER_CTX_SET_IV.

Prevents unnecessary redefinition.  Patch from mforney at mforney.org.

6 years agoImport new moduli.
Darren Tucker [Wed, 31 Oct 2018 11:21:03 +0000 (22:21 +1100)] 
Import new moduli.

6 years agoUpdate check for minimum OpenSSL version.
Darren Tucker [Sun, 28 Oct 2018 04:18:13 +0000 (15:18 +1100)] 
Update check for minimum OpenSSL version.

6 years agoUpdate required OpenSSL versions to match current.
Darren Tucker [Sun, 28 Oct 2018 04:16:31 +0000 (15:16 +1100)] 
Update required OpenSSL versions to match current.

6 years agoUse detected version functions in openssl compat.
Darren Tucker [Sun, 28 Oct 2018 03:34:12 +0000 (14:34 +1100)] 
Use detected version functions in openssl compat.

Use detected functions in compat layer instead of guessing based on
versions.  Really fixes builds with LibreSSL, not just configure.

6 years agoCheck for the existence of openssl version funcs.
Darren Tucker [Sat, 27 Oct 2018 05:45:59 +0000 (16:45 +1100)] 
Check for the existence of openssl version funcs.

Check for the existence of openssl version functions and use the ones
detected instead of trying to guess based on the int32 version
identifier.  Fixes builds with LibreSSL.

6 years agofix builds on OpenSSL <= 1.0.x
Damien Miller [Fri, 26 Oct 2018 02:43:28 +0000 (13:43 +1100)] 
fix builds on OpenSSL <= 1.0.x

I thought OpenSSL 1.0.x offered the new-style OpenSSL_version_num() API
to obtain version number, but they don't.

6 years agoremove remaining references to SSLeay
Damien Miller [Tue, 23 Oct 2018 06:10:41 +0000 (17:10 +1100)] 
remove remaining references to SSLeay

Prompted by Rosen Penev

6 years agoregen depend
Damien Miller [Tue, 23 Oct 2018 06:10:35 +0000 (17:10 +1100)] 
regen depend

6 years agoupstream: refer to OpenSSL not SSLeay;
djm@openbsd.org [Tue, 23 Oct 2018 05:56:35 +0000 (05:56 +0000)] 
upstream: refer to OpenSSL not SSLeay;

we're old, but we don't have to act it

OpenBSD-Commit-ID: 9ca38d11f8ed19e61a55108d1e892d696cee08ec

6 years agofix compile for openssl 1.0.x w/ --with-ssl-engine
Damien Miller [Mon, 22 Oct 2018 00:22:50 +0000 (11:22 +1100)] 
fix compile for openssl 1.0.x w/ --with-ssl-engine

bz#2921, patch from cotequeiroz

6 years agoInclude openssl compatibility.
Darren Tucker [Mon, 22 Oct 2018 09:05:18 +0000 (20:05 +1100)] 
Include openssl compatibility.

Patch from rosenp at gmail.com via openssh-unix-dev.

6 years agoupstream: when printing certificate contents "ssh-keygen -Lf
djm@openbsd.org [Fri, 19 Oct 2018 03:12:42 +0000 (03:12 +0000)] 
upstream: when printing certificate contents "ssh-keygen -Lf

/path/certificate", include the algorithm that the CA used to sign the cert.

OpenBSD-Commit-ID: 1ea20b5048a851a7a0758dcb9777a211a2c0dddd

6 years agoupstream: struct sockaddr_storage is guaranteed to be large enough,
florian@openbsd.org [Mon, 15 Oct 2018 11:28:50 +0000 (11:28 +0000)] 
upstream: struct sockaddr_storage is guaranteed to be large enough,

no need to check the size. OK kn, deraadt

OpenBSD-Commit-ID: 0aa56e92eb49c79f495b31a5093109ec5841f439

6 years agoRequire OpenSSL 1.1.x series 1.1.0g or greater V_7_9_P1
Damien Miller [Wed, 17 Oct 2018 00:01:20 +0000 (11:01 +1100)] 
Require OpenSSL 1.1.x series 1.1.0g or greater

Previous versions have a bug with EVP_CipherInit() when passed a
NULL EVP_CIPHER, per https://github.com/openssl/openssl/pull/4613

ok dtucker@

6 years agounbreak compilation with --with-ssl-engine
Damien Miller [Tue, 16 Oct 2018 21:12:02 +0000 (08:12 +1100)] 
unbreak compilation with --with-ssl-engine

Missing last argument to OPENSSL_init_crypto()

6 years agoRemove gcc spectre mitigation flags.
Darren Tucker [Tue, 16 Oct 2018 03:45:57 +0000 (14:45 +1100)] 
Remove gcc spectre mitigation flags.

Current impementions of the gcc spectre mitigation flags cause
miscompilations when combined with other flags and do not provide much
protection.  Found by fweimer at redhat.com, ok djm@

6 years agoAvoid deprecated OPENSSL_config when using 1.1.x
Damien Miller [Mon, 15 Oct 2018 23:51:52 +0000 (10:51 +1100)] 
Avoid deprecated OPENSSL_config when using 1.1.x

OpenSSL 1.1.x soft-deprecated OPENSSL_config in favour of
OPENSSL_init_crypto; pointed out by Jakub Jelen

6 years agoDon't avoid our *sprintf replacements.
Darren Tucker [Fri, 12 Oct 2018 05:58:47 +0000 (16:58 +1100)] 
Don't avoid our *sprintf replacements.

Don't let systems with broken printf(3) avoid our replacements
via asprintf(3)/vasprintf(3) calling libc internally.  From djm@

6 years agoCheck if snprintf understands %zu.
Darren Tucker [Fri, 12 Oct 2018 05:43:35 +0000 (16:43 +1100)] 
Check if snprintf understands %zu.

If the platforms snprintf and friends don't understand %zu, use the
compat replacement.  Prevents segfaults on those platforms.

6 years agoremove stale link, tweak
Damien Miller [Thu, 11 Oct 2018 22:48:05 +0000 (09:48 +1100)] 
remove stale link, tweak

6 years agoupdate version numbers ahead of release
Damien Miller [Thu, 11 Oct 2018 22:47:20 +0000 (09:47 +1100)] 
update version numbers ahead of release

6 years agoupstream: don't send new-style rsa-sha2-*-cert-v01@openssh.com names to
djm@openbsd.org [Thu, 11 Oct 2018 03:48:04 +0000 (03:48 +0000)] 
upstream: don't send new-style rsa-sha2-*-cert-v01@openssh.com names to

older OpenSSH that can't handle them. spotted by Adam Eijdenberg; ok dtucker

OpenBSD-Commit-ID: 662bbc402e3d7c9b6c322806269698106a6ae631

6 years agoupdate depends
Damien Miller [Thu, 11 Oct 2018 02:08:59 +0000 (13:08 +1100)] 
update depends

6 years agosome more duplicated key algorithm lines
Damien Miller [Thu, 11 Oct 2018 02:02:11 +0000 (13:02 +1100)] 
some more duplicated key algorithm lines

From Adam Eijdenberg

6 years agofix duplicated algorithm specification lines
Damien Miller [Thu, 11 Oct 2018 00:56:36 +0000 (11:56 +1100)] 
fix duplicated algorithm specification lines

Spotted by Adam Eijdenberg

6 years agoupstream: typo in plain RSA algorithm counterpart names for
djm@openbsd.org [Thu, 11 Oct 2018 00:52:46 +0000 (00:52 +0000)] 
upstream: typo in plain RSA algorithm counterpart names for

certificates; spotted by Adam Eijdenberg; ok dtucker@

OpenBSD-Commit-ID: bfcdeb6f4fc9e7607f5096574c8f118f2e709e00

6 years agocheck pw_passwd != NULL here too
Damien Miller [Thu, 11 Oct 2018 00:29:35 +0000 (11:29 +1100)] 
check pw_passwd != NULL here too

Again, for systems with broken NIS implementations.

Prompted by coolbugcheckers AT gmail.com

6 years agocheck for NULL return from shadow_pw()
Damien Miller [Thu, 11 Oct 2018 00:03:15 +0000 (11:03 +1100)] 
check for NULL return from shadow_pw()

probably unreachable on this platform; pointed out by
coolbugcheckers AT gmail.com

6 years agoupstream: introducing openssh 7.9
deraadt@openbsd.org [Wed, 10 Oct 2018 16:43:49 +0000 (16:43 +0000)] 
upstream: introducing openssh 7.9

OpenBSD-Commit-ID: 42d526a9fe01a40dd299ac58014d3349adf40e25

6 years agosupply callback to PEM_read_bio_PrivateKey
Damien Miller [Wed, 10 Oct 2018 23:29:29 +0000 (10:29 +1100)] 
supply callback to PEM_read_bio_PrivateKey

OpenSSL 1.1.0i has changed the behaviour of their PEM APIs,
so that empty passphrases are interpreted differently. This
probabalistically breaks loading some keys, because the PEM format
is terrible and doesn't include a proper MAC.

Avoid this by providing a basic callback to avoid passing empty
passphrases to OpenSSL in cases where one is required.

Based on patch from Jakub Jelen in bz#2913; ok dtucker@

6 years agoin pick_salt() avoid dereference of NULL passwords
Damien Miller [Wed, 10 Oct 2018 03:57:00 +0000 (14:57 +1100)] 
in pick_salt() avoid dereference of NULL passwords

Apparently some NIS implementations can leave pw->pw_passwd (or the
shadow equivalent) NULL.

bz#2909; based on patch from Todd Eigenschink

6 years agoupstream: Treat all PEM_read_bio_PrivateKey() errors when a passphrase
djm@openbsd.org [Tue, 9 Oct 2018 05:42:23 +0000 (05:42 +0000)] 
upstream: Treat all PEM_read_bio_PrivateKey() errors when a passphrase

is specified as "incorrect passphrase" instead of trying to choose between
that and "invalid format".

libcrypto can return ASN1 parsing errors rather than the expected
decrypt error in certain infrequent cases when trying to decrypt/parse
PEM private keys when supplied with an invalid passphrase.

Report and repro recipe from Thomas Deutschmann in bz#2901

ok markus@

OpenBSD-Commit-ID: b1d4cd92395f9743f81c0d23aab2524109580870

6 years agoupstream: Support using service names for port numbers.
naddy@openbsd.org [Fri, 5 Oct 2018 14:26:09 +0000 (14:26 +0000)] 
upstream: Support using service names for port numbers.

* Try to resolve a port specification with getservbyname(3) if a
 numeric conversion fails.
* Make the "Port" option in ssh_config handle its argument as a
 port rather than a plain integer.

ok dtucker@ deraadt@

OpenBSD-Commit-ID: e7f03633133205ab3dfbc67f9df7475fabae660d

6 years agoupstream: when the peer sends a channel-close message, make sure we
djm@openbsd.org [Thu, 4 Oct 2018 07:47:35 +0000 (07:47 +0000)] 
upstream: when the peer sends a channel-close message, make sure we

close the local extended read fd (stderr) along with the regular read fd
(stdout). Avoids weird stuck processed in multiplexing mode.

Report and analysis by Nelson Elhage and Geoffrey Thomas in bz#2863

ok dtucker@ markus@

OpenBSD-Commit-ID: a48a2467fe938de4de69d2e7193d5fa701f12ae9

6 years agoupstream: factor out channel status formatting from
djm@openbsd.org [Thu, 4 Oct 2018 01:04:52 +0000 (01:04 +0000)] 
upstream: factor out channel status formatting from

channel_open_message() so we can use it in other debug messages

OpenBSD-Commit-ID: 9c3903ca28fcabad57f566c9d0045b41ab7d52ba

6 years agoupstream: include a little more information about the status and
djm@openbsd.org [Thu, 4 Oct 2018 00:10:11 +0000 (00:10 +0000)] 
upstream: include a little more information about the status and

disposition of channel's extended (stderr) fd; makes debugging some things a
bit easier. No behaviour change.

OpenBSD-Commit-ID: 483eb6467dc7d5dbca8eb109c453e7a43075f7ce

6 years agoupstream: explicit_bzero here to be consistent with other kex*.c;
djm@openbsd.org [Thu, 4 Oct 2018 00:04:41 +0000 (00:04 +0000)] 
upstream: explicit_bzero here to be consistent with other kex*.c;

report from coolbugcheckers AT gmail.com

OpenBSD-Commit-ID: a90f146c5b5f5b1408700395e394f70b440856cb

6 years agoupstream: Allow ssh_config IdentityAgent directive to accept
djm@openbsd.org [Wed, 3 Oct 2018 06:38:35 +0000 (06:38 +0000)] 
upstream: Allow ssh_config IdentityAgent directive to accept

environment variable names as well as explicit paths. ok dtucker@

OpenBSD-Commit-ID: 2f0996e103876c53d8c9dd51dcce9889d700767b

6 years agoupstream: mention INFO@openssh.com for sending SIGINFO
djm@openbsd.org [Tue, 2 Oct 2018 12:51:58 +0000 (12:51 +0000)] 
upstream: mention INFO@openssh.com for sending SIGINFO

OpenBSD-Commit-ID: 132471eeb0df658210afd27852fe65131b26e900

6 years agoonly support SIGINFO on systems with SIGINFO
Damien Miller [Tue, 2 Oct 2018 12:49:40 +0000 (22:49 +1000)] 
only support SIGINFO on systems with SIGINFO

6 years agoupstream: Add server support for signalling sessions via the SSH
djm@openbsd.org [Tue, 2 Oct 2018 12:40:07 +0000 (12:40 +0000)] 
upstream: Add server support for signalling sessions via the SSH

channel/ session protocol. Signalling is only supported to sesssions that are
not subsystems and were not started with a forced command.

Long requested in bz#1424

Based on a patch from markus@ and reworked by dtucker@;
ok markus@ dtucker@

OpenBSD-Commit-ID: 4bea826f575862eaac569c4bedd1056a268be1c3