Commit Graph

1445 Commits

Author SHA1 Message Date
c25a602a03 less problematic definitions 2020-06-28 23:47:57 +02:00
81974c4d5e debug code 2020-06-28 22:50:18 +02:00
ee17782e61 fix output for LTOinstrim 2020-06-28 00:13:31 +02:00
29e41a09d5 fix typos 2020-06-27 18:16:27 +02:00
4103687f76 afl-sharedmem.c: fix leaks on error paths (SysV shared memory) 2020-06-27 00:13:24 +02:00
976e99b1d4 original fix for calibration error 2020-06-26 10:17:21 +02:00
1ecfd78418 implement sharedmem mmap for cmplog 2020-06-26 09:13:07 +02:00
07fead0466 fix shared memory leaks in afl-showmap, initialize cmplog_mode 2020-06-26 01:14:21 +02:00
8bd8442bcc fix for schedules 2020-06-25 22:44:46 +02:00
171b1923e9 shmem release fix 2020-06-25 22:02:02 +02:00
8d5eb9487d make llvm_mode pcguard instrumentation collision free 2020-06-25 20:09:56 +02:00
c8f60a7fbf initialized variable 2020-06-25 17:25:16 +02:00
8178f4dfdd remove radamsa, add radamsa custom mutator 2020-06-25 16:51:29 +02:00
4a3305c007 Merge pull request #425 from dgmelski/fix-recalibration
Fix saturated maps & stability cliff in recalibration
2020-06-25 15:16:10 +02:00
b5573b3adb add seek power schedule, remove update stats in calibration, fix help output 2020-06-25 10:33:59 +02:00
15dd4ad177 fix plot 2020-06-25 08:50:34 +02:00
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