Commit Graph

1465 Commits

Author SHA1 Message Date
3d28925c13 additional safety checks for restarts 2021-05-15 18:23:13 +02:00
000c729095 added bounds check to pivot_inputs (fixes #921) 2021-05-15 17:33:05 +02:00
72ca9b4684 fix a few cur_time uses 2021-05-11 22:06:37 +02:00
fd077e86bd OSX-specific improvements (#912)
* Fix afl-cc to work correctly by default on OSX using xcode

- CLANG_ENV_VAR must be set for afl-as to work
- Use clang mode by default if no specific compiler selected

* Add OSX-specific documentation for configuring shared memory
2021-05-11 00:20:28 +02:00
50af4654e3 code-format 2021-05-10 13:46:31 +02:00
ceb138cefe afl-plot: relative time 2021-05-10 10:31:11 +02:00
b409d63fd3 fix 2021-05-08 11:24:04 +02:00
6c274546c4 ensure crashes/README.txt exists 2021-05-08 11:03:56 +02:00
069e61dfc6 Exit on time (#904)
* Variable AFL_EXIT_ON_TIME description has been added.
Variables AFL_EXIT_ON_TIME and afl_exit_on_time has been added.
afl->exit_on_time variable initialization has been added.
The asignment of a value to the afl->afl_env.afl_exit_on_time variable from
environment variables has been added.
Code to exit on timeout if new path not found has been added.

* Type of afl_exit_on_time variable has been changed.
Variable exit_on_time has been added to the afl_state_t structure.

* Command `export AFL_EXIT_WHEN_DONE=1` has been added.

* Millisecond to second conversion has been added.
Call get_cur_time() has been added.

* Revert to using the saved current time value.

* Useless check has been removed.
2021-05-07 17:32:17 +02:00
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