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.
Darren Tucker [Fri, 17 Jan 2014 07:10:58 +0000 (18:10 +1100)]
- (dtucker) [configure.ac openbsd-compat/bsd-statvfs.c
openbsd-compat/bsd-statvfs.h] Implement enough of statvfs on top of statfs
to be useful (and for the regression tests to pass) on platforms that
have statfs and fstatfs. ok djm@
Damien Miller [Fri, 17 Jan 2014 05:47:04 +0000 (16:47 +1100)]
- (djm) [Makefile.in configure.ac sandbox-capsicum.c sandbox-darwin.c]
[sandbox-null.c sandbox-rlimit.c sandbox-seccomp-filter.c]
[sandbox-systrace.c ssh-sandbox.h sshd.c] Support preauth sandboxing
using the Capsicum API introduced in FreeBSD 10. Patch by Dag-Erling
Smorgrav, updated by Loganaden Velvindron @ AfriNIC; ok dtucker@
Darren Tucker [Thu, 16 Jan 2014 22:53:24 +0000 (09:53 +1100)]
- (dtucker) [aclocal.m4 configure.ac] Add some additional compiler/toolchain
hardening flags including -fstack-protector-strong. These default to on
if the toolchain supports them, but there is a configure-time knob
(--without-hardening) to disable them if necessary. ok djm@
Damien Miller [Thu, 16 Jan 2014 07:42:10 +0000 (18:42 +1100)]
- djm@cvs.openbsd.org 2014/01/16 07:31:09
[sftp-client.c]
needless and incorrect cast to size_t can break resumption of
large download; patch from tobias@
Damien Miller [Sun, 12 Jan 2014 08:21:22 +0000 (19:21 +1100)]
- djm@cvs.openbsd.org 2014/01/12 08:13:13
[bufaux.c buffer.h kex.c kex.h kexc25519.c kexc25519c.c kexc25519s.c]
[kexdhc.c kexdhs.c kexecdhc.c kexecdhs.c kexgexc.c kexgexs.c]
avoid use of OpenSSL BIGNUM type and functions for KEX with
Curve25519 by adding a buffer_put_bignum2_from_string() that stores
a string using the bignum encoding rules. Will make it easier to
build a reduced-feature OpenSSH without OpenSSL in the future;
ok markus@
Damien Miller [Thu, 9 Jan 2014 23:59:24 +0000 (10:59 +1100)]
- djm@cvs.openbsd.org 2014/01/09 23:26:48
[sshconnect.c sshd.c]
ban clients/servers that suffer from SSH_BUG_DERIVEKEY, they are ancient,
deranged and might make some attacks on KEX easier; ok markus@
Damien Miller [Thu, 9 Jan 2014 23:58:53 +0000 (10:58 +1100)]
- djm@cvs.openbsd.org 2014/01/09 23:20:00
[digest.c digest.h hostfile.c kex.c kex.h kexc25519.c kexc25519c.c]
[kexc25519s.c kexdh.c kexecdh.c kexecdhc.c kexecdhs.c kexgex.c kexgexc.c]
[kexgexs.c key.c key.h roaming_client.c roaming_common.c schnorr.c]
[schnorr.h ssh-dss.c ssh-ecdsa.c ssh-rsa.c sshconnect2.c]
Introduce digest API and use it to perform all hashing operations
rather than calling OpenSSL EVP_Digest* directly. Will make it easier
to build a reduced-feature OpenSSH without OpenSSL in future;
feedback, ok markus@
Damien Miller [Thu, 9 Jan 2014 23:40:45 +0000 (10:40 +1100)]
- guenther@cvs.openbsd.org 2014/01/09 03:26:00
[sftp-common.c]
When formating the time for "ls -l"-style output, show dates in the future
with the year, and rearrange a comparison to avoid a potentional signed
arithmetic overflow that would give the wrong result.
Damien Miller [Thu, 9 Jan 2014 23:37:05 +0000 (10:37 +1100)]
- tedu@cvs.openbsd.org 2014/01/04 17:50:55
[mac.c monitor_mm.c monitor_mm.h xmalloc.c]
use standard types and formats for size_t like variables. ok dtucker
Damien Miller [Tue, 31 Dec 2013 01:25:40 +0000 (12:25 +1100)]
- djm@cvs.openbsd.org 2013/12/30 23:52:28
[auth2-hostbased.c auth2-pubkey.c compat.c compat.h ssh-rsa.c]
[sshconnect.c sshconnect2.c sshd.c]
refuse RSA keys from old proprietary clients/servers that use the
obsolete RSA+MD5 signature scheme. it will still be possible to connect
with these clients/servers but only DSA keys will be accepted, and we'll
deprecate them entirely in a future release. ok markus@
Damien Miller [Sun, 29 Dec 2013 06:49:31 +0000 (17:49 +1100)]
- djm@cvs.openbsd.org 2013/12/29 04:20:04
[key.c]
to make sure we don't omit any key types as valid CA keys again,
factor the valid key type check into a key_type_is_valid_ca()
function
Damien Miller [Sun, 29 Dec 2013 06:47:50 +0000 (17:47 +1100)]
- djm@cvs.openbsd.org 2013/12/27 22:30:17
[ssh-dss.c ssh-ecdsa.c ssh-rsa.c]
make the original RSA and DSA signing/verification code look more like
the ECDSA/Ed25519 ones: use key_type_plain() when checking the key type
rather than tediously listing all variants, use __func__ for debug/
error messages
Damien Miller [Sun, 29 Dec 2013 06:45:51 +0000 (17:45 +1100)]
- djm@cvs.openbsd.org 2013/12/19 01:19:41
[ssh-agent.c]
bz#2186: don't crash (NULL deref) when deleting PKCS#11 keys from an agent
that has a mix of normal and PKCS#11 keys; fix from jay AT slushpupie.com;
ok dtucker
Damien Miller [Sun, 29 Dec 2013 06:45:26 +0000 (17:45 +1100)]
- djm@cvs.openbsd.org 2013/12/19 01:04:36
[channels.c]
bz#2147: fix multiple remote forwardings with dynamically assigned
listen ports. In the s->c message to open the channel we were sending
zero (the magic number to request a dynamic port) instead of the actual
listen port. The client therefore had no way of discriminating between
them.
Damien Miller [Sun, 29 Dec 2013 06:44:29 +0000 (17:44 +1100)]
- dtucker@cvs.openbsd.org 2013/12/19 00:19:12
[serverloop.c]
Cast client_alive_interval to u_int64_t before assinging to
max_time_milliseconds to avoid potential integer overflow in the timeout.
bz#2170, patch from Loganaden Velvindron, ok djm@
Damien Miller [Sun, 29 Dec 2013 06:44:07 +0000 (17:44 +1100)]
- djm@cvs.openbsd.org 2013/12/19 00:10:30
[ssh-add.c]
skip requesting smartcard PIN when removing keys from agent; bz#2187
patch from jay AT slushpupie.com; ok dtucker
Damien Miller [Wed, 18 Dec 2013 06:48:11 +0000 (17:48 +1100)]
- markus@cvs.openbsd.org 2013/12/09 11:03:45
[blocks.c ed25519.c fe25519.c fe25519.h ge25519.c ge25519.h]
[ge25519_base.data hash.c sc25519.c sc25519.h verify.c]
Add Authors for the public domain ed25519/nacl code.
see also http://nacl.cr.yp.to/features.html
All of the NaCl software is in the public domain.
and http://ed25519.cr.yp.to/software.html
The Ed25519 software is in the public domain.