summaryrefslogtreecommitdiffstats
path: root/sshconnect.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-01-10 00:59:24 +0100
committerDamien Miller <djm@mindrot.org>2014-01-10 00:59:24 +0100
commit58cd63bc63038acddfb4051ed14e11179d8f4941 (patch)
treeeb65dbe7f28e207756131ad75ec746310ff5eaa2 /sshconnect.c
parent - djm@cvs.openbsd.org 2014/01/09 23:20:00 (diff)
downloadopenssh-58cd63bc63038acddfb4051ed14e11179d8f4941.tar.xz
openssh-58cd63bc63038acddfb4051ed14e11179d8f4941.zip
- 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@
Diffstat (limited to 'sshconnect.c')
-rw-r--r--sshconnect.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 791b31c12..d21781ea4 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -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);