summaryrefslogtreecommitdiff
path: root/kex.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2016-10-24 11:13:30 +0100
committerColin Watson <cjwatson@debian.org>2016-10-24 11:14:03 +0100
commit5dfa38163e4a5f0ae204fb61e520ce8bedbe629f (patch)
tree399ea6ce43d72a44d76d668e4302da93ccb0e4a1 /kex.c
parent87ffbd30492802e44259cdfc0d8187393cc63917 (diff)
parentb139635512b1af75e82252c0c71ac66e08b78774 (diff)
CVE-2016-8858: Unregister the KEXINIT handler after message has been received (closes: #841884).
Diffstat (limited to 'kex.c')
-rw-r--r--kex.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kex.c b/kex.c
index c17d652c9..7ab72ba19 100644
--- a/kex.c
+++ b/kex.c
@@ -488,6 +488,7 @@ kex_input_kexinit(int type, u_int32_t seq, void *ctxt)
488 if (kex == NULL) 488 if (kex == NULL)
489 return SSH_ERR_INVALID_ARGUMENT; 489 return SSH_ERR_INVALID_ARGUMENT;
490 490
491 ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, NULL);
491 ptr = sshpkt_ptr(ssh, &dlen); 492 ptr = sshpkt_ptr(ssh, &dlen);
492 if ((r = sshbuf_put(kex->peer, ptr, dlen)) != 0) 493 if ((r = sshbuf_put(kex->peer, ptr, dlen)) != 0)
493 return r; 494 return r;