diff cli-kex.c @ 1742:6e71440b1e47 fuzz

Add fuzzer-client_nomaths, fix client fuzzer
author Matt Johnston <matt@ucc.asn.au>
date Sun, 18 Oct 2020 15:08:54 +0800
parents 8f93f37c01de
children 62ae35ff833e
line wrap: on
line diff
--- a/cli-kex.c	Sun Oct 18 12:17:39 2020 +0800
+++ b/cli-kex.c	Sun Oct 18 15:08:54 2020 +0800
@@ -46,6 +46,13 @@
 	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 @@
 	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");