From 501dff4409ecfd4569418ffd95ac68bc3f47e7d9 Mon Sep 17 00:00:00 2001 From: Thomas HUET Date: Sat, 21 May 2016 18:49:16 +0200 Subject: [PATCH] 2.09b --- Makefile | 3 ++- afl-fuzz.c | 22 +++++++++++++++++++++- docs/ChangeLog | 8 ++++++++ docs/README | 4 ++++ docs/sister_projects.txt | 8 ++++++++ llvm_mode/README.llvm | 4 +++- 6 files changed, 46 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4a711581..08cb75e7 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ # PROGNAME = afl -VERSION = 2.08b +VERSION = 2.09b PREFIX ?= /usr/local BIN_PATH = $(PREFIX)/bin @@ -103,6 +103,7 @@ test_build: afl-gcc afl-as afl-showmap endif all_done: test_build + @if [ ! "`which clang 2>/dev/null`" = "" ]; then echo "[+] LLVM users: see llvm_mode/README.llvm for a faster alternative to afl-gcc."; fi @echo "[+] All done! Be sure to review README - it's pretty short and useful." @if [ "`uname`" = "Darwin" ]; then printf "\nWARNING: Fuzzing on MacOS X is slow because of the unusually high overhead of\nfork() on this OS. Consider using Linux or *BSD. You can also use VirtualBox\n(virtualbox.org) to put AFL inside a Linux or *BSD VM.\n\n"; fi @! tty <&1 >/dev/null || printf "\033[0;30mNOTE: If you can read this, your terminal probably uses white background.\nThis will make the UI hard to read. See docs/status_screen.txt for advice.\033[0m\n" 2>/dev/null diff --git a/afl-fuzz.c b/afl-fuzz.c index 763f185e..9cd63e3e 100644 --- a/afl-fuzz.c +++ b/afl-fuzz.c @@ -4130,8 +4130,26 @@ static void show_stats(void) { if (!no_cpu_meter_red && cur_utilization >= 150) cpu_color = cLRD; +#ifdef HAVE_AFFINITY + + if (use_affinity) { + + SAYF(SP10 cGRA "[cpu@%02u:%s%3u%%" cGRA "]\r" cRST, + MIN(cpu_aff_child, 99), cpu_color, + MIN(cur_utilization, 999)); + + } else { + + SAYF(SP10 cGRA " [cpu:%s%3u%%" cGRA "]\r" cRST, + cpu_color, MIN(cur_utilization, 999)); + + } +#else + SAYF(SP10 cGRA " [cpu:%s%3u%%" cGRA "]\r" cRST, - cpu_color, cur_utilization < 999 ? cur_utilization : 999); + cpu_color, MIN(cur_utilization, 999)); + +#endif /* ^HAVE_AFFINITY */ } else SAYF("\r"); @@ -7166,6 +7184,8 @@ static void get_core_count(void) { if (use_affinity) OKF("Using specified CPU affinity: main = %u, child = %u", cpu_aff_main, cpu_aff_child); + else if (cpu_core_count > 1) + OKF(cBRI "Try setting CPU affinity (-Z) for a performance boost!" cRST); #endif /* HAVE_AFFINITY */ diff --git a/docs/ChangeLog b/docs/ChangeLog index d20e1d7a..1ff69765 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -16,6 +16,14 @@ Not sure if you should upgrade? The lowest currently recommended version is 2.07b. If you're stuck on an earlier release, it's strongly advisable to get on with the times. +-------------- +Version 2.09b: +-------------- + + - Made several documentation updates. + + - Added some visual indicators to promote and simplify the use of -Z. + -------------- Version 2.08b: -------------- diff --git a/docs/README b/docs/README index a84561c7..d438adca 100644 --- a/docs/README +++ b/docs/README @@ -256,6 +256,10 @@ multi-core systems, parallelization is necessary to fully utilize the hardware. For tips on how to fuzz a common target on multiple cores or multiple networked machines, please refer to parallel_fuzzing.txt. +The parallel fuzzing mode also offers a simple way for interfacing AFL to other +fuzzers, to symbolic or concolic execution engines, and so forth; again, see the +last section of parallel_fuzzing.txt for tips. + 9) Fuzzer dictionaries ---------------------- diff --git a/docs/sister_projects.txt b/docs/sister_projects.txt index b0d4d310..067a7f37 100644 --- a/docs/sister_projects.txt +++ b/docs/sister_projects.txt @@ -32,6 +32,14 @@ afl.rs (Keegan McAllister) https://github.com/kmcallister/afl.rs +OCaml support (KC Sivaramakrishnan) +----------------------------------- + + Adds AFL-compatible instrumentation to OCaml programs. + + https://github.com/ocamllabs/opam-repo-dev/pull/23 + http://canopy.mirage.io/Posts/Fuzzing + AFL for GCJ Java and other GCC frontends (-) -------------------------------------------- diff --git a/llvm_mode/README.llvm b/llvm_mode/README.llvm index 549002e1..f3789e2b 100644 --- a/llvm_mode/README.llvm +++ b/llvm_mode/README.llvm @@ -148,7 +148,9 @@ The basic structure of the program that does this would be: The numerical value specified within the loop controls the maximum number of iterations before AFL will restart the process from scratch. This minimizes -the impact of memory leaks and similar glitches; 1000 is a good starting point. +the impact of memory leaks and similar glitches; 1000 is a good starting point, +and going much higher increases the likelihood of hiccups without giving you +any real performance benefits. A more detailed template is shown in ../experimental/persistent_demo/. Similarly to the previous mode, the feature works only with afl-clang-fast;