Commit Graph

7565 Commits

Author SHA1 Message Date
Damien Miller 43d3ed2dd3 - djm@cvs.openbsd.org 2014/05/21 07:04:21
[regress/integrity.sh]
     when failing because of unexpected output, show the offending output
2014-07-02 17:01:08 +10:00
Damien Miller 5a96707ffc - djm@cvs.openbsd.org 2014/04/30 05:32:00
[regress/Makefile]
     unit tests for new buffer API; including basic fuzz testing
     NB. Id sync only.
2014-07-02 15:38:05 +10:00
Damien Miller 3ff92ba756 - djm@cvs.openbsd.org 2014/06/30 12:54:39
[key.c]
     suppress spurious error message when loading key with a passphrase;
     reported by kettenis@ ok markus@
   - djm@cvs.openbsd.org 2014/07/02 04:59:06
     [cipher-3des1.c]
     fix ssh protocol 1 on the server that regressed with the sshkey change
     (sometimes fatal() after auth completed), make file return useful status
     codes.
     NB. Id sync only for these two. They were bundled into the sshkey merge
     above, since it was easier to sync the entire file and then apply
     portable-specific changed atop it.
2014-07-02 15:33:09 +10:00
Damien Miller ec3d0e24a1 - markus@cvs.openbsd.org 2014/06/27 18:50:39
[ssh-add.c]
     fix loading of private keys
2014-07-02 15:30:00 +10:00
Damien Miller 4b3ed647d5 - markus@cvs.openbsd.org 2014/06/27 16:41:56
[channels.c channels.h clientloop.c ssh.c]
     fix remote fwding with same listen port but different listen address
     with gerhard@, ok djm@
2014-07-02 15:29:40 +10:00
Damien Miller 9e01ff2866 - deraadt@cvs.openbsd.org 2014/06/25 14:16:09
[sshbuf.c]
     unblock SIGSEGV before raising it
     ok djm
2014-07-02 15:29:21 +10:00
Damien Miller 1845fe6bda - djm@cvs.openbsd.org 2014/06/24 02:21:01
[scp.c]
     when copying local->remote fails during read, don't send uninitialised
     heap to the remote end. Reported by Jann Horn
2014-07-02 15:29:01 +10:00
Damien Miller 19439e9a2a - djm@cvs.openbsd.org 2014/06/24 02:19:48
[ssh.c]
     don't fatal() when hostname canonicalisation fails with a
     ProxyCommand in use; continue and allow the ProxyCommand to
     connect anyway (e.g. to a host with a name outside the DNS
     behind a bastion)
2014-07-02 15:28:40 +10:00
Damien Miller 8668706d0f - djm@cvs.openbsd.org 2014/06/24 01:13:21
[Makefile.in auth-bsdauth.c auth-chall.c auth-options.c auth-rsa.c
     [auth2-none.c auth2-pubkey.c authfile.c authfile.h cipher-3des1.c
     [cipher-chachapoly.c cipher-chachapoly.h cipher.c cipher.h
     [digest-libc.c digest-openssl.c digest.h dns.c entropy.c hmac.h
     [hostfile.c key.c key.h krl.c monitor.c packet.c rsa.c rsa.h
     [ssh-add.c ssh-agent.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c
     [ssh-keygen.c ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c
     [ssh-rsa.c sshbuf-misc.c sshbuf.h sshconnect.c sshconnect1.c
     [sshconnect2.c sshd.c sshkey.c sshkey.h
     [openbsd-compat/openssl-compat.c openbsd-compat/openssl-compat.h]
     New key API: refactor key-related functions to be more library-like,
     existing API is offered as a set of wrappers.

     with and ok markus@

     Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew
     Dempsky and Ron Bowes for a detailed review a few months ago.

     NB. This commit also removes portable OpenSSH support for OpenSSL
     <0.9.8e.
2014-07-02 15:28:02 +10:00
Damien Miller 2cd7929250 - djm@cvs.openbsd.org 2014/06/24 00:52:02
[krl.c]
     fix bug in KRL generation: multiple consecutive revoked certificate
     serial number ranges could be serialised to an invalid format.

     Readers of a broken KRL caused by this bug will fail closed, so no
     should-have-been-revoked key will be accepted.
2014-07-02 12:48:30 +10:00
Damien Miller 99db840ee8 - naddy@cvs.openbsd.org 2014/06/18 15:42:09
[sshbuf-getput-crypto.c]
     The ssh_get_bignum functions must accept the same range of bignums
     the corresponding ssh_put_bignum functions create.  This fixes the
     use of 16384-bit RSA keys (bug reported by Eivind Evensen).
     ok djm@
2014-07-02 12:48:04 +10:00
Damien Miller 84a89161a9 - matthew@cvs.openbsd.org 2014/06/18 02:59:13
[sandbox-systrace.c]
     Now that we have a dedicated getentropy(2) system call for
     arc4random(3), we can disallow __sysctl(2) in OpenSSH's systrace
     sandbox.

     ok djm
2014-07-02 12:47:48 +10:00
Damien Miller 51504ceec6 - deraadt@cvs.openbsd.org 2014/06/13 08:26:29
[sandbox-systrace.c]
     permit SYS_getentropy
     from matthew
2014-07-02 12:47:25 +10:00
Tim Rice a261b8df59 - (tim) [openssh/session.c] Work around to get chroot sftp working on UnixWare 2014-06-18 16:17:28 -07:00
Darren Tucker 316fac6f18 - (dtucker) [entropy.c openbsd-compat/openssl-compat.{c,h}
openbsd-compat/regress/{.cvsignore,Makefile.in,opensslvertest.c}]
   Move the OpenSSL header/library version test into its own function and add
   tests for it. Fix it to allow fix version upgrades (but not downgrades).
   Prompted by chl@ via OpenSMTPD (issue #462) and Debian (bug #748150).
   ok djm@ chl@
2014-06-17 23:06:07 +10:00
Darren Tucker af665bb7b0 - (dtucker) [defines.h] Fix undef of _PATH_MAILDIR. From rak at debian via
OpenSMTPD and chl@
2014-06-16 22:50:55 +10:00
Darren Tucker f9696566fb - (dtucker) [configure.ac] Remove tcpwrappers support, support has already
been removed from sshd.c.
2014-06-13 11:06:04 +10:00
Tim Rice 5e2b8894b0 - (tim) [regress/unittests/test_helper/test_helper.h] Add includes.h for
u_intXX_t types.
2014-06-11 18:31:10 -07:00
Darren Tucker 985ee2cbc3 - (dtucker) [regress/unittests/sshbuf/*.c regress/unittests/test_helper/*]
Wrap stdlib.h include an ifdef for platforms that don't have it.
2014-06-12 05:32:29 +10:00
Darren Tucker cf5392c2db - (dtucker) [defines.h] Add va_copy if we don't already have it, taken from
openbsd-compat/bsd-asprintf.c.
2014-06-12 05:22:49 +10:00
Darren Tucker 58538d795e - (dtucker) [bufaux.c bufbn.c bufec.c buffer.c] Pull in includes.h for
compat stuff, specifically whether or not OpenSSL has ECC.
2014-06-11 13:39:24 +10:00
Darren Tucker eb012ac581 - (dtucker) [openbsd-compat/arc4random.c] Use explicit_bzero instead of an
assigment that might get optimized out.  ok djm@
2014-06-11 13:10:00 +10:00
Darren Tucker b9609fd86c - (dtucker) [sshbuf.h] Only declare ECC functions if building without
OpenSSL or if OpenSSL has ECC.
2014-06-11 08:04:02 +10:00
Darren Tucker a54a040f66 - dtucker@cvs.openbsd.org 2014/06/10 21:46:11
[sshbuf.h]
     Group ECC functions together to make things a little easier in -portable.
     "doesn't bother me" deraadt@
2014-06-11 07:58:35 +10:00
Darren Tucker 9f92c53bad - djm@cvs.openbsd.org 2014/06/05 22:17:50
[sshconnect2.c]
     fix inverted test that caused PKCS#11 keys that were explicitly listed
     not to be preferred. Reported by Dirk-Willem van Gulik
2014-06-11 07:57:58 +10:00
Darren Tucker 15c254a253 - (dtucker) [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c] ifdef
ECC variable too.
2014-06-11 07:38:49 +10:00
Darren Tucker d7af0cc5bf - (dtucker) [myprosal.h] Don't include curve25519-sha256@libssh.org in
the proposal if the version of OpenSSL we're using doesn't support ECC.
2014-06-11 07:37:25 +10:00
Darren Tucker 67508ac256 - (dtucker) [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c] Only do NISTP256
   curve tests if OpenSSL has them.
2014-06-11 06:27:16 +10:00
Damien Miller 6482d90a65 - (djm) [configure.ac openbsd-compat/bsd-cygwin_util.c]
[openbsd-compat/bsd-cygwin_util.h] On Cygwin, determine privilege
         separation user at runtime, since it may need to be a domain account.
            Patch from Corinna Vinschen.
2014-05-27 14:34:42 +10:00
Damien Miller f9eb5e0734 - (djm) [contrib/cygwin/ssh-host-config] Updated Cygwin ssh-host-config
from Corinna Vinschen, fixing a number of bugs and preparing for
   Cygwin 1.7.30.
2014-05-27 14:31:58 +10:00
Damien Miller eae8874466 - (djm) [cipher.c] Fix merge botch. 2014-05-27 14:27:02 +10:00
Damien Miller 564b5e253c - (djm) [Makefile.in] typo in path 2014-05-22 08:23:59 +10:00
Damien Miller e84d10302a revert a diff I didn't mean to commit 2014-05-21 17:13:36 +10:00
Damien Miller 795b86313f - (djm) [misc.c] Use CLOCK_BOOTTIME in preference to CLOCK_MONOTONIC
when it is available. It takes into account time spent suspended,
   thereby ensuring timeouts (e.g. for expiring agent keys) fire
   correctly. bz#2228 reported by John Haxby
2014-05-21 17:12:53 +10:00
Damien Miller 18912775cb - (djm) [commit configure.ac defines.h sshpty.c] don't attempt to use
vhangup on Linux. It doens't work for non-root users, and for them
   it just messes up the tty settings.
2014-05-21 17:06:46 +10:00
Damien Miller 7f1c264d30 - (djm) [sshbuf.c] need __predict_false 2014-05-15 18:01:52 +10:00
Damien Miller e7429f2be8 - (djm) [regress/Makefile Makefile.in]
[regress/unittests/sshbuf/test_sshbuf.c
   [regress/unittests/sshbuf/test_sshbuf_fixed.c]
   [regress/unittests/sshbuf/test_sshbuf_fuzz.c]
   [regress/unittests/sshbuf/test_sshbuf_getput_basic.c]
   [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c]
   [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c]
   [regress/unittests/sshbuf/test_sshbuf_misc.c]
   [regress/unittests/sshbuf/tests.c]
   [regress/unittests/test_helper/fuzz.c]
   [regress/unittests/test_helper/test_helper.c]
   Hook new unit tests into the build and "make tests"
2014-05-15 18:01:01 +10:00
Damien Miller def1de0867 - (djm) [regress/unittests/Makefile]
[regress/unittests/Makefile.inc]
   [regress/unittests/sshbuf/Makefile]
   [regress/unittests/sshbuf/test_sshbuf.c]
   [regress/unittests/sshbuf/test_sshbuf_fixed.c]
   [regress/unittests/sshbuf/test_sshbuf_fuzz.c]
   [regress/unittests/sshbuf/test_sshbuf_getput_basic.c]
   [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c]
   [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c]
   [regress/unittests/sshbuf/test_sshbuf_misc.c]
   [regress/unittests/sshbuf/tests.c]
   [regress/unittests/test_helper/Makefile]
   [regress/unittests/test_helper/fuzz.c]
   [regress/unittests/test_helper/test_helper.c]
   [regress/unittests/test_helper/test_helper.h]
   Import new unit tests from OpenBSD; not yet hooked up to build.
2014-05-15 15:17:15 +10:00
Damien Miller 167685756f - logan@cvs.openbsd.org 2014/05/04 10:40:59
[connect-privsep.sh]
     Remove the Z flag from the list of malloc options as it
     was removed from malloc.c 10 days ago.

     OK from miod@
2014-05-15 15:08:40 +10:00
Damien Miller d0b69fe904 - dtucker@cvs.openbsd.org 2014/05/03 18:46:14
[proxy-connect.sh]
     Add tests for with and without compression, with and without privsep.
2014-05-15 15:08:19 +10:00
Damien Miller edb1af5044 - djm@cvs.openbsd.org 2014/04/21 22:15:37
[dhgex.sh integrity.sh kextype.sh rekey.sh try-ciphers.sh]
     repair regress tests broken by server-side default cipher/kex/mac changes
     by ensuring that the option under test is included in the server's
     algorithm list
2014-05-15 15:07:53 +10:00
Damien Miller 54343e95c7 - djm@cvs.openbsd.org 2014/03/13 20:44:49
[login-timeout.sh]
     this test is a sorry mess of race conditions; add another sleep
     to avoid a failure on slow machines (at least until I find a
     better way)
2014-05-15 15:07:33 +10:00
Damien Miller e5b9f0f2ee - (djm) [Makefile.in configure.ac sshbuf-getput-basic.c]
[sshbuf-getput-crypto.c sshbuf.c] compilation and portability fixes
2014-05-15 14:58:07 +10:00
Damien Miller b9c566788a - (djm) [configure.ac] Unconditionally define WITH_OPENSSL until we write
portability glue to support building without libcrypto
2014-05-15 14:43:37 +10:00
Damien Miller 3dc27178b4 - logan@cvs.openbsd.org 2014/05/05 07:02:30
[sftp.c]
     Zap extra whitespace.

     OK from djm@ and dtucker@
2014-05-15 14:37:59 +10:00
Damien Miller c31a0cd5b3 - markus@cvs.openbsd.org 2014/05/03 17:20:34
[monitor.c packet.c packet.h]
     unbreak compression, by re-init-ing the compression code in the
     post-auth child. the new buffer code is more strict, and requires
     buffer_init() while the old code was happy after a bzero();
     originally from djm@
2014-05-15 14:37:39 +10:00
Damien Miller 686c7d9ee6 - djm@cvs.openbsd.org 2014/05/02 03:27:54
[chacha.h cipher-chachapoly.h digest.h hmac.h kex.h kexc25519.c]
     [misc.h poly1305.h ssh-pkcs11.c defines.h]
     revert __bounded change; it causes way more problems for portable than
     it solves; pointed out by dtucker@
2014-05-15 14:37:03 +10:00
Damien Miller 294c58a007 - naddy@cvs.openbsd.org 2014/04/30 19:07:48
[mac.c myproposal.h umac.c]
     UMAC can use our local fallback implementation of AES when OpenSSL isn't
     available.  Glue code straight from Ted Krovetz's original umac.c.
     ok markus@
2014-05-15 14:35:03 +10:00
Damien Miller 05e82c3b96 - djm@cvs.openbsd.org 2014/04/30 05:29:56
[bufaux.c bufbn.c bufec.c buffer.c buffer.h sshbuf-getput-basic.c]
     [sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c sshbuf.h ssherr.c]
     [ssherr.h]
     New buffer API; the first installment of the conversion/replacement
     of OpenSSH's internals to make them usable as a standalone library.

     This includes a set of wrappers to make it compatible with the
     existing buffer API so replacement can occur incrementally.

     With and ok markus@

     Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew
     Dempsky and Ron Bowes for a detailed review.
2014-05-15 14:33:43 +10:00
Damien Miller 380948180f - dtucker@cvs.openbsd.org 2014/04/29 20:36:51
[sftp.c]
     Don't attempt to append a nul quote char to the filename.  Should prevent
     fatal'ing with "el_insertstr failed" when there's a single quote char
     somewhere in the string.  bz#2238, ok markus@
2014-05-15 14:25:18 +10:00