From 33eba22966a897cb4fca2395912176e2713b050d Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Sun, 18 Oct 2020 15:08:54 +0800 Subject: Add fuzzer-client_nomaths, fix client fuzzer --HG-- branch : fuzz --- cli-kex.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cli-kex.c') 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"); -- cgit v1.2.3