]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- djm@cvs.openbsd.org 2014/01/09 23:26:48
authorDamien Miller <djm@mindrot.org>
Thu, 9 Jan 2014 23:59:24 +0000 (10:59 +1100)
committerDamien Miller <djm@mindrot.org>
Thu, 9 Jan 2014 23:59:24 +0000 (10:59 +1100)
     [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@

ChangeLog
sshconnect.c
sshd.c

index a1d37bc25e84de6567740a4ce1babb04509f17ac..be7d868bff19b46aa46e266ad3ce8052a44880b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
      rather than calling OpenSSL EVP_Digest* directly. Will make it easier
      to build a reduced-feature OpenSSH without OpenSSL in future;
      feedback, ok markus@
+   - 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@
 
 20140108
  - (djm) [regress/.cvsignore] Ignore regress test droppings; ok dtucker@
index 791b31c12f3711e819ce9cfc5dc76b53ff6cf120..d21781ea45b6bdbb5929bb788d976d3658eb1999 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect.c,v 1.243 2013/12/30 23:52:27 djm Exp $ */
+/* $OpenBSD: sshconnect.c,v 1.244 2014/01/09 23:26:48 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -662,6 +662,9 @@ ssh_exchange_identification(int timeout_ms)
                fatal("Protocol major versions differ: %d vs. %d",
                    (options.protocol & SSH_PROTO_2) ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1,
                    remote_major);
+       if ((datafellows & SSH_BUG_DERIVEKEY) != 0)
+               fatal("Server version \"%.100s\" uses unsafe key agreement; "
+                   "refusing connection", remote_version);
        if ((datafellows & SSH_BUG_RSASIGMD5) != 0)
                logit("Server version \"%.100s\" uses unsafe RSA signature "
                    "scheme; disabling use of RSA keys", remote_version);
diff --git a/sshd.c b/sshd.c
index 87795bea529e85ce22679a7eaef08b51d2f10384..60b416e30363d0a76a3d1acbecae8482b381850e 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.413 2013/12/30 23:52:28 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.414 2014/01/09 23:26:48 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -502,9 +502,14 @@ sshd_exchange_identification(int sock_in, int sock_out)
                    get_remote_ipaddr(), client_version_string);
                cleanup_exit(255);
        }
-       if ((datafellows & SSH_BUG_RSASIGMD5) != 0)
+       if ((datafellows & SSH_BUG_RSASIGMD5) != 0) {
                logit("Client version \"%.100s\" uses unsafe RSA signature "
                    "scheme; disabling use of RSA keys", remote_version);
+       }
+       if ((datafellows & SSH_BUG_DERIVEKEY) != 0) {
+               fatal("Client version \"%.100s\" uses unsafe key agreement; "
+                   "refusing connection", remote_version);
+       }
 
        mismatch = 0;
        switch (remote_major) {