From a1135d001e78df2b6162bd8e8f67a8a8e8b92e45 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Tue, 16 Mar 2021 21:05:21 +0100 Subject: update afl++ commit id (#5402) * output afl++ setup * update commit id * update afl++ commit id * asan + cmplog fix * update commit id * update and enhance afl++ * update afl++ commit id, better run asan options * fix linter * add debug_afl script * Update debug_afl * Update compile_afl * fix for karchive * put debug_afl in the docker container * asan poison fix * fix asan settings for zeek * update afl++ commit id * fix * update afl++ commit id * final touches Co-authored-by: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com> --- infra/base-images/base-builder/Dockerfile | 2 +- infra/base-images/base-builder/compile_afl | 3 +-- infra/base-images/base-builder/debug_afl | 12 +++++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) (limited to 'infra/base-images') diff --git a/infra/base-images/base-builder/Dockerfile b/infra/base-images/base-builder/Dockerfile index 373b4769a..66253c5c9 100644 --- a/infra/base-images/base-builder/Dockerfile +++ b/infra/base-images/base-builder/Dockerfile @@ -180,7 +180,7 @@ WORKDIR $SRC # TODO: switch to -b stable once we can. RUN git clone https://github.com/AFLplusplus/AFLplusplus.git aflplusplus && \ cd aflplusplus && \ - git checkout 74a6044b3fba496c1255f9aedbf5b7253ae29f0e + git checkout 7c2436c7114e21f029b06346421a73910deac578 RUN cd $SRC && \ curl -L -O https://github.com/google/honggfuzz/archive/oss-fuzz.tar.gz && \ diff --git a/infra/base-images/base-builder/compile_afl b/infra/base-images/base-builder/compile_afl index b832fd8c3..fa2cb5e89 100644 --- a/infra/base-images/base-builder/compile_afl +++ b/infra/base-images/base-builder/compile_afl @@ -41,7 +41,7 @@ export CXX="$SRC/aflplusplus/afl-clang-fast++" # Be quiet, otherwise this can break some builds. export AFL_QUIET=1 # Several targets run their own tools, so ensure its working. -export AFL_MAP_SIZE=4194304 +export AFL_MAP_SIZE=8000000 # No leak errors during builds. export ASAN_OPTIONS="detect_leaks=0:symbolize=0:detect_odr_violation=0:abort_on_error=1" @@ -51,7 +51,6 @@ export ASAN_OPTIONS="detect_leaks=0:symbolize=0:detect_odr_violation=0:abort_on_ rm -f "$OUT/afl_cmplog.txt" test $(($RANDOM % 10)) -lt 4 && { export AFL_LLVM_CMPLOG=1 - # We need to notify afl-fuzz to activate CMPLOG touch "$OUT/afl_cmplog.txt" } diff --git a/infra/base-images/base-builder/debug_afl b/infra/base-images/base-builder/debug_afl index e3a761c5e..1f79746e5 100755 --- a/infra/base-images/base-builder/debug_afl +++ b/infra/base-images/base-builder/debug_afl @@ -17,19 +17,25 @@ # Source this file for afl++ debug sessions. apt-get update -apt-get install -y strace gdb vim joe +apt-get install -y strace gdb vim joe psmisc pushd $SRC/aflplusplus > /dev/null git checkout dev git pull +test -n "$1" && { git checkout "$1" ; git pull ; } +CFLAGS_SAVE="$CFLAGS" +CXXFLAGS_SAVE="$CXXFLAGS" unset CFLAGS unset CXXFLAGS make +export CFLAGS="$CFLAGS_SAVE" +export CXXFLAGS="$CXXFLAGS_SAVE" popd > /dev/null export ASAN_OPTIONS="detect_leaks=0:symbolize=0:detect_odr_violation=0:abort_on_error=1" -export AFL_MAP_SIZE=4194304 +export AFL_MAP_SIZE=8000000 export AFL_LLVM_LAF_ALL=1 export AFL_LLVM_CMPLOG=1 +touch "$OUT/afl_cmplog.txt" export AFL_LLVM_DICT2FILE=$OUT/afl++.dict -ulimit -c unlimited +ulimit -c unlimited -- cgit v1.2.3