summaryrefslogtreecommitdiffhomepage
path: root/fuzz.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2017-05-13 22:50:54 +0800
committerMatt Johnston <matt@ucc.asn.au>2017-05-13 22:50:54 +0800
commitfb719e3d0ba3571d3abc5638d1fbbe9e1675d6a7 (patch)
tree7a72eeedf1e3c89258e1e35057f737f1d0176f9c /fuzz.h
parent9f24cdf74c93aa75416687972e69b5b4c8be2698 (diff)
fuzz harness
--HG-- branch : fuzz
Diffstat (limited to 'fuzz.h')
-rw-r--r--fuzz.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/fuzz.h b/fuzz.h
new file mode 100644
index 0000000..e7360e3
--- /dev/null
+++ b/fuzz.h
@@ -0,0 +1,35 @@
+#ifndef DROPBEAR_FUZZ_H
+#define DROPBEAR_FUZZ_H
+
+#include "includes.h"
+#include "buffer.h"
+
+#ifdef DROPBEAR_FUZZ
+
+void svr_setup_fuzzer(void);
+
+struct dropbear_fuzz_options {
+ int fuzzing;
+
+ // to record an unencrypted stream
+ FILE* recordf;
+
+ // fuzzing input
+ buffer input;
+
+ // dropbear_exit() jumps back
+ sigjmp_buf jmp;
+
+ uid_t pw_uid;
+ gid_t pw_gid;
+ char* pw_name;
+ char* pw_dir;
+ char* pw_shell;
+ char* pw_passwd;
+};
+
+extern struct dropbear_fuzz_options fuzz;
+
+#endif
+
+#endif /* DROPBEAR_FUZZ_H */