summaryrefslogtreecommitdiffhomepage
path: root/common-kex.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-10-18 22:53:44 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-10-18 22:53:44 +0800
commit6ca24af24afe3a3572e9d043df3f8342d38c84b1 (patch)
treeb06b58a6f94bd2827d023f0de10e7f3843a6e28c /common-kex.c
parent17873e8c922eded2cec86184673a6d110df6403f (diff)
parent400c7c161f8fd4859f557339f77025044ec950e0 (diff)
Merge fuzz branch
Diffstat (limited to 'common-kex.c')
-rw-r--r--common-kex.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/common-kex.c b/common-kex.c
index 4caa06e..39d916b 100644
--- a/common-kex.c
+++ b/common-kex.c
@@ -487,6 +487,12 @@ void recv_msg_kexinit() {
TRACE(("continue recv_msg_kexinit: sent kexinit"))
}
+ /* "Once a party has sent a SSH_MSG_KEXINIT message ...
+ further SSH_MSG_KEXINIT messages MUST NOT be sent" */
+ if (ses.kexstate.recvkexinit) {
+ dropbear_exit("Unexpected KEXINIT");
+ }
+
/* start the kex hash */
local_ident_len = strlen(LOCAL_IDENT);
remote_ident_len = strlen(ses.remoteident);