159 Commits

Author SHA1 Message Date
Rishi Ranjan
565da10a8f Minor change to write_with_gap 2020-07-29 01:05:05 +05:30
van Hauser
9cddbc0420 add -F option to sync to foreign fuzzer queues 2020-07-24 12:26:52 +02:00
rish9101
2fa31dab60 Remove reduntant copying from write_with_gap function 2020-07-23 23:48:26 +05:30
rish9101
4898db80cb Add post-process functionality in write_with_gap 2020-07-23 23:16:04 +05:30
van Hauser
e5e485fcdb fix autodict 2020-06-29 00:58:05 +02:00
Andrea Fioraldi
976e99b1d4 original fix for calibration error 2020-06-26 10:17:21 +02:00
van Hauser
171b1923e9 shmem release fix 2020-06-25 22:02:02 +02:00
Dominik Maier
c8f60a7fbf initialized variable 2020-06-25 17:25:16 +02:00
Andrea Fioraldi
4a3305c007
Merge pull request #425 from dgmelski/fix-recalibration
Fix saturated maps & stability cliff in recalibration
2020-06-25 15:16:10 +02:00
van Hauser
b5573b3adb add seek power schedule, remove update stats in calibration, fix help output 2020-06-25 10:33:59 +02:00
David Melski
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
van Hauser
bdc8e3b79e create .synced/NAMES.last to document last sync attempts 2020-06-24 11:09:33 +02:00
van Hauser
a49b5ef072 allow /tmp 2020-06-22 07:16:24 +02:00
van Hauser
5cad92e57e fix unicorn mode for CFLAGS 2020-06-21 18:07:30 +02:00
van Hauser
bfe5b88e78 code format 2020-06-13 14:28:42 +02:00
van Hauser
fc26001b50 fix shmem 2020-06-13 13:47:43 +02:00
van Hauser
a632c00b0d switch to faster and better hash + random 2020-06-12 16:08:49 +02:00
van Hauser
a9348e0acc fix cmplog for shmem persistent mode 2020-06-04 16:31:53 +02:00
van Hauser
dd0ca7335f switch shmem_len to the map 2020-06-03 15:49:23 +02:00
hexcoder-
686d8823eb OpenBSD: add missing limits.h header for PATH_MAX 2020-06-03 17:43:33 +02:00
van Hauser
fc164e4709 code format 2020-06-03 10:50:49 +02:00
Dominik Maier
83112ed5e0 got rid of questionable phrasing 2020-06-02 14:54:24 +02:00
Dominik Maier
ee14785f68 starting shmap support for unicorn 2020-05-31 04:13:41 +02:00
van Hauser
707145c491 persistent mode: shared memory test case transfer 2020-05-25 16:40:55 +02:00
van Hauser
c456e20750 better sync - lesser and better imports 2020-05-20 23:12:33 +02:00
van Hauser
0ed767fac5 forgot the unlink ... 2020-05-19 19:54:10 +02:00
van Hauser
25fbec6638 if no master is present a slave becomes a temporary master 2020-05-19 19:51:54 +02:00
van Hauser
d536ddc240 change: slaves only sync from masters 2020-05-15 09:27:15 +02:00
van Hauser
8cc5442401 fix GNUmakefile 2020-05-13 18:20:06 +02:00
rish9101
9627458ecc Add post library API as custom mutator and rename pre_save 2020-05-13 18:59:12 +05:30
van Hauser
f8b3d34225 move has_new_bits for better performance 2020-05-13 00:41:24 +02:00
van Hauser
fa84e52af0 custom mutator code enhancements and code-format 2020-05-09 11:35:54 +02:00
Rishi Ranjan
190f3024da
Support multiple custom mutators (#282)
* Make a list of custom mutators using env variable

* Set up multiple custom mutators

* Add destroy custom mutator and changes to load_custom_mutator

* Use array instead of list, make changes to afl-fuzz-one for multiple mutators

* Make change to fuzz-one custom_queue_get to support multiple mutators

* Modify custom python mutator support

* Fix bug

* Fix missing afl->mutator->data

* Revert to list with max count

* Change custom_pre_save hook and code format

* Free custom_mutator struct in the list

* Add testcase for multiple custom mutators

* Resolve merge conflict
2020-05-08 20:08:27 +02:00
van Hauser
02887dc164 fix static and profiling compilation and add profiling calculation 2020-05-07 14:09:58 +02:00
van Hauser
4ffa5b0636 fix negative stability bug (hopefully) 2020-04-26 18:42:42 +02:00
Dominik Maier
8197e9b2e4
clang-tidy readability-braces (#323) 2020-04-19 16:42:40 +02:00
van Hauser
c961925356 fix plot_data output and code-format 2020-04-17 07:10:42 +02:00
Dominik Maier
b10007a7b5 renamed duplicated func names 2020-04-16 15:32:04 +02:00
Dominik Maier
19ce862810 decoupled run and classify 2020-04-16 15:21:34 +02:00
Dominik Maier
124665b392 code-format 2020-04-16 14:47:08 +02:00
Dominik Maier
0f08b13fa0 somewhat unified write_to_testcase 2020-04-15 23:22:23 +02:00
van Hauser
21f696f02e fix document mode 2020-04-15 22:26:30 +02:00
Dominik Maier
0c02a8f4d3 changed run_target 2020-04-15 19:23:26 +02:00
Dominik Maier
c009896c34 code format 2020-04-14 19:29:18 +02:00
Dominik Maier
6dc36f1e6e unified forkservered run_target, fixes #308 2020-04-14 19:27:25 +02:00
van Hauser
dda096da03 allow -L -1 to enable mopt in parallel to classic mutation 2020-04-13 12:12:27 +02:00
Andrea Fioraldi
033c743a41 fix all cmplog errors 2020-04-13 11:37:48 +02:00
Andrea Fioraldi
0022cc4782 fix some cmplog refactoring bugs 2020-04-13 10:40:24 +02:00
David CARLIER
7919545499
Better solution for ARM64 build fix (#315) 2020-04-12 16:55:52 +02:00
David CARLIER
ee4e1936d0
build on arm64 fix. tested on Android. (#313) 2020-04-12 14:20:10 +02:00