Damien Miller [Sun, 20 Apr 2014 03:44:47 +0000 (13:44 +1000)]
- (djm) [bufaux.c compat.c compat.h sshconnect2.c sshd.c version.h]
OpenSSH 6.5 and 6.6 sometimes encode a value used in the curve25519
key exchange incorrectly, causing connection failures about 0.2% of
the time when this method is used against a peer that implements
the method properly.
Fix the problem and disable the curve25519 KEX when speaking to
OpenSSH 6.5 or 6.6. This version will identify itself as 6.6.1
to enable the compatability code.
Damien Miller [Mon, 3 Mar 2014 22:35:17 +0000 (09:35 +1100)]
- djm@cvs.openbsd.org 2014/03/03 22:22:30
[session.c]
ignore enviornment variables with embedded '=' or '\0' characters;
spotted by Jann Horn; ok deraadt@
Damien Miller [Thu, 27 Feb 2014 23:25:16 +0000 (10:25 +1100)]
- djm@cvs.openbsd.org 2014/02/27 21:21:25
[agent-ptrace.sh agent.sh]
keep return values that are printed in error messages;
from portable
(Id sync only)
Damien Miller [Thu, 27 Feb 2014 23:24:11 +0000 (10:24 +1100)]
- djm@cvs.openbsd.org 2014/02/27 20:04:16
[login-timeout.sh]
remove any existing LoginGraceTime from sshd_config before adding
a specific one for the test back in
Damien Miller [Thu, 27 Feb 2014 23:23:26 +0000 (10:23 +1100)]
- djm@cvs.openbsd.org 2014/01/26 10:49:17
[scp-ssh-wrapper.sh scp.sh]
make sure $SCP is tested on the remote end rather than whichever one
happens to be in $PATH; from portable
(Id sync only)
Damien Miller [Thu, 27 Feb 2014 23:22:37 +0000 (10:22 +1100)]
- djm@cvs.openbsd.org 2014/01/26 10:22:10
[regress/cert-hostkey.sh]
automatically generate revoked keys from listed keys rather than
manually specifying each type; from portable
(Id sync only)
Damien Miller [Thu, 27 Feb 2014 23:19:11 +0000 (10:19 +1100)]
- dtucker@cvs.openbsd.org 2014/01/19 23:43:02
[regress/sftp-chroot.sh]
Don't use -q on sftp as it suppresses logging, instead redirect the
output to the regress logfile.
Damien Miller [Thu, 27 Feb 2014 23:01:28 +0000 (10:01 +1100)]
- djm@cvs.openbsd.org 2014/02/27 22:47:07
[sshd_config.5]
bz#2184 clarify behaviour of a keyword that appears in multiple
matching Match blocks; ok dtucker@
Damien Miller [Thu, 27 Feb 2014 23:00:27 +0000 (10:00 +1100)]
- djm@cvs.openbsd.org 2014/02/27 00:41:49
[bufbn.c]
fix unsigned overflow that could lead to reading a short ssh protocol
1 bignum value; found by Ben Hawkes; ok deraadt@
Damien Miller [Wed, 26 Feb 2014 23:17:49 +0000 (10:17 +1100)]
- djm@cvs.openbsd.org 2014/02/26 20:28:44
[auth2-gss.c gss-serv.c ssh-gss.h sshd.c]
bz#2107 - cache OIDs of supported GSSAPI mechanisms before privsep
sandboxing, as running this code in the sandbox can cause violations;
ok markus@
Damien Miller [Mon, 24 Feb 2014 04:57:55 +0000 (15:57 +1100)]
- djm@cvs.openbsd.org 2014/02/23 20:11:36
[readconf.c readconf.h ssh.c ssh_config.5]
reparse ssh_config and ~/.ssh/config if hostname canonicalisation changes
the hostname. This allows users to write configurations that always
refer to canonical hostnames, e.g.
CanonicalizeHostname yes
CanonicalDomains int.example.org example.org
CanonicalizeFallbackLocal no
Host *.int.example.org
Compression off
Host *.example.org
User djm
Damien Miller [Mon, 24 Feb 2014 04:56:45 +0000 (15:56 +1100)]
- djm@cvs.openbsd.org 2014/02/22 01:32:19
[readconf.c]
when processing Match blocks, skip 'exec' clauses if previous predicates
failed to match; ok markus@
Damien Miller [Mon, 24 Feb 2014 04:56:07 +0000 (15:56 +1100)]
- djm@cvs.openbsd.org 2014/02/15 23:05:36
[channels.c]
avoid spurious "getsockname failed: Bad file descriptor" errors in ssh -W;
bz#2200, debian#738692 via Colin Watson; ok dtucker@
Damien Miller [Thu, 6 Feb 2014 22:24:33 +0000 (09:24 +1100)]
- djm@cvs.openbsd.org 2014/02/06 22:21:01
[sshconnect.c]
in ssh_create_socket(), only do the getaddrinfo for BindAddress when
BindAddress is actually specified. Fixes regression in 6.5 for
UsePrivilegedPort=yes; patch from Corinna Vinschen
Damien Miller [Thu, 6 Feb 2014 22:24:14 +0000 (09:24 +1100)]
- naddy@cvs.openbsd.org 2014/02/05 20:13:25
[ssh-keygen.1 ssh-keygen.c]
tweak synopsis: calling ssh-keygen without any arguments is fine; ok jmc@
while here, fix ordering in usage(); requested by jmc@
Damien Miller [Tue, 4 Feb 2014 23:33:45 +0000 (10:33 +1100)]
- (djm) [sandbox-capsicum.c] Don't fatal if Capsicum is offered by
headers/libc but not supported by the kernel. Patch from Loganaden
Velvindron @ AfriNIC
Damien Miller [Tue, 4 Feb 2014 00:26:34 +0000 (11:26 +1100)]
- djm@cvs.openbsd.org 2014/02/04 00:24:29
[ssh.c]
delay lowercasing of hostname until right before hostname
canonicalisation to unbreak case-sensitive matching of ssh_config;
reported by Ike Devolder; ok markus@
Damien Miller [Tue, 4 Feb 2014 00:26:04 +0000 (11:26 +1100)]
- djm@cvs.openbsd.org 2014/02/04 00:24:29
[ssh.c]
delay lowercasing of hostname until right before hostname
canonicalisation to unbreak case-sensitive matching of ssh_config;
reported by Ike Devolder; ok markus@
Damien Miller [Tue, 4 Feb 2014 00:13:54 +0000 (11:13 +1100)]
- djm@cvs.openbsd.org 2014/01/30 22:26:14
[sandbox-systrace.c]
allow shutdown(2) syscall in sandbox - it may be called by packet_close()
from portable
(Id sync only; change is already in portable)
Damien Miller [Tue, 4 Feb 2014 00:10:01 +0000 (11:10 +1100)]
- djm@cvs.openbsd.org 2014/01/29 00:19:26
[sshd.c]
use kill(0, ...) instead of killpg(0, ...); on most operating systems
they are equivalent, but SUSv2 describes the latter as having undefined
behaviour; from portable; ok dtucker
(Id sync only; change is already in portable)
Damien Miller [Tue, 4 Feb 2014 00:02:42 +0000 (11:02 +1100)]
- markus@cvs.openbsd.org 2014/01/27 18:58:14
[Makefile.in digest.c digest.h hostfile.c kex.h mac.c hmac.c hmac.h]
replace openssl HMAC with an implementation based on our ssh_digest_*
ok and feedback djm@
Damien Miller [Thu, 30 Jan 2014 00:26:46 +0000 (11:26 +1100)]
- (djm) [configure.ac atomicio.c] Kludge around NetBSD offering
different symbols for 'read' when various compiler flags are
in use, causing atomicio.c comparisons against it to break and
read/write operations to hang; ok dtucker
Tim Rice [Tue, 28 Jan 2014 18:26:25 +0000 (10:26 -0800)]
- (tim) [regress/agent.sh regress/agent-ptrace.sh] Assign $? to a variable
when used as an error message inside an if statement so we display the
correct into. agent.sh patch from Petr Lautrbach.
Damien Miller [Sat, 25 Jan 2014 22:39:53 +0000 (09:39 +1100)]
- (djm) [configure.ac sandbox-capsicum.c sandbox-rlimit.c] Disable
RLIMIT_NOFILE pseudo-sandbox on FreeBSD. In some configurations,
libc will attempt to open additional file descriptors for crypto
offload and crash if they cannot be opened.
Damien Miller [Sat, 25 Jan 2014 22:37:25 +0000 (09:37 +1100)]
- dtucker@cvs.openbsd.org 2014/01/25 10:12:50
[cipher.c cipher.h kex.c kex.h kexgexc.c]
Add a special case for the DH group size for 3des-cbc, which has an
effective strength much lower than the key size. This causes problems
with some cryptlib implementations, which don't support group sizes larger
than 4k but also don't use the largest group size it does support as
specified in the RFC. Based on a patch from Petr Lautrbach at Redhat,
reduced by me with input from Markus. ok djm@ markus@
Damien Miller [Sat, 25 Jan 2014 02:12:28 +0000 (13:12 +1100)]
- (djm) [configure.ac] Do not attempt to use capsicum sandbox unless
sys/capability.h exists and cap_rights_limit is in libc. Fixes
build on FreeBSD9x which provides the header but not the libc
support.
Damien Miller [Fri, 24 Jan 2014 03:27:04 +0000 (14:27 +1100)]
- (djm) [Makefile.in regress/scp-ssh-wrapper.sh regress/scp.sh] Make
the scp regress test actually test the built scp rather than the one
in $PATH. ok dtucker@
Darren Tucker [Thu, 23 Jan 2014 12:14:39 +0000 (23:14 +1100)]
- (dtucker) [configure.ac] NetBSD's (and FreeBSD's) strnvis is gratuitously
incompatible with OpenBSD's despite post-dating it by more than a decade.
Declare it as broken, and document FreeBSD's as the same. ok djm@
Damien Miller [Wed, 22 Jan 2014 10:30:12 +0000 (21:30 +1100)]
- (djm) [configure.ac aclocal.m4] More tests to detect fallout from
platform hardening options: include some long long int arithmatic
to detect missing support functions for -ftrapv in libgcc and
equivalents, actually test linking when -ftrapv is supplied and
set either both -pie/-fPIE or neither. feedback and ok dtucker@
Damien Miller [Wed, 22 Jan 2014 05:30:15 +0000 (16:30 +1100)]
- (djm) [openbsd-compat/setproctitle.c] Don't fail to compile if a
platform that is expected to use the reuse-argv style setproctitle
hack surprises us by providing a setproctitle in libc; ok dtucker
Damien Miller [Tue, 21 Jan 2014 02:10:26 +0000 (13:10 +1100)]
- (djm) [aclocal.m4] Flesh out the code run in the OSSH_CHECK_CFLAG_COMPILE
and OSSH_CHECK_LDFLAG_LINK tests to give them a better chance of
detecting toolchain-related problems; ok dtucker
Darren Tucker [Tue, 21 Jan 2014 01:48:51 +0000 (12:48 +1100)]
- (dtucker) [configure.ac] Make PIE a configure-time option which defaults
to on platforms where it's known to be reliably detected and off elsewhere.
Works around platforms such as FreeBSD 9.1 where it does not interop with
-ftrapv (it seems to work but fails when trying to link ssh). ok djm@
Darren Tucker [Mon, 20 Jan 2014 02:18:09 +0000 (13:18 +1100)]
- (dtucker) [gss-serv-krb5.c] Fall back to krb5_cc_gen_new if the Kerberos
implementation does not have krb5_cc_new_unique, similar to what we do
in auth-krb5.c.
Darren Tucker [Sun, 19 Jan 2014 11:37:02 +0000 (22:37 +1100)]
- dtucker@cvs.openbsd.org 2014/01/19 11:21:51
[addrmatch.c]
Cast the sizeof to socklen_t so it'll work even if the supplied len is
negative. Suggested by and ok djm, ok deraadt.
Darren Tucker [Sun, 19 Jan 2014 04:30:02 +0000 (15:30 +1100)]
- dtucker@cvs.openbsd.org 2014/01/19 04:17:29
[canohost.c addrmatch.c]
Cast socklen_t when comparing to size_t and use socklen_t to iterate over
the ip options, both to prevent signed/unsigned comparison warnings.
Patch from vinschen at redhat via portable openssh, begrudging ok deraadt.
Darren Tucker [Sun, 19 Jan 2014 04:28:01 +0000 (15:28 +1100)]
- dtucker@cvs.openbsd.org 2014/01/18 09:36:26
[session.c]
explicitly define USE_PIPES to 1 to prevent redefinition warnings in
portable on platforms that use pipes for everything. From redhat @
redhat.
Darren Tucker [Sat, 18 Jan 2014 11:12:15 +0000 (22:12 +1100)]
- (dtucker) [sandbox-capsicum.c] Correct some error messages and make the
return value check for cap_enter() consistent with the other uses in
FreeBSD. From by Loganaden Velvindron @ AfriNIC via bz#2140.
Darren Tucker [Sat, 18 Jan 2014 10:12:42 +0000 (21:12 +1100)]
- (dtucker) [configure.ac] On Cygwin the getopt variables (like optargs,
optind) are defined in getopt.h already. Unfortunately they are defined as
"declspec(dllimport)" for historical reasons, because the GNU linker didn't
allow auto-import on PE/COFF targets way back when. The problem is the
dllexport attributes collide with the definitions in the various source
files in OpenSSH, which obviousy define the variables without
declspec(dllimport). The least intrusive way to get rid of these warnings
is to disable warnings for GCC compiler attributes when building on Cygwin.
Patch from vinschen at redhat.com.
Darren Tucker [Sat, 18 Jan 2014 10:03:59 +0000 (21:03 +1100)]
- (dtucker) [openbsd-compat/bsd-cygwin_util.h] Add missing function
declarations that stopped being included when we stopped including
<windows.h> from openbsd-compat/bsd-cygwin_util.h. Patch from vinschen at
redhat.com.
Darren Tucker [Fri, 17 Jan 2014 13:12:38 +0000 (00:12 +1100)]
- (dtucker) [defines.h] Move our definitions of uintXX_t types down to after
they're defined if we have to define them ourselves. Fixes builds on old
AIX.