summaryrefslogtreecommitdiff
path: root/sshconnect2.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-04-20 13:47:45 +1000
committerColin Watson <cjwatson@debian.org>2014-04-21 21:22:36 +0100
commit02883061577ec43ff8d0e8f0cf486bc5131db507 (patch)
treecff56a0039ff84648c22cb1fabc141844ee4d1ac /sshconnect2.c
parent08a63152deb5deda168aaef870bdb9f56425acb3 (diff)
bad bignum encoding for curve25519-sha256@libssh.org
Hi, So I screwed up when writing the support for the curve25519 KEX method that doesn't depend on OpenSSL's BIGNUM type - a bug in my code left leading zero bytes where they should have been skipped. The impact of this is that OpenSSH 6.5 and 6.6 will fail during key exchange with a peer that implements curve25519-sha256@libssh.org properly about 0.2% of the time (one in every 512ish connections). We've fixed this for OpenSSH 6.7 by avoiding the curve25519-sha256 key exchange for previous versions, but I'd recommend distributors of OpenSSH apply this patch so the affected code doesn't become too entrenched in LTS releases. The patch fixes the bug and makes OpenSSH identify itself as 6.6.1 so as to distinguish itself from the incorrect versions so the compatibility code to disable the affected KEX isn't activated. I've committed this on the 6.6 branch too. Apologies for the hassle. -d Origin: upstream, https://lists.mindrot.org/pipermail/openssh-unix-dev/2014-April/032494.html Forwarded: not-needed Last-Update: 2014-04-21 Patch-Name: curve25519-sha256-bignum-encoding.patch
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index 66cb03527..1a4e55179 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -220,6 +220,8 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
220 } 220 }
221 if (options.kex_algorithms != NULL) 221 if (options.kex_algorithms != NULL)
222 myproposal[PROPOSAL_KEX_ALGS] = options.kex_algorithms; 222 myproposal[PROPOSAL_KEX_ALGS] = options.kex_algorithms;
223 myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(
224 myproposal[PROPOSAL_KEX_ALGS]);
223 225
224#ifdef GSSAPI 226#ifdef GSSAPI
225 /* If we've got GSSAPI algorithms, then we also support the 227 /* If we've got GSSAPI algorithms, then we also support the