summaryrefslogtreecommitdiffhomepage
path: root/cli-kex.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-10-18 15:08:54 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-10-18 15:08:54 +0800
commit33eba22966a897cb4fca2395912176e2713b050d (patch)
treeafefc1cd425bee9529ba227894d8ae50844cfa3b /cli-kex.c
parent282fc81981c57e53b6aaa6d3189b66b4a229f0a8 (diff)
Add fuzzer-client_nomaths, fix client fuzzer
--HG-- branch : fuzz
Diffstat (limited to 'cli-kex.c')
-rw-r--r--cli-kex.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/cli-kex.c b/cli-kex.c
index af1cfcf..4f2a884 100644
--- a/cli-kex.c
+++ b/cli-kex.c
@@ -46,6 +46,13 @@ void send_msg_kexdh_init() {
TRACE(("send_msg_kexdh_init()"))
CHECKCLEARTOWRITE();
+
+#if DROPBEAR_FUZZ
+ if (fuzz.fuzzing && fuzz.skip_kexmaths) {
+ return;
+ }
+#endif
+
buf_putbyte(ses.writepayload, SSH_MSG_KEXDH_INIT);
switch (ses.newkeys->algo_kex->mode) {
#if DROPBEAR_NORMAL_DH
@@ -98,6 +105,12 @@ void recv_msg_kexdh_reply() {
unsigned char* keyblob = NULL;
TRACE(("enter recv_msg_kexdh_reply"))
+
+#if DROPBEAR_FUZZ
+ if (fuzz.fuzzing && fuzz.skip_kexmaths) {
+ return;
+ }
+#endif
if (cli_ses.kex_state != KEXDH_INIT_SENT) {
dropbear_exit("Received out-of-order kexdhreply");