diff options
author | Matt Johnston <matt@ucc.asn.au> | 2017-06-02 00:03:51 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2017-06-02 00:03:51 +0800 |
commit | 937e6cb91e3b0400fc516893862de74a2440501c (patch) | |
tree | f7a3c7c337d9156b7ad233749bc785a510f6699a | |
parent | 81b64ea0b592d0ac49807af0652d153d68665fbe (diff) |
fuzzer-preauth don't call getpwnam(), bring back longjmp
--HG--
branch : fuzz
-rw-r--r-- | fuzz-common.c | 8 | ||||
-rw-r--r-- | fuzzer-preauth.c | 6 |
2 files changed, 3 insertions, 11 deletions
diff --git a/fuzz-common.c b/fuzz-common.c index 5c365d2..ac42def 100644 --- a/fuzz-common.c +++ b/fuzz-common.c @@ -66,11 +66,9 @@ void svr_setup_fuzzer(void) { svr_getopts(argc, argv); /* user lookups might be slow, cache it */ - pw = getpwuid(getuid()); - dropbear_assert(pw); - fuzz.pw_name = m_strdup(pw->pw_name); - fuzz.pw_dir = m_strdup(pw->pw_dir); - fuzz.pw_shell = m_strdup(pw->pw_shell); + fuzz.pw_name = m_strdup("person"); + fuzz.pw_dir = m_strdup("/tmp"); + fuzz.pw_shell = m_strdup("/bin/zsh"); fuzz.pw_passwd = m_strdup("!!zzznope"); load_fixed_hostkeys(); diff --git a/fuzzer-preauth.c b/fuzzer-preauth.c index e65a3bc..f7ced9d 100644 --- a/fuzzer-preauth.c +++ b/fuzzer-preauth.c @@ -12,8 +12,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { static int once = 0; if (!once) { setup_fuzzer(); - // XXX temporarily disable setjmp to debug asan segv - fuzz.do_jmp = 0; once = 1; } @@ -42,9 +40,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { wrapfd_add(fakesock, fuzz.input, PLAIN); m_malloc_set_epoch(1); - // XXX temporarily disable setjmp to debug asan segv - svr_session(fakesock, fakesock); - #if 0 if (setjmp(fuzz.jmp) == 0) { svr_session(fakesock, fakesock); m_malloc_free_epoch(1, 0); @@ -53,7 +48,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { TRACE(("dropbear_exit longjmped")) // dropbear_exit jumped here } - #endif return 0; } |