From 9d87f408dd6537ee4dbcf390496a0518f0c817ef Mon Sep 17 00:00:00 2001 From: Sergej Schumilo Date: Fri, 21 Jan 2022 06:50:26 +0100 Subject: update nyx_mode git submodules --- nyx_mode/QEMU-Nyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nyx_mode/QEMU-Nyx') diff --git a/nyx_mode/QEMU-Nyx b/nyx_mode/QEMU-Nyx index d5a7011a..902306be 160000 --- a/nyx_mode/QEMU-Nyx +++ b/nyx_mode/QEMU-Nyx @@ -1 +1 @@ -Subproject commit d5a7011ad20ba5ba91f1371f9d40154035d5d768 +Subproject commit 902306beb01d858dcbcbaf0e1be26ce9dd0f293f -- cgit 1.4.1 From 22da04f077d2a5b16ffb48acbd668f29d21e6b64 Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Fri, 21 Jan 2022 10:13:37 +0100 Subject: fix --- nyx_mode/QEMU-Nyx | 2 +- nyx_mode/libnyx | 2 +- nyx_mode/packer | 2 +- src/afl-cc.c | 8 +++---- utils/aflpp_driver/aflpp_driver.c | 48 ++++++++++++++++++++------------------- 5 files changed, 31 insertions(+), 31 deletions(-) (limited to 'nyx_mode/QEMU-Nyx') diff --git a/nyx_mode/QEMU-Nyx b/nyx_mode/QEMU-Nyx index 902306be..d5a7011a 160000 --- a/nyx_mode/QEMU-Nyx +++ b/nyx_mode/QEMU-Nyx @@ -1 +1 @@ -Subproject commit 902306beb01d858dcbcbaf0e1be26ce9dd0f293f +Subproject commit d5a7011ad20ba5ba91f1371f9d40154035d5d768 diff --git a/nyx_mode/libnyx b/nyx_mode/libnyx index a5ae4c13..ecbcb2d7 160000 --- a/nyx_mode/libnyx +++ b/nyx_mode/libnyx @@ -1 +1 @@ -Subproject commit a5ae4c13e11de776779444eb69932802e102d7c4 +Subproject commit ecbcb2d7234fef0b5e1db8ca6019e6137ee0582d diff --git a/nyx_mode/packer b/nyx_mode/packer index 8842549b..f91742ce 160000 --- a/nyx_mode/packer +++ b/nyx_mode/packer @@ -1 +1 @@ -Subproject commit 8842549b5612a890258dcef812276cfdb62b76c7 +Subproject commit f91742ce6c51eee133b5675edd68f39202785db1 diff --git a/src/afl-cc.c b/src/afl-cc.c index 974b1d2a..9197c74b 100644 --- a/src/afl-cc.c +++ b/src/afl-cc.c @@ -767,15 +767,13 @@ static void edit_params(u32 argc, char **argv, char **envp) { u8 *afllib = find_object("libAFLDriver.a", argv[0]); if (!be_quiet) - WARNF( - "Found erroneous '-fsanitize=fuzzer', trying to replace with " - "libAFLDriver.a"); + OKF("Found '-fsanitize=fuzzer', replacing with libAFLDriver.a"); if (!afllib) { WARNF( - "Cannot find 'libAFLDriver.a' to replace a wrong " - "'-fsanitize=fuzzer' in the flags - this will fail!"); + "Cannot find 'libAFLDriver.a' to replace '-fsanitize=fuzzer' in " + "the flags - this will fail!"); } else { diff --git a/utils/aflpp_driver/aflpp_driver.c b/utils/aflpp_driver/aflpp_driver.c index 547b78fb..c648674a 100644 --- a/utils/aflpp_driver/aflpp_driver.c +++ b/utils/aflpp_driver/aflpp_driver.c @@ -84,6 +84,8 @@ __attribute__((weak)) void __asan_unpoison_memory_region( } +__attribute__((weak)) void *__asan_region_is_poisoned(void *beg, size_t size); + // Notify AFL about persistent mode. static volatile char AFL_PERSISTENT[] = "##SIG_AFL_PERSISTENT##"; int __afl_persistent_loop(unsigned int); @@ -328,45 +330,45 @@ int main(int argc, char **argv) { __asan_poison_memory_region(__afl_fuzz_ptr, MAX_FILE); size_t prev_length = 0; - int num_runs = 0; - while (__afl_persistent_loop(N)) { + // for speed only insert asan functions if the target is linked with asan + if (__asan_region_is_poisoned) { - size_t length = *__afl_fuzz_len; + while (__afl_persistent_loop(N)) { -#ifdef _DEBUG - fprintf(stderr, "CLIENT crc: %016llx len: %u\n", - hash64(__afl_fuzz_ptr, *__afl_fuzz_len, 0xa5b35705), - *__afl_fuzz_len); - fprintf(stderr, "RECV:"); - for (int i = 0; i < *__afl_fuzz_len; i++) - fprintf(stderr, "%02x", __afl_fuzz_ptr[i]); - fprintf(stderr, "\n"); -#endif + size_t length = *__afl_fuzz_len; - if (length) { + if (likely(length)) { - if (length < prev_length) { + if (length < prev_length) { - __asan_poison_memory_region(__afl_fuzz_ptr + length, - prev_length - length); + __asan_poison_memory_region(__afl_fuzz_ptr + length, + prev_length - length); - } else { + } else if (length > prev_length) { + + __asan_unpoison_memory_region(__afl_fuzz_ptr + prev_length, + length - prev_length); - __asan_unpoison_memory_region(__afl_fuzz_ptr + prev_length, - length - prev_length); + } + + prev_length = length; + LLVMFuzzerTestOneInput(__afl_fuzz_ptr, length); } - prev_length = length; + } - num_runs++; - LLVMFuzzerTestOneInput(__afl_fuzz_ptr, length); + } else { + + while (__afl_persistent_loop(N)) { + + LLVMFuzzerTestOneInput(__afl_fuzz_ptr, *__afl_fuzz_len); } } - printf("%s: successfully executed %d input(s)\n", argv[0], num_runs); + return 0; } -- cgit 1.4.1 From 0090b3a3f01cad64a0d27c064d00eb87aa68ffef Mon Sep 17 00:00:00 2001 From: Sergej Schumilo Date: Fri, 21 Jan 2022 21:03:07 +0100 Subject: update Nyx submodules --- nyx_mode/LIBNYX_VERSION | 2 +- nyx_mode/QEMU-Nyx | 2 +- nyx_mode/QEMU_NYX_VERSION | 2 +- nyx_mode/libnyx | 2 +- nyx_mode/packer | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'nyx_mode/QEMU-Nyx') diff --git a/nyx_mode/LIBNYX_VERSION b/nyx_mode/LIBNYX_VERSION index 109c3c6f..b45b4e90 100644 --- a/nyx_mode/LIBNYX_VERSION +++ b/nyx_mode/LIBNYX_VERSION @@ -1 +1 @@ -a5ae4c1 +2e45754 diff --git a/nyx_mode/QEMU-Nyx b/nyx_mode/QEMU-Nyx index d5a7011a..c2c69cfc 160000 --- a/nyx_mode/QEMU-Nyx +++ b/nyx_mode/QEMU-Nyx @@ -1 +1 @@ -Subproject commit d5a7011ad20ba5ba91f1371f9d40154035d5d768 +Subproject commit c2c69cfc528398d9db9363b92f8c50db4008c98f diff --git a/nyx_mode/QEMU_NYX_VERSION b/nyx_mode/QEMU_NYX_VERSION index 96133165..be13a784 100644 --- a/nyx_mode/QEMU_NYX_VERSION +++ b/nyx_mode/QEMU_NYX_VERSION @@ -1 +1 @@ -902306beb0 +c2c69cfc52 diff --git a/nyx_mode/libnyx b/nyx_mode/libnyx index ecbcb2d7..2e45754e 160000 --- a/nyx_mode/libnyx +++ b/nyx_mode/libnyx @@ -1 +1 @@ -Subproject commit ecbcb2d7234fef0b5e1db8ca6019e6137ee0582d +Subproject commit 2e45754e271463f446c31a6f467231d8657910e8 diff --git a/nyx_mode/packer b/nyx_mode/packer index f91742ce..8842549b 160000 --- a/nyx_mode/packer +++ b/nyx_mode/packer @@ -1 +1 @@ -Subproject commit f91742ce6c51eee133b5675edd68f39202785db1 +Subproject commit 8842549b5612a890258dcef812276cfdb62b76c7 -- cgit 1.4.1 From 3609912f41ec5d639719bfdd2770e09cf3932bf9 Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Sat, 22 Jan 2022 10:31:50 +0100 Subject: new logo --- README.md | 2 +- nyx_mode/QEMU-Nyx | 2 +- nyx_mode/libnyx | 2 +- nyx_mode/packer | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'nyx_mode/QEMU-Nyx') diff --git a/README.md b/README.md index 966e8036..ccef6e30 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # American Fuzzy Lop plus plus (AFL++) -AFL++ logo +AFL++ logo Release version: [3.14c](https://github.com/AFLplusplus/AFLplusplus/releases) diff --git a/nyx_mode/QEMU-Nyx b/nyx_mode/QEMU-Nyx index c2c69cfc..d5a7011a 160000 --- a/nyx_mode/QEMU-Nyx +++ b/nyx_mode/QEMU-Nyx @@ -1 +1 @@ -Subproject commit c2c69cfc528398d9db9363b92f8c50db4008c98f +Subproject commit d5a7011ad20ba5ba91f1371f9d40154035d5d768 diff --git a/nyx_mode/libnyx b/nyx_mode/libnyx index 2e45754e..ecbcb2d7 160000 --- a/nyx_mode/libnyx +++ b/nyx_mode/libnyx @@ -1 +1 @@ -Subproject commit 2e45754e271463f446c31a6f467231d8657910e8 +Subproject commit ecbcb2d7234fef0b5e1db8ca6019e6137ee0582d diff --git a/nyx_mode/packer b/nyx_mode/packer index 8842549b..f91742ce 160000 --- a/nyx_mode/packer +++ b/nyx_mode/packer @@ -1 +1 @@ -Subproject commit 8842549b5612a890258dcef812276cfdb62b76c7 +Subproject commit f91742ce6c51eee133b5675edd68f39202785db1 -- cgit 1.4.1 From 04e3b5a6d3ae33699f29d88bedb48432ed14f708 Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Sun, 23 Jan 2022 18:38:04 +0100 Subject: update commit ids --- custom_mutators/grammar_mutator/grammar_mutator | 2 +- nyx_mode/QEMU-Nyx | 2 +- nyx_mode/libnyx | 2 +- nyx_mode/packer | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'nyx_mode/QEMU-Nyx') diff --git a/custom_mutators/grammar_mutator/grammar_mutator b/custom_mutators/grammar_mutator/grammar_mutator index 6ca490c6..cbe5e327 160000 --- a/custom_mutators/grammar_mutator/grammar_mutator +++ b/custom_mutators/grammar_mutator/grammar_mutator @@ -1 +1 @@ -Subproject commit 6ca490c66b949db20d8c861ebc8fb2e6ca725ead +Subproject commit cbe5e32752773945e0142fac9f1b7a0ccb5dcdff diff --git a/nyx_mode/QEMU-Nyx b/nyx_mode/QEMU-Nyx index d5a7011a..c2c69cfc 160000 --- a/nyx_mode/QEMU-Nyx +++ b/nyx_mode/QEMU-Nyx @@ -1 +1 @@ -Subproject commit d5a7011ad20ba5ba91f1371f9d40154035d5d768 +Subproject commit c2c69cfc528398d9db9363b92f8c50db4008c98f diff --git a/nyx_mode/libnyx b/nyx_mode/libnyx index ecbcb2d7..a5ae4c13 160000 --- a/nyx_mode/libnyx +++ b/nyx_mode/libnyx @@ -1 +1 @@ -Subproject commit ecbcb2d7234fef0b5e1db8ca6019e6137ee0582d +Subproject commit a5ae4c13e11de776779444eb69932802e102d7c4 diff --git a/nyx_mode/packer b/nyx_mode/packer index f91742ce..8842549b 160000 --- a/nyx_mode/packer +++ b/nyx_mode/packer @@ -1 +1 @@ -Subproject commit f91742ce6c51eee133b5675edd68f39202785db1 +Subproject commit 8842549b5612a890258dcef812276cfdb62b76c7 -- cgit 1.4.1