2017-05-13 14:50:54 +00:00
|
|
|
#ifndef DROPBEAR_FUZZ_H
|
|
|
|
#define DROPBEAR_FUZZ_H
|
|
|
|
|
|
|
|
#include "includes.h"
|
|
|
|
#include "buffer.h"
|
|
|
|
|
|
|
|
#ifdef DROPBEAR_FUZZ
|
|
|
|
|
2017-05-18 16:48:46 +00:00
|
|
|
// once per process
|
2017-05-13 14:50:54 +00:00
|
|
|
void svr_setup_fuzzer(void);
|
|
|
|
|
2017-05-18 16:48:46 +00:00
|
|
|
// once per input. returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE
|
|
|
|
int fuzzer_set_input(const uint8_t *Data, size_t Size);
|
|
|
|
|
2017-05-13 14:50:54 +00:00
|
|
|
struct dropbear_fuzz_options {
|
|
|
|
int fuzzing;
|
|
|
|
|
|
|
|
// to record an unencrypted stream
|
|
|
|
FILE* recordf;
|
|
|
|
|
|
|
|
// fuzzing input
|
2017-05-18 16:48:46 +00:00
|
|
|
buffer *input;
|
2017-05-13 14:50:54 +00:00
|
|
|
|
|
|
|
// 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 */
|