From 3827b912c7090314bb011fe6c1ccfaf0d33fc678 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Thu, 2 Jan 2020 08:39:29 +0100 Subject: compile fixes --- docs/ChangeLog | 5 +++-- libdislocator/Makefile | 4 ++-- libtokencap/Makefile | 4 ++-- llvm_mode/Makefile | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/ChangeLog b/docs/ChangeLog index 745f2587..d3b27e35 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -17,8 +17,9 @@ sending a mail to . Version ++2.60d (develop): -------------------------- - - exciting new stuff is coming up :-) - - all the best for the new year! + - afl-fuzz: + - now prints the real python version support compiled in + - added fix from Debian project to compile libdislocator and libtokencap -------------------------- diff --git a/libdislocator/Makefile b/libdislocator/Makefile index dae187e5..279667a1 100644 --- a/libdislocator/Makefile +++ b/libdislocator/Makefile @@ -18,8 +18,8 @@ HELPER_PATH = $(PREFIX)/lib/afl VERSION = $(shell grep '^\#define VERSION ' ../config.h | cut -d '"' -f2) -CFLAGS ?= -O3 -funroll-loops -I ../include/ -CFLAGS += -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign +CFLAGS ?= -O3 -funroll-loops +CFLAGS += -I ../include/ -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign ifdef USEHUGEPAGE CFLAGS += -DUSEHUGEPAGE diff --git a/libtokencap/Makefile b/libtokencap/Makefile index 3ecbf471..804f03c2 100644 --- a/libtokencap/Makefile +++ b/libtokencap/Makefile @@ -18,8 +18,8 @@ HELPER_PATH = $(PREFIX)/lib/afl VERSION = $(shell grep '^\#define VERSION ' ../config.h | cut -d '"' -f2) -CFLAGS ?= -O3 -funroll-loops -I ../include/ -CFLAGS += -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign +CFLAGS ?= -O3 -funroll-loops +CFLAGS += -I ../include/ -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign ifeq "$(shell uname)" "Linux" TARGETS = libtokencap.so diff --git a/llvm_mode/Makefile b/llvm_mode/Makefile index 0e3da147..5bb1aef2 100644 --- a/llvm_mode/Makefile +++ b/llvm_mode/Makefile @@ -261,5 +261,5 @@ vpath % .. ln -sf afl-clang-fast.8 ../afl-clang-fast++.8 clean: - rm -f *.o *.so *~ a.out core core.[1-9][0-9]* .test2 test-instr .test-instr0 .test-instr1 + rm -f *.o *.so *~ a.out core core.[1-9][0-9]* .test2 test-instr .test-instr0 .test-instr1 afl-llvm-pass.dwo rm -f $(PROGS) ../afl-clang-fast++ ../afl-clang-fast*.8 -- cgit 1.4.1 From 710566be93debc87dadf28ce82cac51c177f9dbc Mon Sep 17 00:00:00 2001 From: van Hauser Date: Thu, 2 Jan 2020 10:51:14 +0100 Subject: remove unnecessary conditions --- src/afl-fuzz-one.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c index 4d1ac541..87a1418c 100644 --- a/src/afl-fuzz-one.c +++ b/src/afl-fuzz-one.c @@ -482,6 +482,9 @@ u8 fuzz_one_original(char** argv) { if (use_radamsa > 1) goto radamsa_stage; + +//custom_stage: // not used - yet + if (custom_mutator) { stage_short = "custom"; @@ -541,9 +544,6 @@ u8 fuzz_one_original(char** argv) { : havoc_max_mult * 100)) || queue_cur->passed_det) { - if (use_radamsa > 1) - goto radamsa_stage; - else #ifdef USE_PYTHON goto python_stage; #else @@ -557,9 +557,6 @@ u8 fuzz_one_original(char** argv) { if (master_max && (queue_cur->exec_cksum % master_max) != master_id - 1) { - if (use_radamsa > 1) - goto radamsa_stage; - else #ifdef USE_PYTHON goto python_stage; #else @@ -2266,9 +2263,6 @@ retry_splicing: out_buf = ck_alloc_nozero(len); memcpy(out_buf, in_buf, len); - if (use_radamsa > 1) - goto radamsa_stage; - else #ifdef USE_PYTHON goto python_stage; #else -- cgit 1.4.1 From db2eb7520550cb76647a56e44c1ab226331b9971 Mon Sep 17 00:00:00 2001 From: hexcoder Date: Thu, 2 Jan 2020 17:41:18 +0100 Subject: Typos fixed --- qemu_mode/unsigaction/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu_mode/unsigaction/README.md b/qemu_mode/unsigaction/README.md index 0f3707fd..db7eac83 100644 --- a/qemu_mode/unsigaction/README.md +++ b/qemu_mode/unsigaction/README.md @@ -1,7 +1,7 @@ -# unsigation +# unsigaction -This library disable sigaction when preloaded. +This library disables sigaction handlers when preloaded. Mainly needed by Wine mode but can be used as a separate tool. -A similar solution can be found in is [preeny](https://github.com/zardus/preeny). +A similar solution can be found in [preeny](https://github.com/zardus/preeny). -- cgit 1.4.1 From 80705aca6154e7862c586edd43f69a282e3fd76c Mon Sep 17 00:00:00 2001 From: hexcoder Date: Fri, 3 Jan 2020 07:46:21 +0100 Subject: Typo in name --- src/afl-fuzz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c index f3927d4e..5e9a4169 100644 --- a/src/afl-fuzz.c +++ b/src/afl-fuzz.c @@ -591,7 +591,7 @@ int main(int argc, char** argv) { if (optind == argc || !in_dir || !out_dir) usage(argv[0]); OKF("afl++ is maintained by Marc \"van Hauser\" Heuse, Heiko \"hexcoder\" " - "Eissfeldt and Andrea Fioraldi"); + "Eißfeldt and Andrea Fioraldi"); OKF("afl++ is open source, get it at " "https://github.com/vanhauser-thc/AFLplusplus"); OKF("Power schedules from github.com/mboehme/aflfast"); -- cgit 1.4.1 From 5fda7861fa5266b3ed1581353c85ed92dd761bba Mon Sep 17 00:00:00 2001 From: van Hauser Date: Sun, 5 Jan 2020 16:22:50 +0100 Subject: test.sh honors LLVM_CONFIG --- test/test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test.sh b/test/test.sh index 44cced08..86a76529 100755 --- a/test/test.sh +++ b/test/test.sh @@ -13,6 +13,8 @@ OK=OK diff -q test.1 test.2 >/dev/null 2>&1 || OK= rm -f test.1 test.2 test -z "$OK" && { echo Error: diff -q is not working ; exit 1 ; } +test -z "$LLVM_CONFIG" && LLVM_CONFIG=llvm-config + ECHO="printf %b\\n" $ECHO \\101 2>&1 | grep -qE '^A' || { @@ -179,7 +181,7 @@ test -e ../afl-clang-fast -a -e ../split-switches-pass.so && { if which clang >/dev/null; then export AFL_CC=`which clang` else - export AFL_CC=`llvm-config --bindir`/clang + export AFL_CC=`$LLVM_CONFIG --bindir`/clang fi ../afl-clang-fast -o test-instr.plain ../test-instr.c > /dev/null 2>&1 AFL_HARDEN=1 ../afl-clang-fast -o test-compcov.harden test-compcov.c > /dev/null 2>&1 -- cgit 1.4.1 From e7fc1ef49e8c9d8fa563f321f5e5906ce8fad69d Mon Sep 17 00:00:00 2001 From: van Hauser Date: Mon, 6 Jan 2020 10:05:33 +0100 Subject: minor fix for man page install --- Android.bp | 1 + Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Android.bp b/Android.bp index 9fdf6f04..e59129db 100644 --- a/Android.bp +++ b/Android.bp @@ -129,6 +129,7 @@ cc_library_static { vendor_available: true, host_supported: true, recovery_available: true, + sdk_version: "9", defaults: [ "afl-defaults", diff --git a/Makefile b/Makefile index db65e9ad..a2df4caf 100644 --- a/Makefile +++ b/Makefile @@ -400,7 +400,7 @@ endif set -e; if [ -f afl-clang-fast ] ; then ln -sf afl-clang-fast $${DESTDIR}$(BIN_PATH)/afl-clang ; ln -sf afl-clang-fast $${DESTDIR}$(BIN_PATH)/afl-clang++ ; else ln -sf afl-gcc $${DESTDIR}$(BIN_PATH)/afl-clang ; ln -sf afl-gcc $${DESTDIR}$(BIN_PATH)/afl-clang++; fi mkdir -m 0755 -p ${DESTDIR}$(MAN_PATH) - install -m0644 -D *.8 ${DESTDIR}$(MAN_PATH) + install -m0644 *.8 ${DESTDIR}$(MAN_PATH) install -m 755 afl-as $${DESTDIR}$(HELPER_PATH) ln -sf afl-as $${DESTDIR}$(HELPER_PATH)/as -- cgit 1.4.1 From 67cbeeb395c7e0aa8820e79c92f5e8e1322f8be0 Mon Sep 17 00:00:00 2001 From: Andrea Fioraldi Date: Mon, 6 Jan 2020 11:46:14 +0100 Subject: added ++ to copyright notes --- Makefile | 2 +- afl-cmin | 2 +- afl-plot | 2 +- afl-whatsup | 2 +- experimental/argv_fuzzing/Makefile | 2 +- experimental/argv_fuzzing/argv-fuzz-inl.h | 2 +- experimental/argv_fuzzing/argvfuzz.c | 2 +- experimental/asan_cgroups/limit_memory.sh | 2 +- experimental/canvas_harness/canvas_harness.html | 2 +- experimental/clang_asm_normalize/as | 2 +- experimental/crash_triage/triage_crashes.sh | 2 +- experimental/distributed_fuzzing/sync_script.sh | 2 +- experimental/persistent_demo/persistent_demo.c | 2 +- experimental/post_library/post_library.so.c | 2 +- experimental/post_library/post_library_png.so.c | 2 +- gcc_plugin/Makefile | 2 +- gcc_plugin/afl-gcc-fast.c | 2 +- gcc_plugin/afl-gcc-pass.so.cc | 2 +- gcc_plugin/afl-gcc-rt.o.c | 2 +- libdislocator/Makefile | 2 +- libdislocator/libdislocator.so.c | 2 +- libtokencap/Makefile | 2 +- libtokencap/libtokencap.so.c | 2 +- llvm_mode/Makefile | 2 +- llvm_mode/afl-clang-fast.c | 3 ++- llvm_mode/afl-llvm-pass.so.cc | 3 ++- llvm_mode/afl-llvm-rt.o.c | 3 ++- qemu_mode/build_qemu_support.sh | 2 +- qemu_mode/libcompcov/Makefile | 2 +- qemu_mode/unsigaction/Makefile | 2 +- src/afl-fuzz.c | 2 +- src/afl-gotcpu.c | 2 +- test-instr.c | 2 +- 33 files changed, 36 insertions(+), 33 deletions(-) diff --git a/Makefile b/Makefile index 1bfa3f77..61d4318c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# american fuzzy lop - makefile +# american fuzzy lop++ - makefile # ----------------------------- # # Written by Michal Zalewski diff --git a/afl-cmin b/afl-cmin index e4e0fd85..471e4790 100755 --- a/afl-cmin +++ b/afl-cmin @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# american fuzzy lop - corpus minimization tool +# american fuzzy lop++ - corpus minimization tool # --------------------------------------------- # # Written by Michal Zalewski diff --git a/afl-plot b/afl-plot index b6108a09..51ed6787 100755 --- a/afl-plot +++ b/afl-plot @@ -1,6 +1,6 @@ #!/bin/sh # -# american fuzzy lop - Advanced Persistent Graphing +# american fuzzy lop++ - Advanced Persistent Graphing # ------------------------------------------------- # # Written by Michal Zalewski diff --git a/afl-whatsup b/afl-whatsup index 01f28aab..c31f0d22 100755 --- a/afl-whatsup +++ b/afl-whatsup @@ -1,6 +1,6 @@ #!/bin/sh # -# american fuzzy lop - status check tool +# american fuzzy lop++ - status check tool # -------------------------------------- # # Written by Michal Zalewski diff --git a/experimental/argv_fuzzing/Makefile b/experimental/argv_fuzzing/Makefile index 25b6f1f6..22e74f97 100644 --- a/experimental/argv_fuzzing/Makefile +++ b/experimental/argv_fuzzing/Makefile @@ -1,5 +1,5 @@ # -# american fuzzy lop - argvfuzz +# american fuzzy lop++ - argvfuzz # -------------------------------- # # Copyright 2019 Kjell Braden diff --git a/experimental/argv_fuzzing/argv-fuzz-inl.h b/experimental/argv_fuzzing/argv-fuzz-inl.h index 6b9be654..32c4bb3a 100644 --- a/experimental/argv_fuzzing/argv-fuzz-inl.h +++ b/experimental/argv_fuzzing/argv-fuzz-inl.h @@ -1,5 +1,5 @@ /* - american fuzzy lop - sample argv fuzzing wrapper + american fuzzy lop++ - sample argv fuzzing wrapper ------------------------------------------------ Written by Michal Zalewski diff --git a/experimental/argv_fuzzing/argvfuzz.c b/experimental/argv_fuzzing/argvfuzz.c index 65fb5e13..939bd540 100644 --- a/experimental/argv_fuzzing/argvfuzz.c +++ b/experimental/argv_fuzzing/argvfuzz.c @@ -1,5 +1,5 @@ /* - american fuzzy lop - LD_PRELOAD for fuzzing argv in binaries + american fuzzy lop++ - LD_PRELOAD for fuzzing argv in binaries ------------------------------------------------------------ Copyright 2019 Kjell Braden diff --git a/experimental/asan_cgroups/limit_memory.sh b/experimental/asan_cgroups/limit_memory.sh index 97950410..ac3a90fe 100755 --- a/experimental/asan_cgroups/limit_memory.sh +++ b/experimental/asan_cgroups/limit_memory.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# american fuzzy lop - limit memory using cgroups +# american fuzzy lop++ - limit memory using cgroups # ----------------------------------------------- # # Written by Samir Khakimov and diff --git a/experimental/canvas_harness/canvas_harness.html b/experimental/canvas_harness/canvas_harness.html index 7b31d8b4..54583f70 100644 --- a/experimental/canvas_harness/canvas_harness.html +++ b/experimental/canvas_harness/canvas_harness.html @@ -1,7 +1,7 @@