]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
8 years agoFix typo in "socketcall". V_7_5 anongit/V_7_5 github-selfhosted/V_7_5 github/V_7_5
Darren Tucker [Mon, 24 Apr 2017 22:32:27 +0000 (08:32 +1000)] 
Fix typo in "socketcall".

Pointed out by jjelen at redhat.com.

8 years agoDeny socketcall in seccomp filter on ppc64le.
Darren Tucker [Mon, 24 Apr 2017 09:40:31 +0000 (19:40 +1000)] 
Deny socketcall in seccomp filter on ppc64le.

OpenSSL is using socket() calls (in FIPS mode) when handling ECDSA keys
in privsep child. The socket() syscall is already denied in the seccomp
filter, but in ppc64le kernel, it is implemented using socketcall()
syscall, which is not denied yet (only SYS_SHUTDOWN is allowed) and
therefore fails hard.

Patch from jjelen at redhat.com.

8 years agoDon't check privsep user or path when unprivileged
Darren Tucker [Wed, 29 Mar 2017 01:39:39 +0000 (12:39 +1100)] 
Don't check privsep user or path when unprivileged

If running with privsep (mandatory now) as a non-privileged user, we
don't chroot or change to an unprivileged user however we still checked
the existence of the user and directory.  Don't do those checks if we're
not going to use them.  Based in part on a patch from Lionel Fourquaux
via Corinna Vinschen, ok djm@

8 years agoEnable ldns when using ldns-config.
Darren Tucker [Thu, 23 Mar 2017 22:44:56 +0000 (09:44 +1100)] 
Enable ldns when using ldns-config.

Actually enable ldns when attempting to use ldns-config.  bz#2697, patch
from fredrik at fornwall.net.

8 years agoMissing header on Linux/s390
Damien Miller [Wed, 22 Mar 2017 01:43:02 +0000 (12:43 +1100)] 
Missing header on Linux/s390

Patch from Jakub Jelen

8 years agoFix syntax error on Linux/X32
Damien Miller [Mon, 20 Mar 2017 21:47:55 +0000 (08:47 +1100)] 
Fix syntax error on Linux/X32

Patch from Mike Frysinger

8 years agoAdd llabs() implementation. V_7_5_P1
Darren Tucker [Mon, 20 Mar 2017 02:38:27 +0000 (13:38 +1100)] 
Add llabs() implementation.

8 years agocrank version numbers
Damien Miller [Mon, 20 Mar 2017 01:23:04 +0000 (12:23 +1100)] 
crank version numbers

8 years agoupstream commit
djm@openbsd.org [Mon, 20 Mar 2017 01:18:59 +0000 (01:18 +0000)] 
upstream commit

openssh-7.5

Upstream-ID: b8b9a4a949427c393cd868215e1724ceb3467ee5

8 years agoI'm a doofus.
Damien Miller [Mon, 20 Mar 2017 01:07:20 +0000 (12:07 +1100)] 
I'm a doofus.

Unbreak obvious syntax error.

8 years agoon Cygwin, check paths from server for backslashes
Damien Miller [Mon, 20 Mar 2017 00:53:34 +0000 (11:53 +1100)] 
on Cygwin, check paths from server for backslashes

Pointed out by Jann Horn of Google Project Zero

8 years agoYet another synonym for ASCII: "646"
Damien Miller [Mon, 20 Mar 2017 00:48:34 +0000 (11:48 +1100)] 
Yet another synonym for ASCII: "646"

Used by NetBSD; this unbreaks mprintf() and friends there for the C
locale (caught by dtucker@ and his menagerie of test systems).

8 years agocreate test mux socket in /tmp
Damien Miller [Sun, 19 Mar 2017 22:58:34 +0000 (09:58 +1100)] 
create test mux socket in /tmp

Creating the socket in $OBJ could blow past the (quite limited)
path limit for Unix domain sockets. As a bandaid for bz#2660,
reported by Colin Watson; ok dtucker@

8 years agoupstream commit
markus@openbsd.org [Wed, 15 Mar 2017 07:07:39 +0000 (07:07 +0000)] 
upstream commit

disallow KEXINIT before NEWKEYS; ok djm; report by
vegard.nossum at oracle.com

Upstream-ID: 3668852d1f145050e62f1da08917de34cb0c5234

8 years agoInclude includes.h for compat bits.
Darren Tucker [Thu, 16 Mar 2017 03:05:46 +0000 (14:05 +1100)] 
Include includes.h for compat bits.

8 years agoWrap stdint.h in #ifdef HAVE_STDINT_H
Darren Tucker [Thu, 16 Mar 2017 02:45:17 +0000 (13:45 +1100)] 
Wrap stdint.h in #ifdef HAVE_STDINT_H

8 years agoAdapt Cygwin config script to privsep knob removal
Damien Miller [Thu, 16 Mar 2017 00:22:42 +0000 (11:22 +1100)] 
Adapt Cygwin config script to privsep knob removal

Patch from Corinna Vinschen.

8 years agoupstream commit
deraadt@openbsd.org [Wed, 15 Mar 2017 03:52:30 +0000 (03:52 +0000)] 
upstream commit

accidents happen to the best of us; ok djm

Upstream-ID: b7a9dbd71011ffde95e06f6945fe7197dedd1604

8 years agoupstream commit
djm@openbsd.org [Wed, 15 Mar 2017 02:25:09 +0000 (02:25 +0000)] 
upstream commit

fix regression in 7.4: deletion of PKCS#11-hosted keys
would fail unless they were specified by full physical pathname. Report and
fix from Jakub Jelen via bz#2682; ok dtucker@

Upstream-ID: 5b5bc20ca11cacb5d5eb29c3f93fd18425552268

8 years agoupstream commit
djm@openbsd.org [Wed, 15 Mar 2017 02:19:09 +0000 (02:19 +0000)] 
upstream commit

Fix segfault when sshd attempts to load RSA1 keys (can
only happen when protocol v.1 support is enabled for the client). Reported by
Jakub Jelen in bz#2686; ok dtucker

Upstream-ID: 8fdaec2ba4b5f65db1d094f6714ce64b25d871d7

8 years agoupstream commit
djm@openbsd.org [Tue, 14 Mar 2017 07:19:07 +0000 (07:19 +0000)] 
upstream commit

Mark the sshd_config UsePrivilegeSeparation option as
deprecated, effectively making privsep mandatory in sandboxing mode. ok
markus@ deraadt@

(note: this doesn't remove the !privsep code paths, though that will
happen eventually).

Upstream-ID: b4c52666256c4dd865f8ce9431af5d6ce2d74a0a

8 years agoMake seccomp-bpf sandbox work on Linux/X32
Damien Miller [Tue, 14 Mar 2017 07:26:29 +0000 (18:26 +1100)] 
Make seccomp-bpf sandbox work on Linux/X32

Allow clock_gettime syscall with X32 bit masked off. Apparently
this is required for at least some kernel versions. bz#2142
Patch mostly by Colin Watson. ok dtucker@

8 years agorequire OpenSSL >=1.0.1
Damien Miller [Tue, 14 Mar 2017 07:01:52 +0000 (18:01 +1100)] 
require OpenSSL >=1.0.1

8 years agoRemove macro trickery; no binary change
Damien Miller [Tue, 14 Mar 2017 06:48:43 +0000 (17:48 +1100)] 
Remove macro trickery; no binary change

This stops the SC_ALLOW(), SC_ALLOW_ARG() and SC_DENY() macros
prepending __NR_ to the syscall number parameter and just makes
them explicit in the macro invocations.

No binary change in stripped object file before/after.

8 years agosupport ioctls for ICA crypto card on Linux/s390
Damien Miller [Tue, 14 Mar 2017 02:15:18 +0000 (13:15 +1100)] 
support ioctls for ICA crypto card on Linux/s390

Based on patch from Eduardo Barretto; ok dtucker@

8 years agoPlumb conversion test into makefile.
Darren Tucker [Tue, 14 Mar 2017 03:19:36 +0000 (14:19 +1100)] 
Plumb conversion test into makefile.

8 years agoupstream commit
dtucker@openbsd.org [Tue, 14 Mar 2017 01:20:29 +0000 (01:20 +0000)] 
upstream commit

Add unit test for convtime().

Upstream-Regress-ID: 8717bc0ca4c21120f6dd3a1d3b7a363f707c31e1

8 years agoupstream commit
dtucker@openbsd.org [Tue, 14 Mar 2017 01:10:07 +0000 (01:10 +0000)] 
upstream commit

Add ASSERT_LONG_* helpers.

Upstream-Regress-ID: fe15beaea8f5063c7f21b0660c722648e3d76431

8 years agoupstream commit
dtucker@openbsd.org [Tue, 14 Mar 2017 00:55:37 +0000 (00:55 +0000)] 
upstream commit

Fix convtime() overflow test on boundary condition,
spotted by & ok djm.

Upstream-ID: 51f14c507ea87a3022e63f574100613ab2ba5708

8 years agoupstream commit
dtucker@openbsd.org [Tue, 14 Mar 2017 00:25:03 +0000 (00:25 +0000)] 
upstream commit

Check for integer overflow when parsing times in
convtime().  Reported by nicolas.iooss at m4x.org, ok djm@

Upstream-ID: 35e6a4e98f6fa24df50bfb8ba1307cf70e966f13

8 years agoAdd a "unit" target to run only unit tests.
Darren Tucker [Tue, 14 Mar 2017 02:38:15 +0000 (13:38 +1100)] 
Add a "unit" target to run only unit tests.

8 years agoFix weakness in seccomp-bpf sandbox arg inspection
Damien Miller [Tue, 14 Mar 2017 01:24:47 +0000 (12:24 +1100)] 
Fix weakness in seccomp-bpf sandbox arg inspection

Syscall arguments are passed via an array of 64-bit values in struct
seccomp_data, but we were only inspecting the bottom 32 bits and not
even those correctly for BE systems.

Fortunately, the only case argument inspection was used was in the
socketcall filtering so using this for sandbox escape seems
impossible.

ok dtucker

8 years agoupstream commit
djm@openbsd.org [Sat, 11 Mar 2017 23:44:16 +0000 (23:44 +0000)] 
upstream commit

regress tests for loading certificates without public keys;
bz#2617 based on patch from Adam Eijdenberg; ok markus@ dtucker@

Upstream-Regress-ID: 0145d19328ed995b73fe2d9da33596b17429d0d0

8 years agoupstream commit
djm@openbsd.org [Sat, 11 Mar 2017 23:40:26 +0000 (23:40 +0000)] 
upstream commit

allow ssh to use certificates accompanied by a private
key file but no corresponding plain *.pub public key. bz#2617 based on patch
from Adam Eijdenberg; ok dtucker@ markus@

Upstream-ID: 295668dca2c39505281577217583ddd2bd4b00b9

8 years agoupstream commit
markus@openbsd.org [Sat, 11 Mar 2017 13:07:35 +0000 (13:07 +0000)] 
upstream commit

Don't count the initial block twice when computing how
many bytes to discard for the work around for the attacks against CBC-mode.
ok djm@; report from Jean Paul, Kenny, Martin and Torben @ RHUL

Upstream-ID: f445f509a4e0a7ba3b9c0dae7311cb42458dc1e2

8 years agoupstream commit
dtucker@openbsd.org [Fri, 10 Mar 2017 07:18:32 +0000 (07:18 +0000)] 
upstream commit

krl.c

Upstream-ID: fc5e695d5d107d730182e2da7b23f00b489e0ee1

8 years agosync fmt_scaled.c with OpenBSD
Damien Miller [Sat, 11 Mar 2017 23:48:14 +0000 (10:48 +1100)] 
sync fmt_scaled.c with OpenBSD

revision 1.13
date: 2017/03/11 23:37:23;  author: djm;  state: Exp;  lines: +14 -1;  commitid: jnFKyHkB3CEiEZ2R;
fix signed integer overflow in scan_scaled. Found by Nicolas Iooss
using AFL against ssh_config. ok deraadt@ millert@
----------------------------
revision 1.12
date: 2013/11/29 19:00:51;  author: deraadt;  state: Exp;  lines: +6 -5;
fairly simple unsigned char casts for ctype
ok krw
----------------------------
revision 1.11
date: 2012/11/12 14:07:20;  author: halex;  state: Exp;  lines: +4 -2;
make scan_scaled set errno to EINVAL rather than ERANGE if it encounters
an invalid multiplier, like the man page says it should

"looks sensible" deraadt@, ok ian@
----------------------------
revision 1.10
date: 2009/06/20 15:00:04;  author: martynas;  state: Exp;  lines: +4 -4;
use llabs instead of the home-grown version;  and some comment changes
ok ian@, millert@
----------------------------

8 years agoupstream commit
djm@openbsd.org [Fri, 10 Mar 2017 05:01:13 +0000 (05:01 +0000)] 
upstream commit

When updating hostkeys, accept RSA keys if
HostkeyAlgorithms contains any RSA keytype. Previously, ssh could ignore RSA
keys when any of the ssh-rsa-sha2-* methods was enabled in HostkeyAlgorithms
nit ssh-rsa (SHA1 signatures) was not. bz#2650 reported by Luis Ressel; ok
dtucker@

Upstream-ID: c5e8cfee15c42f4a05d126158a0766ea06da79d2

8 years agoupstream commit
djm@openbsd.org [Fri, 10 Mar 2017 04:24:55 +0000 (04:24 +0000)] 
upstream commit

make hostname matching really insensitive to case;
bz#2685, reported by Petr Cerny; ok dtucker@

Upstream-ID: e467622ff154269e36ba8b6c9e3d105e1c4a9253

8 years agoupstream commit
djm@openbsd.org [Fri, 10 Mar 2017 03:52:48 +0000 (03:52 +0000)] 
upstream commit

reword a comment to make it fit 80 columns

Upstream-ID: 4ef509a66b96c7314bbcc87027c2af71fa9d0ba4

8 years agoupstream commit
djm@openbsd.org [Fri, 10 Mar 2017 04:27:32 +0000 (04:27 +0000)] 
upstream commit

better match sshd config parser behaviour: fatal() if
line is overlong, increase line buffer to match sshd's; bz#2651 reported by
Don Fong; ok dtucker@

Upstream-ID: b175ae7e0ba403833f1ee566edf10f67443ccd18

8 years agoupstream commit
djm@openbsd.org [Fri, 10 Mar 2017 04:26:06 +0000 (04:26 +0000)] 
upstream commit

ensure hostname is lower-case before hashing it;
bz#2591 reported by Griff Miller II; ok dtucker@

Upstream-ID: c3b8b93804f376bd00d859b8bcd9fc0d86b4db17

8 years agoupstream commit
djm@openbsd.org [Fri, 10 Mar 2017 04:24:55 +0000 (04:24 +0000)] 
upstream commit

make hostname matching really insensitive to case;
bz#2685, reported by Petr Cerny; ok dtucker@

Upstream-ID: e632b7a9bf0d0558d5ff56dab98b7cca6c3db549

8 years agoupstream commit
dtucker@openbsd.org [Fri, 10 Mar 2017 04:11:00 +0000 (04:11 +0000)] 
upstream commit

Remove old null check from config dumper.  Patch from
jjelen at redhat.com vi bz#2687, ok djm@

Upstream-ID: 824ab71467b78c4bab0dd1b3a38e8bc5f63dd528

8 years agoupstream commit
djm@openbsd.org [Fri, 10 Mar 2017 04:07:20 +0000 (04:07 +0000)] 
upstream commit

fix regression in 7.4 server-sig-algs, where we were
accidentally excluding SHA2 RSA signature methods. bz#2680, patch from Nuno
Goncalves; ok dtucker@

Upstream-ID: 81ac8bfb30960447740b9b8f6a214dcf322f12e8

8 years agoupstream commit
dtucker@openbsd.org [Fri, 10 Mar 2017 03:53:11 +0000 (03:53 +0000)] 
upstream commit

Check for NULL return value from key_new.  Patch from
jjelen at redhat.com via bz#2687, ok djm@

Upstream-ID: 059e33cd43cba88dc8caf0b1936fd4dd88fd5b8e

8 years agoupstream commit
djm@openbsd.org [Fri, 10 Mar 2017 03:52:48 +0000 (03:52 +0000)] 
upstream commit

reword a comment to make it fit 80 columns

Upstream-ID: b4b48b4487c0821d16e812c40c9b09f03b28e349

8 years agoupstream commit
dtucker@openbsd.org [Fri, 10 Mar 2017 03:48:57 +0000 (03:48 +0000)] 
upstream commit

Check for NULL argument to sshkey_read.  Patch from
jjelen at redhat.com via bz#2687, ok djm@

Upstream-ID: c2d00c2ea50c4861d271d0a586f925cc64a87e0e

8 years agoupstream commit
dtucker@openbsd.org [Fri, 10 Mar 2017 03:45:40 +0000 (03:45 +0000)] 
upstream commit

Plug some mem leaks mostly on error paths.  From jjelen
at redhat.com via bz#2687, ok djm@

Upstream-ID: 3fb030149598957a51b7c8beb32bf92cf30c96f2

8 years agoupstream commit
dtucker@openbsd.org [Fri, 10 Mar 2017 03:24:48 +0000 (03:24 +0000)] 
upstream commit

Plug mem leak on GLOB_NOMATCH case.  From jjelen at
redhat.com via bz#2687, ok djm@

Upstream-ID: 8016a7ae97719d3aa55fb723fc2ad3200058340d

8 years agoupstream commit
dtucker@openbsd.org [Fri, 10 Mar 2017 03:22:40 +0000 (03:22 +0000)] 
upstream commit

Plug descriptor leaks of auth_sock.  From jjelen at
redhat.com via bz#2687, ok djm@

Upstream-ID: 248acb99a5ed2fdca37d1aa33c0fcee7be286d88

8 years agoupstream commit
djm@openbsd.org [Fri, 10 Mar 2017 03:18:24 +0000 (03:18 +0000)] 
upstream commit

correctly hash hosts with a port number. Reported by Josh
Powers in bz#2692; ok dtucker@

Upstream-ID: 468e357ff143e00acc05bdd2803a696b3d4b6442

8 years agoupstream commit
djm@openbsd.org [Fri, 10 Mar 2017 03:15:58 +0000 (03:15 +0000)] 
upstream commit

don't truncate off \r\n from long stderr lines; bz#2688,
reported by Brian Dyson; ok dtucker@

Upstream-ID: cdfdc4ba90639af807397ce996153c88af046ca4

8 years agoupstream commit
dtucker@openbsd.org [Fri, 10 Mar 2017 02:59:51 +0000 (02:59 +0000)] 
upstream commit

Validate digest arg in ssh_digest_final; from jjelen at
redhat.com via bz#2687, ok djm@

Upstream-ID: dbe5494dfddfe523fab341a3dab5a79e7338f878

8 years agoCheck for NULL from malloc.
Darren Tucker [Fri, 10 Mar 2017 02:40:18 +0000 (13:40 +1100)] 
Check for NULL from malloc.

Part of bz#2687, from jjelen at redhat.com.

8 years agoIf OSX is using launchd, remove screen no.
Darren Tucker [Fri, 10 Mar 2017 02:22:32 +0000 (13:22 +1100)] 
If OSX is using launchd, remove screen no.

Check for socket with and without screen number.  From Apple and Jakob
Schlyter via bz#2341, with contributions from Ron Frederick, ok djm@

8 years agoupstream commit
djm@openbsd.org [Wed, 8 Mar 2017 12:07:47 +0000 (12:07 +0000)] 
upstream commit

quote [host]:port in generated ProxyJump commandline; the
[ / ] characters can confuse some shells (e.g. zsh). Reported by Lauri
Tirkkonen via bugs@

Upstream-ID: 65cdd161460e1351c3d778e974c1c2a4fa4bc182

8 years agoupstream commit
dtucker@openbsd.org [Mon, 6 Mar 2017 02:03:20 +0000 (02:03 +0000)] 
upstream commit

Check l->hosts before dereferencing; fixes potential null
pointer deref. ok djm@

Upstream-ID: 81c0327c6ec361da794b5c680601195cc23d1301

8 years agoupstream commit
dtucker@openbsd.org [Mon, 6 Mar 2017 00:44:51 +0000 (00:44 +0000)] 
upstream commit

linenum is unsigned long so use %lu in log formats.  ok
deraadt@

Upstream-ID: 9dc582d9bb887ebe0164e030d619fc20b1a4ea08

8 years agoupstream commit
djm@openbsd.org [Fri, 3 Mar 2017 06:13:11 +0000 (06:13 +0000)] 
upstream commit

fix ssh-keygen -H accidentally corrupting known_hosts that
contained already-hashed entries. HKF_MATCH_HOST_HASHED is only set by
hostkeys_foreach() when hostname matching is in use, so we need to look for
the hash marker explicitly.

Upstream-ID: da82ad653b93e8a753580d3cf5cd448bc2520528

8 years agoupstream commit
djm@openbsd.org [Tue, 28 Feb 2017 06:10:08 +0000 (06:10 +0000)] 
upstream commit

small memleak: free fd_set on connection timeout (though
we are heading to exit anyway). From Tom Rix in bz#2683

Upstream-ID: 10e3dadbb8199845b66581473711642d9e6741c4

8 years agoupstream commit
jmc@openbsd.org [Mon, 27 Feb 2017 14:30:33 +0000 (14:30 +0000)] 
upstream commit

errant dot; from klemens nanni

Upstream-ID: 83d93366a5acf47047298c5d3ebc5e7426f37921

8 years agoupstream commit
djm@openbsd.org [Fri, 24 Feb 2017 03:16:34 +0000 (03:16 +0000)] 
upstream commit

might as well set the listener socket CLOEXEC

Upstream-ID: 9c538433d6a0ca79f5f21decc5620e46fb68ab57

8 years agoupstream commit
djm@openbsd.org [Sun, 19 Feb 2017 00:11:29 +0000 (00:11 +0000)] 
upstream commit

add test cases for C locale; ok schwarze@

Upstream-Regress-ID: 783d75de35fbc923d46e2a5e6cee30f8f381ba87

8 years agoupstream commit
djm@openbsd.org [Sun, 19 Feb 2017 00:10:57 +0000 (00:10 +0000)] 
upstream commit

Add a common nl_langinfo(CODESET) alias for US-ASCII
"ANSI_X3.4-1968" that is used by Linux. Fixes mprintf output truncation for
non-UTF-8 locales on Linux spotted by dtucker@; ok deraadt@ schwarze@

Upstream-ID: c6808956ebffd64066f9075d839f74ff0dd60719

8 years agoupstream commit
dtucker@openbsd.org [Tue, 7 Feb 2017 23:03:11 +0000 (23:03 +0000)] 
upstream commit

Remove deprecated SSH1 options RSAAuthentication and
RhostsRSAAuthentication from regression test sshd_config.

Upstream-Regress-ID: 8066b753d9dce7cf02ff87af5c727ff680d99491

8 years agoupstream commit
dtucker@openbsd.org [Fri, 17 Feb 2017 02:32:05 +0000 (02:32 +0000)] 
upstream commit

Do not show rsa1 key type in usage when compiled without
SSH1 support.

Upstream-ID: 068b5c41357a02f319957746fa4e84ea73960f57

8 years agoupstream commit
dtucker@openbsd.org [Fri, 17 Feb 2017 02:31:14 +0000 (02:31 +0000)] 
upstream commit

ifdef out "rsa1" from the list of supported keytypes when
compiled without SSH1 support.  Found by kdunlop at guralp.com, ok djm@

Upstream-ID: cea93a26433d235bb1d64b1d990f19a9c160a70f

8 years agoupstream commit
djm@openbsd.org [Fri, 17 Feb 2017 02:04:15 +0000 (02:04 +0000)] 
upstream commit

For ProxyJump/-J, surround host name with brackets to
allow literal IPv6 addresses. From Dick Visser; ok dtucker@

Upstream-ID: 3a5d3b0171250daf6a5235e91bce09c1d5746bf1

8 years agoupstream commit
jsg@openbsd.org [Wed, 15 Feb 2017 23:38:31 +0000 (23:38 +0000)] 
upstream commit

Fix memory leaks in match_filter_list() error paths.

ok dtucker@ markus@

Upstream-ID: c7f96ac0877f6dc9188bbc908100a8d246cc7f0e

8 years agoupstream commit
djm@openbsd.org [Wed, 15 Feb 2017 01:46:47 +0000 (01:46 +0000)] 
upstream commit

fix division by zero crash in "df" output when server
returns zero total filesystem blocks/inodes. Spotted by Guido Vranken; ok
dtucker@

Upstream-ID: 6fb6c2ae6b289aa07b6232dbc0be54682ef5419f

8 years agoifdef out EVP_R_PRIVATE_KEY_DECODE_ERROR
Darren Tucker [Sun, 12 Feb 2017 04:45:15 +0000 (15:45 +1100)] 
ifdef out EVP_R_PRIVATE_KEY_DECODE_ERROR

EVP_R_PRIVATE_KEY_DECODE_ERROR was added in OpenSSL 1.0.0 so ifdef out
for the benefit of OpenSSL versions prior to that.

8 years agoupstream commit
djm@openbsd.org [Fri, 10 Feb 2017 04:34:50 +0000 (04:34 +0000)] 
upstream commit

bring back r1.34 that was backed out for problems loading
public keys:

translate OpenSSL error codes to something more
meaninful; bz#2522 reported by Jakub Jelen, ok dtucker@

with additional fix from Jakub Jelen to solve the backout.
bz#2525 bz#2523 re-ok dtucker@

Upstream-ID: a9d5bc0306f4473d9b4f4484f880e95f3c1cc031

8 years agoupstream commit
djm@openbsd.org [Fri, 10 Feb 2017 03:36:40 +0000 (03:36 +0000)] 
upstream commit

Sanitise escape sequences in key comments sent to printf
but preserve valid UTF-8 when the locale supports it; bz#2520 ok dtucker@

Upstream-ID: e8eed28712ba7b22d49be534237eed019875bd1e

8 years agoupstream commit
millert@openbsd.org [Wed, 8 Feb 2017 20:32:43 +0000 (20:32 +0000)] 
upstream commit

Avoid printf %s NULL.  From semarie@, OK djm@

Upstream-ID: 06beef7344da0208efa9275d504d60d2a5b9266c

8 years agoupstream commit
djm@openbsd.org [Mon, 6 Feb 2017 09:22:51 +0000 (09:22 +0000)] 
upstream commit

Restore \r\n newline sequence for server ident string. The CR
got lost in the flensing of SSHv1. Pointed out by Stef Bon

Upstream-ID: 5333fd43ce5396bf5999496096fac5536e678fac

8 years agoupstream commit
djm@openbsd.org [Fri, 3 Feb 2017 23:01:42 +0000 (23:01 +0000)] 
upstream commit

unit test for match_filter_list() function; still want a
better name for this...

Upstream-Regress-ID: 840ad6118552c35111f0a897af9c8d93ab8de92a

8 years agoupstream commit
djm@openbsd.org [Fri, 3 Feb 2017 23:05:57 +0000 (23:05 +0000)] 
upstream commit

use ssh_packet_set_log_preamble() to include connection
username in packet log messages, e.g.

Connection closed by invalid user foo 10.1.1.1 port 44056 [preauth]

ok markus@ bz#113

Upstream-ID: 3591b88bdb5416d6066fb3d49d8fff2375bf1a15

8 years agoupstream commit
djm@openbsd.org [Fri, 3 Feb 2017 23:03:33 +0000 (23:03 +0000)] 
upstream commit

add ssh_packet_set_log_preamble() to allow inclusion of a
preamble string in disconnect messages; ok markus@

Upstream-ID: 34cb41182cd76d414c214ccb01c01707849afead

8 years agoupstream commit
djm@openbsd.org [Fri, 3 Feb 2017 23:01:19 +0000 (23:01 +0000)] 
upstream commit

support =- for removing methods from algorithms lists,
e.g. Ciphers=-*cbc; suggested by Cristian Ionescu-Idbohrn in bz#2671 "I like
it" markus@

Upstream-ID: c78c38f9f81a963b33d0eade559f6048add24a6d

8 years agoupstream commit
djm@openbsd.org [Fri, 3 Feb 2017 05:05:56 +0000 (05:05 +0000)] 
upstream commit

allow form-feed characters at EOL; bz#2431 ok dtucker@

Upstream-ID: 1f453afaba6da2ae69d6afdf1ae79a917552f1a2

8 years agoprefer to use ldns-config to find libldns
Damien Miller [Fri, 3 Feb 2017 05:01:22 +0000 (16:01 +1100)] 
prefer to use ldns-config to find libldns

Should fix bz#2603 - "Build with ldns and without kerberos support
fails if ldns compiled with kerberos support" by including correct
cflags/libs

ok dtucker@

8 years agoupstream commit
dtucker@openbsd.org [Fri, 3 Feb 2017 02:56:00 +0000 (02:56 +0000)] 
upstream commit

Make ssh_packet_set_rekey_limits take u32 for the number of
seconds until rekeying (negative values are rejected at config parse time).
This allows the removal of some casts and a signed vs unsigned comparison
warning.

rekey_time is cast to int64 for the comparison which is a no-op
on OpenBSD, but should also do the right thing in -portable on
anything still using 32bit time_t (until the system time actually
wraps, anyway).

some early guidance deraadt@, ok djm@

Upstream-ID: c9f18613afb994a07e7622eb326f49de3d123b6c

8 years agoupstream commit
jsg@openbsd.org [Thu, 2 Feb 2017 10:54:25 +0000 (10:54 +0000)] 
upstream commit

In vasnmprintf() return an error if malloc fails and
don't set a function argument to the address of free'd memory.

ok djm@

Upstream-ID: 1efffffff2f51d53c9141f245b90ac23d33b9779

8 years agoupstream commit
dtucker@openbsd.org [Wed, 1 Feb 2017 02:59:09 +0000 (02:59 +0000)] 
upstream commit

Return true reason for port forwarding failures where
feasible rather than always "administratively prohibited".  bz#2674, ok djm@

Upstream-ID: d901d9887951774e604ca970e1827afaaef9e419

8 years agoupstream commit
dtucker@openbsd.org [Mon, 30 Jan 2017 23:27:39 +0000 (23:27 +0000)] 
upstream commit

Small correction to the known_hosts section on when it is
updated. Patch from lkppo at free.fr some time ago, pointed out by smallm at
sdf.org

Upstream-ID: 1834d7af179dea1a12ad2137f84566664af225d5

8 years agoRemove _XOPEN_SOURCE from wide char detection.
Darren Tucker [Fri, 3 Feb 2017 03:10:34 +0000 (14:10 +1100)] 
Remove _XOPEN_SOURCE from wide char detection.

Having _XOPEN_SOURCE unconditionally causes problems on some platforms
and configurations, notably Solaris 64-bit binaries.  It was there for
the benefit of Linux put the required bits in the *-*linux* section.

Patch from yvoinov at gmail.com.

8 years agoupstream commit
djm@openbsd.org [Mon, 30 Jan 2017 05:22:14 +0000 (05:22 +0000)] 
upstream commit

fully unbreak: some $SSH invocations did not have -F
specified and could pick up the ~/.ssh/config of the user running the tests

Upstream-Regress-ID: f362d1892c0d3e66212d5d3fc02d915c58ef6b89

8 years agoupstream commit
djm@openbsd.org [Mon, 30 Jan 2017 04:54:07 +0000 (04:54 +0000)] 
upstream commit

partially unbreak: was not specifying hostname on some
$SSH invocations

Upstream-Regress-ID: bc8a5e98e57bad0a92ef4f34ed91c1d18294e2cc

8 years agoupstream commit
djm@openbsd.org [Mon, 30 Jan 2017 01:03:00 +0000 (01:03 +0000)] 
upstream commit

revise keys/principals command hang fix (bz#2655) to
consume entire output, avoiding sending SIGPIPE to subprocesses early; ok
dtucker@

Upstream-ID: 7cb04b31a61f8c78c4e48ceededcd2fd5c4ee1bc

8 years agoupstream commit
djm@openbsd.org [Mon, 30 Jan 2017 00:38:50 +0000 (00:38 +0000)] 
upstream commit

small cleanup post SSHv1 removal:

remove SSHv1-isms in commented examples

reorder token table to group deprecated and compile-time conditional tokens
better

fix config dumping code for some compile-time conditional options that
weren't being correctly skipped (SSHv1 and PKCS#11)

Upstream-ID: f2e96b3cb3158d857c5a91ad2e15925df3060105

8 years agoupstream commit
djm@openbsd.org [Mon, 30 Jan 2017 00:34:01 +0000 (00:34 +0000)] 
upstream commit

some explicit NULL tests when dumping configured
forwardings; from Karsten Weiss

Upstream-ID: 40957b8dea69672b0e50df6b4a91a94e3e37f72d

8 years agoupstream commit
djm@openbsd.org [Mon, 30 Jan 2017 00:32:28 +0000 (00:32 +0000)] 
upstream commit

misplaced braces in test; from Karsten Weiss

Upstream-ID: f7b794074d3aae8e35b69a91d211c599c94afaae

8 years agoupstream commit
djm@openbsd.org [Mon, 30 Jan 2017 00:32:03 +0000 (00:32 +0000)] 
upstream commit

don't dereference authctxt before testing != NULL, it
causes compilers to make assumptions; from Karsten Weiss

Upstream-ID: 794243aad1e976ebc717885b7a97a25e00c031b2

8 years agoupstream commit
djm@openbsd.org [Fri, 6 Jan 2017 02:51:16 +0000 (02:51 +0000)] 
upstream commit

use correct ssh-add program; bz#2654, from Colin Watson

Upstream-Regress-ID: 7042a36e1bdaec6562f6e57e9d047efe9c7a6030

8 years agoupstream commit
dtucker@openbsd.org [Fri, 6 Jan 2017 02:26:10 +0000 (02:26 +0000)] 
upstream commit

Account for timeouts in the integrity tests as failures.

If the first test in a series for a given MAC happens to modify the low
bytes of a packet length, then ssh will time out and this will be
interpreted as a test failure.  Patch from cjwatson at debian.org via
bz#2658.

Upstream-Regress-ID: e7467613b0badedaa300bc6fc7495ec2f44e2fb9

8 years agoupstream commit
dtucker@openbsd.org [Fri, 6 Jan 2017 02:09:25 +0000 (02:09 +0000)] 
upstream commit

Make forwarding test less racy by using unix domain
sockets instead of TCP ports where possible.  Patch from cjwatson at
debian.org via bz#2659.

Upstream-Regress-ID: 4756375aac5916ef9d25452a1c1d5fa9e90299a9

8 years agoupstream commit
dtucker@openbsd.org [Sun, 29 Jan 2017 21:35:23 +0000 (21:35 +0000)] 
upstream commit

Fix typo in ~C error message for bad port forward
cancellation. bz#2672, from Brad Marshall via Colin Watson and Ubuntu's
bugtracker.

Upstream-ID: 0d4a7e5ead6cc59c9a44b4c1e5435ab3aada09af

8 years agoupstream commit
guenther@openbsd.org [Sat, 21 Jan 2017 11:32:04 +0000 (11:32 +0000)] 
upstream commit

The POSIX APIs that that sockaddrs all ignore the s*_len
field in the incoming socket, so userspace doesn't need to set it unless it
has its own reasons for tracking the size along with the sockaddr.

ok phessler@ deraadt@ florian@

Upstream-ID: ca6e49e2f22f2b9e81d6d924b90ecd7e422e7437

8 years agoupstream commit
jmc@openbsd.org [Fri, 6 Jan 2017 16:28:12 +0000 (16:28 +0000)] 
upstream commit

keep the tokens list sorted;

Upstream-ID: b96239dae4fb3aa94146bb381afabcc7740a1638