diff --git a/.gitignore b/.gitignore index f641c0be39..cd0ef8af1c 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ afl-clang-lto++.8 afl-clang-lto.8 afl-cmin.8 afl-cmin.bash.8 +afl-cmin.py.8 afl-cs-proxy afl-frida-trace.so afl-fuzz @@ -66,6 +67,8 @@ a.out as compile_commands.json core* +custom_mutators/aflpp/standalone/aflpp-standalone +custom_mutators/autotokens/standalone/autotokens-standalone examples/afl_frida/afl-frida examples/afl_frida/frida-gum-example.c examples/afl_frida/frida-gum.h @@ -83,6 +86,8 @@ out qemu_mode/libcompcov/compcovtest qemu_mode/qemu-* qemu_mode/qemuafl +t +test-instr test/.afl_performance test-instr test/output diff --git a/GNUmakefile b/GNUmakefile index 863b29deea..8e4716ca14 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -534,7 +534,7 @@ test/unittests/unit_hash.o : $(COMM_HDR) include/alloc-inl.h test/unittests/unit @$(CC) $(CFLAGS) $(CFLAGS_FLTO) $(ASAN_CFLAGS) $(SPECIAL_PERFORMANCE) -c test/unittests/unit_hash.c -o test/unittests/unit_hash.o unit_hash: test/unittests/unit_hash.o src/afl-performance.o - @$(CC) $(CFLAGS) $(CFLAGS_FLTO) $(SPECIAL_PERFORMANCE) -Wl,--wrap=exit -Wl,--wrap=printf $^ -o test/unittests/unit_hash $(LDFLAGS) $(ASAN_LDFLAGS) -lcmocka + @$(CC) $(CFLAGS) $(CFLAGS_FLTO) $(ASAN_CFLAGS:-fno-lto=) $(SPECIAL_PERFORMANCE) -Wl,--wrap=exit -Wl,--wrap=printf $^ -o test/unittests/unit_hash $(LDFLAGS) $(ASAN_LDFLAGS:-fno-lto=) -lcmocka ./test/unittests/unit_hash ifdef IS_IOS @ldid -Sentitlements.plist $@ && echo "[+] Signed $@" || { echo "[-] Failed to sign $@"; } @@ -544,7 +544,7 @@ test/unittests/unit_rand.o : $(COMM_HDR) include/alloc-inl.h test/unittests/unit @$(CC) $(CFLAGS) $(CFLAGS_FLTO) $(ASAN_CFLAGS) $(SPECIAL_PERFORMANCE) -c test/unittests/unit_rand.c -o test/unittests/unit_rand.o unit_rand: test/unittests/unit_rand.o src/afl-common.o src/afl-performance.o - @$(CC) $(CFLAGS) $(CFLAGS_FLTO) $(ASAN_CFLAGS) $(SPECIAL_PERFORMANCE) -Wl,--wrap=exit -Wl,--wrap=printf $^ -o test/unittests/unit_rand $(LDFLAGS) $(ASAN_LDFLAGS) -lcmocka + @$(CC) $(CFLAGS) $(CFLAGS_FLTO) $(ASAN_CFLAGS:-fno-lto=) $(SPECIAL_PERFORMANCE) -Wl,--wrap=exit -Wl,--wrap=printf $^ -o test/unittests/unit_rand $(LDFLAGS) $(ASAN_LDFLAGS:-fno-lto=) -lcmocka ./test/unittests/unit_rand ifdef IS_IOS @ldid -Sentitlements.plist $@ && echo "[+] Signed $@" || { echo "[-] Failed to sign $@"; } diff --git a/docs/Changelog.md b/docs/Changelog.md index 986ab0d871..278b7ea210 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -5,10 +5,14 @@ ### Version ++4.34a (dev) + - afl-fuzz + - scroll down before clearing the screen to not loose content - afl-showmap - fix -C parameter breakage introduced in v4.33c - qemu_mode: - fix compilation for a few platforms + - afl-cc: + - make AFL_DUMP_MAP_SIZE work for CLASSIC modes ### Version ++4.33c (release) diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h index a0ee58bf73..01306cff54 100644 --- a/include/afl-fuzz.h +++ b/include/afl-fuzz.h @@ -1253,6 +1253,7 @@ void write_setup_file(afl_state_t *, u32, char **); void write_stats_file(afl_state_t *, u32, double, double, double); void maybe_update_plot_file(afl_state_t *, u32, double, double); void write_queue_stats(afl_state_t *); +void make_space_for_stats(); void show_stats(afl_state_t *); void show_stats_normal(afl_state_t *); void show_stats_pizza(afl_state_t *); diff --git a/instrumentation/SanitizerCoveragePCGUARD.so.cc b/instrumentation/SanitizerCoveragePCGUARD.so.cc index dfccead5a4..53e2d51241 100644 --- a/instrumentation/SanitizerCoveragePCGUARD.so.cc +++ b/instrumentation/SanitizerCoveragePCGUARD.so.cc @@ -1694,3 +1694,4 @@ std::string ModuleSanitizerCoverageAFL::getSectionEnd( return "__stop___" + Section; } + diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c index c06644dfe7..4770e4d9ae 100644 --- a/instrumentation/afl-compiler-rt.o.c +++ b/instrumentation/afl-compiler-rt.o.c @@ -416,6 +416,14 @@ static void __afl_map_shm(void) { } + if (getenv("AFL_DUMP_MAP_SIZE")) { + + printf("%u\n", __afl_map_size); + fflush(stdout); + exit(-1); + + } + if (__afl_sharedmem_fuzzing && (!id_str || !getenv(SHM_FUZZ_ENV_VAR) || fcntl(FORKSRV_FD, F_GETFD) == -1 || fcntl(FORKSRV_FD + 1, F_GETFD) == -1)) { diff --git a/instrumentation/afl-llvm-dict2file.so.cc b/instrumentation/afl-llvm-dict2file.so.cc index d63c861353..5ee2f6fdf9 100644 --- a/instrumentation/afl-llvm-dict2file.so.cc +++ b/instrumentation/afl-llvm-dict2file.so.cc @@ -717,3 +717,4 @@ PreservedAnalyses AFLdict2filePass::run(Module &M, ModuleAnalysisManager &MAM) { return PA; } + diff --git a/instrumentation/afl-llvm-pass.so.cc b/instrumentation/afl-llvm-pass.so.cc index 59cf0aca08..3cff4e2896 100644 --- a/instrumentation/afl-llvm-pass.so.cc +++ b/instrumentation/afl-llvm-pass.so.cc @@ -831,3 +831,4 @@ PreservedAnalyses AFLCoverage::run(Module &M, ModuleAnalysisManager &MAM) { return PreservedAnalyses(); } + diff --git a/instrumentation/cmplog-instructions-pass.cc b/instrumentation/cmplog-instructions-pass.cc index 7cbd5553e7..fc048aafdf 100644 --- a/instrumentation/cmplog-instructions-pass.cc +++ b/instrumentation/cmplog-instructions-pass.cc @@ -579,3 +579,4 @@ PreservedAnalyses CmpLogInstructions::run(Module &M, return PreservedAnalyses(); } + diff --git a/instrumentation/injection-pass.cc b/instrumentation/injection-pass.cc index 5d584f54f6..11a89a225e 100644 --- a/instrumentation/injection-pass.cc +++ b/instrumentation/injection-pass.cc @@ -250,3 +250,4 @@ PreservedAnalyses InjectionRoutines::run(Module &M, return PreservedAnalyses(); } + diff --git a/instrumentation/split-compares-pass.so.cc b/instrumentation/split-compares-pass.so.cc index 10cfc15af8..8fc5d8e5cf 100644 --- a/instrumentation/split-compares-pass.so.cc +++ b/instrumentation/split-compares-pass.so.cc @@ -1792,3 +1792,4 @@ PreservedAnalyses SplitComparesTransform::run(Module &M, return PreservedAnalyses(); } + diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c index 4de2c8559f..987c2d67a1 100644 --- a/src/afl-fuzz-stats.c +++ b/src/afl-fuzz-stats.c @@ -663,6 +663,19 @@ void plot_profile_data(afl_state_t *afl, struct queue_entry *q) { } +/* Scroll the terminal so when the stats clear the screen + we don't delete anything. */ + +void make_space_for_stats() { + + struct winsize ws; + + if (ioctl(1, TIOCGWINSZ, &ws)) { return; } + + SAYF("\x1b[%dS", ws.ws_row); + +} + /* Check terminal dimensions after resize. */ static void check_term_size(afl_state_t *afl) { diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c index e5d5055d37..77b04236fb 100644 --- a/src/afl-fuzz.c +++ b/src/afl-fuzz.c @@ -2978,6 +2978,8 @@ int main(int argc, char **argv_orig, char **envp) { show_init_stats(afl); + if (!getenv("AFL_NO_UI") && !afl->not_on_tty) { make_space_for_stats(); } + if (unlikely(afl->old_seed_selection)) seek_to = find_start_position(afl); afl->start_time = get_cur_time(); diff --git a/utils/aflpp_driver/aflpp_driver.c b/utils/aflpp_driver/aflpp_driver.c index 88f7413c50..c29c6aa2f6 100644 --- a/utils/aflpp_driver/aflpp_driver.c +++ b/utils/aflpp_driver/aflpp_driver.c @@ -65,9 +65,10 @@ extern "C" { #endif #if defined(__APPLE__) && defined(__MACH__) - #define SECTION_RODATA \ - __attribute__((used, retain)) __attribute__((section("__RODATA,__" \ - "rodata"))) + #define SECTION_RODATA \ + __attribute__((used, retain)) __attribute__(( \ + section("__RODATA,__" \ + "rodata"))) #else #define SECTION_RODATA \ __attribute__((used, retain)) __attribute__((section(".rodata")))
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: