From 20c46c0ed6465d49034939416efc979674425dd6 Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Tue, 15 Oct 2024 15:18:51 +0200 Subject: nits --- docs/Changelog.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/Changelog.md') diff --git a/docs/Changelog.md b/docs/Changelog.md index 5b809d61..48f67803 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -16,6 +16,8 @@ - because of bad math and undefined behaviour fixes we have to change the CMPLOG map. **YOU NEED TO RECOMPILE CMPLOG TARGETS** - fixed custom_post_process for calibration + - fixes for AFL_EXIT_ON_TIME and AFL_EXIT_WHEN_DONE, changed behaviour of + AFL_EXIT_WHEN_DONE to finish when really done :-) - frida_mode: - AFL_FRIDA_PERSISTENT_ADDR can now be be any reachable address not just a function entry -- cgit 1.4.1 From a11488b9dcc71e5b52876e8c11ea6ee231e433ba Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Wed, 16 Oct 2024 18:27:10 +0200 Subject: changelog --- docs/Changelog.md | 2 ++ docs/env_variables.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'docs/Changelog.md') diff --git a/docs/Changelog.md b/docs/Changelog.md index 48f67803..8a445084 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -37,6 +37,8 @@ - new runtime (!) variable: `AFL_OLD_FORKSERVER` to use the old vanilla AFL type forkserver. Useful for symcc/symqemu/nautilus/etc. with AFL_LLVM_INSTRUMENT=CLASSIC + - new compile time variable: `AFL_OPT_LEVEL` to set a specific optimization + level, default is `3` - code formatting updated to llvm 18 - improved custom_mutators/aflpp/standalone/aflpp-standalone - added custom_mutators/autotokens/standalone/autotokens-standalone diff --git a/docs/env_variables.md b/docs/env_variables.md index 4824860c..d0789105 100644 --- a/docs/env_variables.md +++ b/docs/env_variables.md @@ -65,7 +65,7 @@ fairly broad use of environment variables instead: `-fno-unroll-loops` are set, these are not overridden. - The optimization level can also be set with `AFL_OPT_LEVEL`, e.g. - `AFL_OPT_LEVEL=z` for `-Oz` + `AFL_OPT_LEVEL=z` for `-Oz`, default is `3` - Setting `AFL_HARDEN` automatically adds code hardening options when invoking the downstream compiler. This currently includes `-D_FORTIFY_SOURCE=2` and -- cgit 1.4.1 From 577b286508a72114d607e41ec37f6f201e9e5ce6 Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Mon, 28 Oct 2024 09:52:51 +0100 Subject: fix explanation how to obtain the map size --- docs/Changelog.md | 1 + instrumentation/afl-compiler-rt.o.c | 6 ++++++ src/afl-forkserver.c | 6 +++--- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'docs/Changelog.md') diff --git a/docs/Changelog.md b/docs/Changelog.md index 8a445084..1d6d9060 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -39,6 +39,7 @@ AFL_LLVM_INSTRUMENT=CLASSIC - new compile time variable: `AFL_OPT_LEVEL` to set a specific optimization level, default is `3` + - correctly explain how to get the correct map size for large targets - code formatting updated to llvm 18 - improved custom_mutators/aflpp/standalone/aflpp-standalone - added custom_mutators/autotokens/standalone/autotokens-standalone diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c index 6084880f..075d4d29 100644 --- a/instrumentation/afl-compiler-rt.o.c +++ b/instrumentation/afl-compiler-rt.o.c @@ -367,6 +367,12 @@ static void __afl_map_shm(void) { } + if (__afl_debug) { + + fprintf(stderr, "DEBUG: AFL_MAP_SIZE=%u\n", __afl_map_size); + + } + if (__afl_final_loc > MAP_SIZE) { char *ptr; diff --git a/src/afl-forkserver.c b/src/afl-forkserver.c index 51299009..9f619c14 100644 --- a/src/afl-forkserver.c +++ b/src/afl-forkserver.c @@ -495,9 +495,9 @@ static void report_error_and_exit(int error) { FATAL( "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."); + "stand-alone with the environment variable AFL_DUMP_MAP_SIZE=1 set " + "the displayed value in the AFL_MAP_SIZE environment variable for " + "afl-fuzz."); break; case FS_ERROR_MAP_ADDR: FATAL( -- cgit 1.4.1