Add AFL_MAP_SIZE in run_fuzzer

Otherwise get errors like these for libsass.

[+] All right - fork server is up.

[-] PROGRAM ABORT : AFL_MAP_SIZE is not set and fuzzing target reports that the required size is very large. Solution: Run the fuzzing target stand-alone with the environment variable AFL_DEBUG=1 set and set the value for __afl_final_loc in the AFL_MAP_SIZE environment variable for afl-fuzz.
         Location : report_error_and_exit(), src/afl-forkserver.c:321
This commit is contained in:
Abhishek Arya 2021-01-31 10:48:04 -08:00 committed by GitHub
parent 42018eeb1c
commit 93eb6024f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -103,6 +103,7 @@ if [[ "$FUZZING_ENGINE" = afl ]]; then
export AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1
export AFL_SKIP_CPUFREQ=1
export AFL_NO_AFFINITY=1
export AFL_MAP_SIZE=4194304
# AFL expects at least 1 file in the input dir.
echo input > ${CORPUS_DIR}/input
CMD_LINE="$OUT/afl-fuzz $AFL_FUZZER_ARGS -i $CORPUS_DIR -o $FUZZER_OUT $(get_dictionary) $* $OUT/$FUZZER"