Commit Graph

1279 Commits

Author SHA1 Message Date
d540971443 Fix saturated maps & stability cliff in recalibration
I have observed two problems:

  1. A sudden "stability cliff" where stability drops precipitously.

  2. A sudden jump to a 100% saturated "density map".

Both issues are due to attempted "recalibration" of a case at the
beginning of fuzz_one_original() or mopt_common_fuzzing().  See the
comments "CALIBRATION (only if failed earlier on)" in those functions
and the subsequent call to calibrate_case().

At those calls to calibrate_case(), afl->fsrv.trace_bits holds
trace_bits for a run of the SUT on a prior queue entry.  However,
calibrate_case() may use the trace_bits as if they apply to the
current queue entry (afl->queue_cur).

Most often this bug causes the "stability cliff".  Trace bits are
compared for runs on distinct inputs, which can be very different.
The result is a sudden drop in stability.

Sometimes it leads to the "saturated map" problem.  A saturated
density map arises if the trace bits on the previous entry were
"simplified" by simplify_trace().  Simplified traces only contain the
values 1 and 128.  They are meant to be compared against
virgin_crashes and virgin_tmouts.

However, this bug causes the (stale) simplified trace to be compared
against virgin_bits during a call to has_new_bits(), which causes
every byte in vigin_bits to be something other than 255.  The overall
map density is determined by the percentage of bytes not 255, which
will be 100%.  Worse, AFL++ will be unable to detect novel occurrences
of edge counts 1 and 128 going forward.

This patch avoids the above issues by clearing q->exec_cksum when
calibration fails.  Recalibrations are forced to start with a fresh
trace on the queue entry.

Thanks to @andreafioraldi for suggesting the current, improved patch.
2020-06-24 17:59:04 -04:00
1d7c76d141 decrease time to sync for main 2020-06-24 17:37:16 +02:00
fce010f051 add -D option for -S 2020-06-24 11:14:00 +02:00
bdc8e3b79e create .synced/NAMES.last to document last sync attempts 2020-06-24 11:09:33 +02:00
49a769ac06 lto whitelist in test.sh 2020-06-23 21:23:10 +02:00
7119bf5d86 Added rand, hash unittests 2020-06-22 21:58:23 +02:00
ea1222b33f old compiler fix 2020-06-22 21:40:02 +02:00
37edfe2de9 shmem support for afl-tmin and afl-showmap 2020-06-22 19:56:34 +02:00
87f127722c fix afl-cmin.bash 2020-06-22 08:28:41 +02:00
a49b5ef072 allow /tmp 2020-06-22 07:16:24 +02:00
5cad92e57e fix unicorn mode for CFLAGS 2020-06-21 18:07:30 +02:00
eb3cb4bbf8 fix for s=0 2020-06-21 16:21:59 +02:00
b0866f59cc fix for -s 0 2020-06-21 14:08:41 +02:00
b3b016a4a3 fix libradamsa see issue #419 2020-06-20 22:39:12 +02:00
003456f770 fault == afl->crash_mode should be likely
Since during normal fuzzing, crash_mode is FSRV_RUN_OK, and fault is also usually FSRV_RUN_OK since most executions are valid executions, thus it should be likely instead of unlikely
2020-06-18 11:23:10 +08:00
61107c59cf fix displayed schedule 2020-06-17 16:46:30 +02:00
bac2da8669 fix for *BSD: remove all HAVE_ARC4RANDOM dependencies 2020-06-16 01:29:07 +02:00
9c293b5b7b code format 2020-06-15 22:05:37 +02:00
6804065a8d using XX64 for 32 bit hash 2020-06-15 22:03:01 +02:00
246444dd57 tidied hash32, unicorn 2020-06-15 21:40:37 +02:00
f6d2da27e3 switched to new MOpt dictionary support 2020-06-15 21:07:35 +02:00
ada59feda8 improve performance for default power schedule 2020-06-15 20:02:28 +02:00
dc002b4b35 code format 2020-06-15 11:08:24 +02:00
acb0a2f027 fixed potential bugs 2020-06-15 11:07:57 +02:00
741dce3ca6 Merge pull request #404 from devnexen/haiku_porting
Porting to Haiku.
2020-06-14 17:38:17 +02:00
67d87dd2a9 Porting to Haiku.
getrusage does not implement resident memory gathering, no shm api neither.
2020-06-14 15:32:02 +00:00
ab142282a3 kill targets on exit 2020-06-14 16:08:58 +02:00
bfe5b88e78 code format 2020-06-13 14:28:42 +02:00
fc26001b50 fix shmem 2020-06-13 13:47:43 +02:00
1542c7f49c fix typos 2020-06-13 10:58:30 +02:00
615ab1a7b8 fix resize window crash and slightly more performant timed_read 2020-06-13 00:14:14 +02:00
ce1af1bc9c code-format killed the compilation 2020-06-12 16:57:33 +02:00
40aca0b6b3 fix for checksums 2020-06-12 16:33:20 +02:00
a632c00b0d switch to faster and better hash + random 2020-06-12 16:08:49 +02:00
db2e04361d shm debug and fixes 2020-06-12 11:57:54 +02:00
7d19b108c4 fix warnings 2020-06-12 09:23:38 +02:00
818afe6232 added MOpt dictionary support from repo 2020-06-12 08:27:03 +02:00
e8da5f9e28 code format and debug 2020-06-11 19:30:28 +02:00
b3feda052d start of illumos cpu binding implementation.
The current user needs the proc_owner permission, not something doable
 via the settings script.
2020-06-10 16:16:47 +01:00
5cb6dc7795 Merge pull request #398 from devnexen/array_subscript_warn_fix
Disable array subscript warning
2020-06-10 09:25:31 +02:00
4ee4495120 Disable array subscript warning 2020-06-09 22:43:31 +01:00
cbdcd32959 systems w/o affinity support build fix 2020-06-09 22:14:13 +01:00
81829d132b always set status 2020-06-09 17:09:34 +02:00
5fa0f8f55b fix debug output in stats 2020-06-09 17:01:41 +02:00
32a40ab5c5 add cpu affinity to fuzzer_stats 2020-06-09 11:22:27 +02:00
feffae60dd code format 2020-06-09 03:48:50 +02:00
92b8c5bb60 fixed shmap fuzzing 2020-06-09 03:03:21 +02:00
e01cad2f7d qemu debug 2020-06-05 09:42:17 +02:00
a9348e0acc fix cmplog for shmem persistent mode 2020-06-04 16:31:53 +02:00
9a1e22afab typo 2020-06-04 15:31:27 +02:00