Commit Graph

1706 Commits

Author SHA1 Message Date
1d9a3d955c Fix memory errors when trim causes testcase growth (#881) (#903)
* Revert "fixed potential double free in custom trim (#881)"

This reverts commit e9d2f72382.

* Revert "fix custom trim for increasing data"

This reverts commit 86a8ef168d.

* Fix memory errors when trim causes testcase growth

Modify trim_case_custom to avoid writing into in_buf because
some custom mutators can cause the testcase to grow rather than
shrink.

Instead of modifying in_buf directly, we write the update out
to the disk when trimming is complete, and then the caller is
responsible for refreshing the in-memory buffer from the file.

This is still a bit sketchy because it does need to modify q->len in
order to notify the upper layers that something changed, and it could
end up telling upper layer code that the q->len is *bigger* than
the buffer (q->testcase_buf) that contains it, which is asking
for trouble down the line somewhere...

* Fix an unlikely situation

Put back some `unlikely()` calls that were in
the e9d2f72382 commit that was
reverted.
2021-05-07 00:14:16 +02:00
6119c2eb5f remove the input file .cur_input at the end of the fuzzing, if AFL_TMPDIR is used 2021-05-01 14:03:28 +02:00
86452cc959 fix stdin trimming 2021-04-30 23:41:06 +02:00
56882f3a49 fix statsd writing 2021-04-30 13:44:59 +02:00
38f1394e3a error handling, freeing mem 2021-04-30 13:37:59 +02:00
e9d2f72382 fixed potential double free in custom trim (#881) 2021-04-30 13:37:59 +02:00
29dbe665a7 nits 2021-04-29 09:12:21 +02:00
39ad3b8946 Frida persistent (#880)
* Added x64 support for persistent mode (function call only), in-memory teest cases and complog

* Review changes, fix NeverZero and code to parse the .text section of the main executable. Excluded ranges TBC

* Various minor fixes and finished support for AFL_INST_LIBS

* Review changes

Co-authored-by: Your Name <you@example.com>
2021-04-28 10:25:26 +02:00
86a8ef168d fix custom trim for increasing data 2021-04-19 11:05:49 +02:00
70bf4b4ab0 Merge pull request #882 from AFLplusplus/havoc2
Havoc
2021-04-17 10:22:59 +02:00
495cbd42b7 reworked formatting in order to avoid gcc 8.3.0 warnings 2021-04-16 21:57:44 +02:00
b03424073e fixes 2021-04-16 13:55:31 +02:00
e41d1183cc fix nits 2021-04-16 00:41:32 +02:00
4f93220c4b cmplog -l3: disable trimming, forcing input2stage for all 2021-04-15 16:50:44 +02:00
b815c32f0e fix ui 2021-04-15 12:22:05 +02:00
cd40fa1745 fix warnings 2021-04-15 11:04:39 +02:00
61a918f820 remove duplicate plot file write 2021-04-15 10:43:18 +02:00
ab0f13ed06 fix writing stat file on exit 2021-04-15 00:11:32 +02:00
5e72568a45 ui update 2021-04-14 17:52:43 +02:00
ae9087b390 update havoc 2021-04-14 17:30:08 +02:00
be880f2476 add AFL_EXIT_ON_SEED_ISSUES 2021-04-13 13:01:50 +02:00
50bb931ea6 ui custom mutator only display 2021-04-13 11:26:27 +02:00
0c06371cda display dictionary usage in havoc only mode 2021-04-13 11:16:12 +02:00
c19d1f0c75 update grammar-mutator, show better fuzzing strategy yields 2021-04-09 12:22:16 +02:00
019b26de58 fix afl_custom_queue_new_entry when syncing 2021-04-09 11:19:48 +02:00
9c517199b2 removed -lc++ linking for lto 2021-04-08 10:03:44 +02:00
bfe7e3fd55 fix forkserver timeout error msg 2021-04-07 14:20:58 +02:00
3c846859ee cleanup 2021-04-04 20:05:02 +02:00
c23183f1dc Merge pull request #855 from MegaManSec/leak-sanitizer
Add support for standalone leak-sanitizer
2021-04-04 15:28:42 +02:00
99819cf5d1 Move definition of __AFL_LEAK_CHECK inside ifguards,
use LSAN_OPTIONS=print_suppressions=0
2021-04-04 12:45:52 +00:00
fee7470083 Remove check for exit_code on LSAN and replace it with check for
symbolize=0.
2021-04-03 14:57:52 +00:00
afc4da47f7 Fix typos,
Use symbolize=0 for LSAN,
Remove syntactic sugar.
2021-04-03 14:50:35 +00:00
6514e33ab6 Replace __AFL_CHECK_LEAK with __AFL_LEAK_CHECK to be more proper.
Fix spelling mistakes.

Correctly call LSAN_ERROR not MSAN_ERROR.
2021-04-02 22:32:38 +00:00
920e9402a4 Add support for standalone leak-sanitizer, introducting the environment
variable AFL_USE_LSAN.

AFL_USE_LSAN introduces the macro __AFL_CHECK_LEAK() which will check
for a memory leak when the macro is run. This is especially helpful
when using __AFL_LOOP().

If __AFL_LEAK_CHECK() is not used when AFL_USE_LSAN=1 is set,
the leak checker will run when the program exits.
2021-04-02 22:23:11 +00:00
3ff4ca348c fix k-ctx 2021-04-02 14:39:56 +02:00
7ca51fab19 ensure one fuzzer sync per cycle, cycle introspection 2021-03-27 12:53:09 +01:00
1edc3ece61 add introspection 2021-03-27 12:50:57 +01:00
eda1ee0807 restructure havoc 2021-03-27 12:24:18 +01:00
96533f627e Merge pull request #845 from joeyjiaojg/dev
Dev
2021-03-26 09:03:51 +01:00
c169cb3911 integrate frida_mode, code-format 2021-03-25 20:10:09 +01:00
00a53a870d Merge pull request #833 from WorksButNotTested/frida
Frida
2021-03-25 19:42:27 +01:00
1725e6be31 Fix support for afl-cmin and updated README 2021-03-25 17:41:14 +00:00
0029c1a83e remove InsTrim 2021-03-25 15:35:06 +01:00
c892642057 android: support host and target 32bit build 2021-03-25 20:40:31 +08:00
90e7543038 update dynamic list 2021-03-25 08:55:04 +01:00
3b860c1dd6 Merge pull request #844 from AFLplusplus/replay
AFL_PERSISTENT_RECORD support
2021-03-25 08:54:21 +01:00
ab394836a9 remove warnings 2021-03-25 08:40:33 +01:00
d319b4a381 support libraries for find_afl_binary 2021-03-24 20:02:58 +01:00
e1384b5086 Add support for FRIDA mode 2021-03-24 18:17:10 +00:00
6e2a0ef233 Merge branch 'replay' into tmp 2021-03-24 18:19:13 +01:00