From f2cd5e1d8e8a97ed86990c0eeb6f00e7c289fc44 Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Sun, 9 Jun 2024 19:15:12 +0200 Subject: v4.22a init --- docs/Changelog.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'docs/Changelog.md') diff --git a/docs/Changelog.md b/docs/Changelog.md index 50494acc..1eb284a0 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -3,6 +3,10 @@ This is the list of all noteworthy changes made in every public release of the tool. See README.md for the general instruction manual. +### Version ++4.22a (dev) + - + + ### Version ++4.21c (release) * afl-fuzz - fixed a regression in afl-fuzz that resulted in a 5-10% performace loss @@ -42,7 +46,6 @@ * Fixed a shmem mmap bug (that rarely came up on MacOS) * libtokencap: script generate_libtoken_dict.sh added by @a-shvedov - ### Version ++4.20c (release) ! A new forkserver communication model is now introduced. afl-fuzz is backward compatible to old compiled targets if they are not built -- cgit 1.4.1 From 8e50c0c103cade9723f115fc92e3065f64c79713 Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Mon, 10 Jun 2024 09:08:44 +0200 Subject: frida verbose --- docs/Changelog.md | 4 +++- frida_mode/src/util.c | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'docs/Changelog.md') diff --git a/docs/Changelog.md b/docs/Changelog.md index 1eb284a0..be3e088c 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -4,7 +4,9 @@ release of the tool. See README.md for the general instruction manual. ### Version ++4.22a (dev) - - + - frida_mode: + - AFL_DEBUG is now the same as AFL_FRIDA_VERBOSE + - AFL_FRIDA_DEBUG_MAPS now works as expected ### Version ++4.21c (release) diff --git a/frida_mode/src/util.c b/frida_mode/src/util.c index 90c10917..1843a78b 100644 --- a/frida_mode/src/util.c +++ b/frida_mode/src/util.c @@ -110,7 +110,11 @@ gboolean util_verbose_enabled(void) { if (!initialized) { initialized = TRUE; - if (getenv("AFL_FRIDA_VERBOSE") != NULL) { util_verbose = TRUE; } + if (getenv("AFL_FRIDA_VERBOSE") || getenv("AFL_DEBUG")) { + + util_verbose = TRUE; + + } } -- cgit 1.4.1 From 75c3fa91dcf2998a2f103d76fc4e0339f6263f5e Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Mon, 10 Jun 2024 22:25:38 +0200 Subject: update changelog --- 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 be3e088c..1590b2df 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -5,6 +5,8 @@ ### Version ++4.22a (dev) - frida_mode: + - AFL_FRIDA_PERSISTENT_ADDR can now be be any reachable address not just + a function entry - AFL_DEBUG is now the same as AFL_FRIDA_VERBOSE - AFL_FRIDA_DEBUG_MAPS now works as expected -- cgit 1.4.1 From 0c9b460cc46aebfa4eb6e1fbe928895c0a8fcfbd Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Wed, 12 Jun 2024 09:16:59 +0200 Subject: MONOTONIC --- docs/Changelog.md | 4 ++++ src/afl-common.c | 55 +++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 47 insertions(+), 12 deletions(-) (limited to 'docs/Changelog.md') diff --git a/docs/Changelog.md b/docs/Changelog.md index 1590b2df..caad513c 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -4,6 +4,10 @@ release of the tool. See README.md for the general instruction manual. ### Version ++4.22a (dev) + - afl-fuzz: + - the reason for the regression in 4.20c has been found, COARSE timing + is measuring too broad for our purpose, MONOTONIC is fine and better + than gettimeofday() so switching to this - frida_mode: - AFL_FRIDA_PERSISTENT_ADDR can now be be any reachable address not just a function entry diff --git a/src/afl-common.c b/src/afl-common.c index efdb5d60..efe680a8 100644 --- a/src/afl-common.c +++ b/src/afl-common.c @@ -59,6 +59,43 @@ u8 last_intr = 0; #define AFL_PATH "/usr/local/lib/afl/" #endif +/* Convert seconds to milliseconds. */ +#define SEC_TO_MS(sec) ((sec) * 1000) +/* Convert seconds to microseconds. */ +#define SEC_TO_US(sec) ((sec) * 1000000) +/* Convert nanoseconds to milliseconds. */ +#define NS_TO_MS(ns) ((ns) / 1000000) +/* Convert nanoseconds to microseconds. */ +#define NS_TO_US(ns) ((ns) / 1000) +/* Convert seconds to milliseconds. */ +#define SEC_TO_MS(sec) ((sec) * 1000) +/* Convert seconds to microseconds. */ +#define SEC_TO_US(sec) ((sec) * 1000000) +/* Convert nanoseconds to milliseconds. */ +#define NS_TO_MS(ns) ((ns) / 1000000) +/* Convert nanoseconds to microseconds. */ +#define NS_TO_US(ns) ((ns) / 1000) +/* Convert nanoseconds to microseconds. */ +#define US_TO_MS(us) ((us) / 1000) +/* Convert seconds to milliseconds. */ +#define SEC_TO_MS(sec) ((sec) * 1000) +/* Convert seconds to microseconds. */ +#define SEC_TO_US(sec) ((sec) * 1000000) +/* Convert nanoseconds to milliseconds. */ +#define NS_TO_MS(ns) ((ns) / 1000000) +/* Convert nanoseconds to microseconds. */ +#define NS_TO_US(ns) ((ns) / 1000) +/* Convert seconds to milliseconds. */ +#define SEC_TO_MS(sec) ((sec) * 1000) +/* Convert seconds to microseconds. */ +#define SEC_TO_US(sec) ((sec) * 1000000) +/* Convert nanoseconds to milliseconds. */ +#define NS_TO_MS(ns) ((ns) / 1000000) +/* Convert nanoseconds to microseconds. */ +#define NS_TO_US(ns) ((ns) / 1000) +/* Convert nanoseconds to microseconds. */ +#define US_TO_MS(us) ((us) / 1000) + void *afl_memmem(const void *haystack, size_t haystacklen, const void *needle, size_t needlelen) { @@ -976,12 +1013,9 @@ void read_bitmap(u8 *fname, u8 *map, size_t len) { inline u64 get_cur_time(void) { - struct timeval tv; - struct timezone tz; - - gettimeofday(&tv, &tz); - - return (tv.tv_sec * 1000ULL) + (tv.tv_usec / 1000); + struct timespec ts; + (void)clock_gettime(CLOCK_MONOTONIC, &ts); + return (u64)(SEC_TO_MS((uint64_t)ts.tv_sec) + NS_TO_MS((uint64_t)ts.tv_nsec)); } @@ -989,12 +1023,9 @@ inline u64 get_cur_time(void) { inline u64 get_cur_time_us(void) { - struct timeval tv; - struct timezone tz; - - gettimeofday(&tv, &tz); - - return (tv.tv_sec * 1000000ULL) + tv.tv_usec; + struct timespec ts; + (void)clock_gettime(CLOCK_MONOTONIC, &ts); + return (u64)(SEC_TO_US((uint64_t)ts.tv_sec) + NS_TO_US((uint64_t)ts.tv_nsec)); } -- cgit 1.4.1 From e7da8b9d6bf20b1cac960b1eccf3beac3fbf7901 Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Thu, 13 Jun 2024 09:18:44 +0200 Subject: Revert "MONOTONIC" This reverts commit 0c9b460cc46aebfa4eb6e1fbe928895c0a8fcfbd. --- docs/Changelog.md | 4 ---- src/afl-common.c | 55 ++++++++++++------------------------------------------- 2 files changed, 12 insertions(+), 47 deletions(-) (limited to 'docs/Changelog.md') diff --git a/docs/Changelog.md b/docs/Changelog.md index caad513c..1590b2df 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -4,10 +4,6 @@ release of the tool. See README.md for the general instruction manual. ### Version ++4.22a (dev) - - afl-fuzz: - - the reason for the regression in 4.20c has been found, COARSE timing - is measuring too broad for our purpose, MONOTONIC is fine and better - than gettimeofday() so switching to this - frida_mode: - AFL_FRIDA_PERSISTENT_ADDR can now be be any reachable address not just a function entry diff --git a/src/afl-common.c b/src/afl-common.c index efe680a8..efdb5d60 100644 --- a/src/afl-common.c +++ b/src/afl-common.c @@ -59,43 +59,6 @@ u8 last_intr = 0; #define AFL_PATH "/usr/local/lib/afl/" #endif -/* Convert seconds to milliseconds. */ -#define SEC_TO_MS(sec) ((sec) * 1000) -/* Convert seconds to microseconds. */ -#define SEC_TO_US(sec) ((sec) * 1000000) -/* Convert nanoseconds to milliseconds. */ -#define NS_TO_MS(ns) ((ns) / 1000000) -/* Convert nanoseconds to microseconds. */ -#define NS_TO_US(ns) ((ns) / 1000) -/* Convert seconds to milliseconds. */ -#define SEC_TO_MS(sec) ((sec) * 1000) -/* Convert seconds to microseconds. */ -#define SEC_TO_US(sec) ((sec) * 1000000) -/* Convert nanoseconds to milliseconds. */ -#define NS_TO_MS(ns) ((ns) / 1000000) -/* Convert nanoseconds to microseconds. */ -#define NS_TO_US(ns) ((ns) / 1000) -/* Convert nanoseconds to microseconds. */ -#define US_TO_MS(us) ((us) / 1000) -/* Convert seconds to milliseconds. */ -#define SEC_TO_MS(sec) ((sec) * 1000) -/* Convert seconds to microseconds. */ -#define SEC_TO_US(sec) ((sec) * 1000000) -/* Convert nanoseconds to milliseconds. */ -#define NS_TO_MS(ns) ((ns) / 1000000) -/* Convert nanoseconds to microseconds. */ -#define NS_TO_US(ns) ((ns) / 1000) -/* Convert seconds to milliseconds. */ -#define SEC_TO_MS(sec) ((sec) * 1000) -/* Convert seconds to microseconds. */ -#define SEC_TO_US(sec) ((sec) * 1000000) -/* Convert nanoseconds to milliseconds. */ -#define NS_TO_MS(ns) ((ns) / 1000000) -/* Convert nanoseconds to microseconds. */ -#define NS_TO_US(ns) ((ns) / 1000) -/* Convert nanoseconds to microseconds. */ -#define US_TO_MS(us) ((us) / 1000) - void *afl_memmem(const void *haystack, size_t haystacklen, const void *needle, size_t needlelen) { @@ -1013,9 +976,12 @@ void read_bitmap(u8 *fname, u8 *map, size_t len) { inline u64 get_cur_time(void) { - struct timespec ts; - (void)clock_gettime(CLOCK_MONOTONIC, &ts); - return (u64)(SEC_TO_MS((uint64_t)ts.tv_sec) + NS_TO_MS((uint64_t)ts.tv_nsec)); + struct timeval tv; + struct timezone tz; + + gettimeofday(&tv, &tz); + + return (tv.tv_sec * 1000ULL) + (tv.tv_usec / 1000); } @@ -1023,9 +989,12 @@ inline u64 get_cur_time(void) { inline u64 get_cur_time_us(void) { - struct timespec ts; - (void)clock_gettime(CLOCK_MONOTONIC, &ts); - return (u64)(SEC_TO_US((uint64_t)ts.tv_sec) + NS_TO_US((uint64_t)ts.tv_nsec)); + struct timeval tv; + struct timezone tz; + + gettimeofday(&tv, &tz); + + return (tv.tv_sec * 1000000ULL) + tv.tv_usec; } -- cgit 1.4.1