mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 02:58:08 +00:00
fix sanitizer settings
This commit is contained in:
@ -10,6 +10,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
|
|||||||
|
|
||||||
### Version ++3.11a (dev)
|
### Version ++3.11a (dev)
|
||||||
- afl-fuzz:
|
- afl-fuzz:
|
||||||
|
- fix sanitizer settings (bug since 3.10c)
|
||||||
- add non-unicode variants from unicode-looking dictionary entries
|
- add non-unicode variants from unicode-looking dictionary entries
|
||||||
- Rust custom mutator API improvements
|
- Rust custom mutator API improvements
|
||||||
- afl-cc:
|
- afl-cc:
|
||||||
|
@ -481,11 +481,11 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
|||||||
/* This should improve performance a bit, since it stops the linker from
|
/* This should improve performance a bit, since it stops the linker from
|
||||||
doing extra work post-fork(). */
|
doing extra work post-fork(). */
|
||||||
|
|
||||||
if (!getenv("LD_BIND_LAZY")) { setenv("LD_BIND_NOW", "1", 0); }
|
if (!getenv("LD_BIND_LAZY")) { setenv("LD_BIND_NOW", "1", 1); }
|
||||||
|
|
||||||
/* Set sane defaults for ASAN if nothing else specified. */
|
/* Set sane defaults for ASAN if nothing else specified. */
|
||||||
|
|
||||||
if (fsrv->debug == true && !getenv("ASAN_OPTIONS"))
|
if (!getenv("ASAN_OPTIONS"))
|
||||||
setenv("ASAN_OPTIONS",
|
setenv("ASAN_OPTIONS",
|
||||||
"abort_on_error=1:"
|
"abort_on_error=1:"
|
||||||
"detect_leaks=0:"
|
"detect_leaks=0:"
|
||||||
@ -498,11 +498,11 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
|||||||
"handle_abort=0:"
|
"handle_abort=0:"
|
||||||
"handle_sigfpe=0:"
|
"handle_sigfpe=0:"
|
||||||
"handle_sigill=0",
|
"handle_sigill=0",
|
||||||
0);
|
1);
|
||||||
|
|
||||||
/* Set sane defaults for UBSAN if nothing else specified. */
|
/* Set sane defaults for UBSAN if nothing else specified. */
|
||||||
|
|
||||||
if (fsrv->debug == true && !getenv("UBSAN_OPTIONS"))
|
if (!getenv("UBSAN_OPTIONS"))
|
||||||
setenv("UBSAN_OPTIONS",
|
setenv("UBSAN_OPTIONS",
|
||||||
"halt_on_error=1:"
|
"halt_on_error=1:"
|
||||||
"abort_on_error=1:"
|
"abort_on_error=1:"
|
||||||
@ -514,7 +514,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
|||||||
"handle_abort=0:"
|
"handle_abort=0:"
|
||||||
"handle_sigfpe=0:"
|
"handle_sigfpe=0:"
|
||||||
"handle_sigill=0",
|
"handle_sigill=0",
|
||||||
0);
|
1);
|
||||||
|
|
||||||
/* Envs for QASan */
|
/* Envs for QASan */
|
||||||
setenv("QASAN_MAX_CALL_STACK", "0", 0);
|
setenv("QASAN_MAX_CALL_STACK", "0", 0);
|
||||||
@ -523,7 +523,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
|||||||
/* MSAN is tricky, because it doesn't support abort_on_error=1 at this
|
/* MSAN is tricky, because it doesn't support abort_on_error=1 at this
|
||||||
point. So, we do this in a very hacky way. */
|
point. So, we do this in a very hacky way. */
|
||||||
|
|
||||||
if (fsrv->debug == true && !getenv("MSAN_OPTIONS"))
|
if (!getenv("MSAN_OPTIONS"))
|
||||||
setenv("MSAN_OPTIONS",
|
setenv("MSAN_OPTIONS",
|
||||||
"exit_code=" STRINGIFY(MSAN_ERROR) ":"
|
"exit_code=" STRINGIFY(MSAN_ERROR) ":"
|
||||||
"symbolize=0:"
|
"symbolize=0:"
|
||||||
@ -536,7 +536,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
|||||||
"handle_abort=0:"
|
"handle_abort=0:"
|
||||||
"handle_sigfpe=0:"
|
"handle_sigfpe=0:"
|
||||||
"handle_sigill=0",
|
"handle_sigill=0",
|
||||||
0);
|
1);
|
||||||
|
|
||||||
fsrv->init_child_func(fsrv, argv);
|
fsrv->init_child_func(fsrv, argv);
|
||||||
|
|
||||||
@ -931,7 +931,8 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
|||||||
|
|
||||||
"%s"
|
"%s"
|
||||||
|
|
||||||
" - Most likely the target has a huge coverage map, retry with setting the\n"
|
" - Most likely the target has a huge coverage map, retry with "
|
||||||
|
"setting the\n"
|
||||||
" environment variable AFL_MAP_SIZE=4194304\n\n"
|
" environment variable AFL_MAP_SIZE=4194304\n\n"
|
||||||
|
|
||||||
" - The current memory limit (%s) is too restrictive, causing an "
|
" - The current memory limit (%s) is too restrictive, causing an "
|
||||||
|
@ -2457,7 +2457,7 @@ void check_asan_opts(afl_state_t *afl) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strstr(x, "symbolize=0")) {
|
if (!afl->debug && !strstr(x, "symbolize=0")) {
|
||||||
|
|
||||||
FATAL("Custom MSAN_OPTIONS set without symbolize=0 - please fix!");
|
FATAL("Custom MSAN_OPTIONS set without symbolize=0 - please fix!");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user