Commit Graph

8646 Commits

Author SHA1 Message Date
djm@openbsd.org
096fb65084 upstream commit
remove /usr/bin/time calls around tests, makes diffing test
runs harder. Based on patch from Mike Frysinger

Upstream-Regress-ID: 81c1083b14dcf473b23d2817882f40b346ebc95c
2017-03-21 09:09:59 +11:00
Damien Miller
6b853c6f8b Fix syntax error on Linux/X32
Patch from Mike Frysinger
2017-03-21 08:47:55 +11:00
Darren Tucker
d38f05dbdd Add llabs() implementation. 2017-03-20 13:39:27 +11:00
Damien Miller
72536316a2 crank version numbers 2017-03-20 12:23:04 +11:00
djm@openbsd.org
3be52bc36b upstream commit
openssh-7.5

Upstream-ID: b8b9a4a949427c393cd868215e1724ceb3467ee5
2017-03-20 12:20:19 +11:00
Damien Miller
db84e52fe9 I'm a doofus.
Unbreak obvious syntax error.
2017-03-20 12:07:20 +11:00
Damien Miller
89f04852db on Cygwin, check paths from server for backslashes
Pointed out by Jann Horn of Google Project Zero
2017-03-20 11:53:34 +11:00
Damien Miller
7ef1f9bafc 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).
2017-03-20 11:51:03 +11:00
Damien Miller
9165abfea3 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@
2017-03-20 10:12:18 +11:00
markus@openbsd.org
2adbe1e63b upstream commit
disallow KEXINIT before NEWKEYS; ok djm; report by
vegard.nossum at oracle.com

Upstream-ID: 3668852d1f145050e62f1da08917de34cb0c5234
2017-03-17 17:12:44 +11:00
Darren Tucker
2fbf91684d Include includes.h for compat bits. 2017-03-16 14:05:46 +11:00
Darren Tucker
b55f634e96 Wrap stdint.h in #ifdef HAVE_STDINT_H 2017-03-16 13:45:17 +11:00
Damien Miller
55a1117d73 Adapt Cygwin config script to privsep knob removal
Patch from Corinna Vinschen.
2017-03-16 11:22:42 +11:00
deraadt@openbsd.org
1a321bfdb9 upstream commit
accidents happen to the best of us; ok djm

Upstream-ID: b7a9dbd71011ffde95e06f6945fe7197dedd1604
2017-03-15 15:04:14 +11:00
djm@openbsd.org
25f837646b 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
2017-03-15 13:34:20 +11:00
djm@openbsd.org
a8c5eeacf0 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
2017-03-15 13:34:20 +11:00
djm@openbsd.org
66705948c0 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
2017-03-15 11:09:18 +11:00
Damien Miller
f86586b03f 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@
2017-03-14 18:26:29 +11:00
Damien Miller
2429cf78dd require OpenSSL >=1.0.1 2017-03-14 18:01:52 +11:00
Damien Miller
e3ea335abe 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.
2017-03-14 17:53:17 +11:00
Damien Miller
5f1596e11d support ioctls for ICA crypto card on Linux/s390
Based on patch from Eduardo Barretto; ok dtucker@
2017-03-14 17:53:17 +11:00
Darren Tucker
b1b22dd0df Plumb conversion test into makefile. 2017-03-14 14:19:36 +11:00
dtucker@openbsd.org
f57783f1dd upstream commit
Add unit test for convtime().

Upstream-Regress-ID: 8717bc0ca4c21120f6dd3a1d3b7a363f707c31e1
2017-03-14 13:45:14 +11:00
dtucker@openbsd.org
8884b7247d upstream commit
Add ASSERT_LONG_* helpers.

Upstream-Regress-ID: fe15beaea8f5063c7f21b0660c722648e3d76431
2017-03-14 13:45:14 +11:00
dtucker@openbsd.org
c6774d2118 upstream commit
Fix convtime() overflow test on boundary condition,
spotted by & ok djm.

Upstream-ID: 51f14c507ea87a3022e63f574100613ab2ba5708
2017-03-14 13:45:14 +11:00
dtucker@openbsd.org
f5746b40cf upstream commit
Check for integer overflow when parsing times in
convtime().  Reported by nicolas.iooss at m4x.org, ok djm@

Upstream-ID: 35e6a4e98f6fa24df50bfb8ba1307cf70e966f13
2017-03-14 13:45:14 +11:00
Darren Tucker
f5907982f4 Add a "unit" target to run only unit tests. 2017-03-14 13:38:15 +11:00
Damien Miller
9e96b41682 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
2017-03-14 12:41:53 +11:00
djm@openbsd.org
8ff3fc3f2f 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
2017-03-12 10:50:54 +11:00
djm@openbsd.org
1e24552716 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
2017-03-12 10:50:19 +11:00
markus@openbsd.org
0fb1a617a0 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
2017-03-12 10:50:19 +11:00
dtucker@openbsd.org
ef653dd5bd upstream commit
krl.c

Upstream-ID: fc5e695d5d107d730182e2da7b23f00b489e0ee1
2017-03-12 10:50:18 +11:00
Damien Miller
d94c1dfef2 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@
----------------------------
2017-03-12 10:48:14 +11:00
djm@openbsd.org
894221a63f 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
2017-03-10 16:02:46 +11:00
djm@openbsd.org
dd3e229866 upstream commit
make hostname matching really insensitive to case;
bz#2685, reported by Petr Cerny; ok dtucker@

Upstream-ID: e467622ff154269e36ba8b6c9e3d105e1c4a9253
2017-03-10 15:35:40 +11:00
djm@openbsd.org
77a9be9446 upstream commit
reword a comment to make it fit 80 columns

Upstream-ID: 4ef509a66b96c7314bbcc87027c2af71fa9d0ba4
2017-03-10 15:35:40 +11:00
djm@openbsd.org
61b8ef6a66 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
2017-03-10 15:35:39 +11:00
djm@openbsd.org
db2597207e upstream commit
ensure hostname is lower-case before hashing it;
bz#2591 reported by Griff Miller II; ok dtucker@

Upstream-ID: c3b8b93804f376bd00d859b8bcd9fc0d86b4db17
2017-03-10 15:35:39 +11:00
djm@openbsd.org
df9936936c upstream commit
make hostname matching really insensitive to case;
bz#2685, reported by Petr Cerny; ok dtucker@

Upstream-ID: e632b7a9bf0d0558d5ff56dab98b7cca6c3db549
2017-03-10 15:35:39 +11:00
dtucker@openbsd.org
67eed24bfa upstream commit
Remove old null check from config dumper.  Patch from
jjelen at redhat.com vi bz#2687, ok djm@

Upstream-ID: 824ab71467b78c4bab0dd1b3a38e8bc5f63dd528
2017-03-10 15:35:39 +11:00
djm@openbsd.org
183ba55aaa 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
2017-03-10 15:35:39 +11:00
dtucker@openbsd.org
66be4fe8c4 upstream commit
Check for NULL return value from key_new.  Patch from
jjelen at redhat.com via bz#2687, ok djm@

Upstream-ID: 059e33cd43cba88dc8caf0b1936fd4dd88fd5b8e
2017-03-10 15:35:39 +11:00
djm@openbsd.org
ec2892b5c7 upstream commit
reword a comment to make it fit 80 columns

Upstream-ID: b4b48b4487c0821d16e812c40c9b09f03b28e349
2017-03-10 15:35:39 +11:00
dtucker@openbsd.org
7fadbb6da3 upstream commit
Check for NULL argument to sshkey_read.  Patch from
jjelen at redhat.com via bz#2687, ok djm@

Upstream-ID: c2d00c2ea50c4861d271d0a586f925cc64a87e0e
2017-03-10 15:35:38 +11:00
dtucker@openbsd.org
5a06b9e019 upstream commit
Plug some mem leaks mostly on error paths.  From jjelen
at redhat.com via bz#2687, ok djm@

Upstream-ID: 3fb030149598957a51b7c8beb32bf92cf30c96f2
2017-03-10 15:35:38 +11:00
dtucker@openbsd.org
f6edbe9feb upstream commit
Plug mem leak on GLOB_NOMATCH case.  From jjelen at
redhat.com via bz#2687, ok djm@

Upstream-ID: 8016a7ae97719d3aa55fb723fc2ad3200058340d
2017-03-10 15:25:11 +11:00
dtucker@openbsd.org
566b3a46e8 upstream commit
Plug descriptor leaks of auth_sock.  From jjelen at
redhat.com via bz#2687, ok djm@

Upstream-ID: 248acb99a5ed2fdca37d1aa33c0fcee7be286d88
2017-03-10 15:25:11 +11:00
djm@openbsd.org
8a2834454c upstream commit
correctly hash hosts with a port number. Reported by Josh
Powers in bz#2692; ok dtucker@

Upstream-ID: 468e357ff143e00acc05bdd2803a696b3d4b6442
2017-03-10 15:25:11 +11:00
djm@openbsd.org
9747b9c742 upstream commit
don't truncate off \r\n from long stderr lines; bz#2688,
reported by Brian Dyson; ok dtucker@

Upstream-ID: cdfdc4ba90639af807397ce996153c88af046ca4
2017-03-10 15:25:11 +11:00
dtucker@openbsd.org
4a4b75adac upstream commit
Validate digest arg in ssh_digest_final; from jjelen at
redhat.com via bz#2687, ok djm@

Upstream-ID: dbe5494dfddfe523fab341a3dab5a79e7338f878
2017-03-10 15:23:17 +11:00