708 Commits

Author SHA1 Message Date
vanhauser-thc
f9ca2cf989 v3.13c release 2021-06-01 12:15:14 +02:00
vanhauser-thc
8017f88614 debug ck_write 2021-06-01 11:00:56 +02:00
hexcoder
97a1f89881
Merge branch 'dev' into going_atomic 2021-05-31 19:18:24 +02:00
hexcoder-
c9539aa6b7 support new env var AFL_LLVM_THREADSAFE_INST to enable atomic counters.
add new test case for that.
2021-05-30 11:45:11 +02:00
WorksButNotTested
6883605d13
Support writing Stalker stats (#945)
* Support writing Stalker stats

* Fixed string handling in print functions

Co-authored-by: Your Name <you@example.com>
2021-05-29 00:43:14 +02:00
WorksButNotTested
f677be5e86
Support for AFL_FRIDA_PERSISTENT_RET (#941)
Co-authored-by: Your Name <you@example.com>
2021-05-27 22:33:44 +02:00
vanhauser-thc
87b16c4460 add AFL_TRY_AFFINITY 2021-05-25 10:45:24 +02:00
vanhauser-thc
8e75adfee5 AFL_SKIP_CRASHES is obsolete since 3.0 2021-05-25 09:22:50 +02:00
vanhauser-thc
109383f438 less executions on variable paths 2021-05-25 09:08:31 +02:00
Dominik Maier
cdae3d3d03 cleaned up AFL_PRINT_FILENAMES env 2021-05-19 22:21:46 +02:00
WorksButNotTested
e40c0c2da1
FASAN Support (#918)
* FASAN Support

* Fix handling of Address Sanitizer DSO

* Changes to identification of Address Sanitizer DSO

Co-authored-by: Your Name <you@example.com>
2021-05-17 20:02:45 +02:00
vanhauser-thc
6c274546c4 ensure crashes/README.txt exists 2021-05-08 11:03:56 +02:00
Roman M. Iudichev
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
realmadsci
1d9a3d955c
Fix memory errors when trim causes testcase growth (#881) (#903)
* Revert "fixed potential double free in custom trim (#881)"

This reverts commit e9d2f72382cab75832721d859c3e731da071435d.

* Revert "fix custom trim for increasing data"

This reverts commit 86a8ef168dda766d2f25f15c15c4d3ecf21d0667.

* 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 e9d2f72382cab75832721d859c3e731da071435d commit that was
reverted.
2021-05-07 00:14:16 +02:00
Dominik Maier
e9d2f72382 fixed potential double free in custom trim (#881) 2021-04-30 13:37:59 +02:00
WorksButNotTested
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
vanhauser-thc
be880f2476 add AFL_EXIT_ON_SEED_ISSUES 2021-04-13 13:01:50 +02:00
vanhauser-thc
50bb931ea6 ui custom mutator only display 2021-04-13 11:26:27 +02:00
vanhauser-thc
2e6e1e566b add missing env 2021-04-06 22:16:56 +02:00
vanhauser-thc
3c846859ee cleanup 2021-04-04 20:05:02 +02:00
van Hauser
c23183f1dc
Merge pull request #855 from MegaManSec/leak-sanitizer
Add support for standalone leak-sanitizer
2021-04-04 15:28:42 +02:00
Joshua Rogers
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
vanhauser-thc
7ca51fab19 ensure one fuzzer sync per cycle, cycle introspection 2021-03-27 12:53:09 +01:00
van Hauser
96533f627e
Merge pull request #845 from joeyjiaojg/dev
Dev
2021-03-26 09:03:51 +01:00
vanhauser-thc
c169cb3911 integrate frida_mode, code-format 2021-03-25 20:10:09 +01:00
van Hauser
00a53a870d
Merge pull request #833 from WorksButNotTested/frida
Frida
2021-03-25 19:42:27 +01:00
Jiangen Jiao
c892642057 android: support host and target 32bit build 2021-03-25 20:40:31 +08:00
vanhauser-thc
ab394836a9 remove warnings 2021-03-25 08:40:33 +01:00
Your Name
e1384b5086 Add support for FRIDA mode 2021-03-24 18:17:10 +00:00
vanhauser-thc
55224e5150 AFL_PERSISTENT_RECORD not a default 2021-03-24 18:24:52 +01:00
van Hauser
6e2a0ef233
Merge branch 'replay' into tmp 2021-03-24 18:19:13 +01:00
vanhauser-thc
958436be4b ifdef for record 2021-03-24 18:18:05 +01:00
vanhauser-thc
ee5078f43c v3.13a init 2021-03-24 11:22:37 +01:00
vanhauser-thc
2fef89950f v3.12c release 2021-03-24 11:12:44 +01:00
vanhauser-thc
dfe6f7f8c9 make setting different file permissions easy via config.h 2021-03-23 20:21:08 +01:00
Dominik Maier
5fcd634f05 fixed tiny nitpicks 2021-03-23 18:47:07 +01:00
van Hauser
090128b3f8
Merge branch 'dev' into dev 2021-03-19 23:54:36 +01:00
fuzzah
d7e121e2c9 add AFL_TARGET_ENV to afl-fuzz 2021-03-20 01:32:28 +03:00
vanhauser-thc
e73c7c59c1 refactor finding binaries 2021-03-19 14:55:25 +01:00
vanhauser-thc
5e2a5f1110 shmem map size in config.h 2021-03-17 10:27:23 +01:00
vanhauser-thc
862cb3217f fix cmplog rtn 2021-03-16 14:38:13 +01:00
Andrea Fioraldi
73641be796
Merge pull request #819 from realmadsci/qemu-consistent-preload
Remove AFL_PRELOAD and AFL_USE_QASAN handlers
2021-03-16 09:08:23 +01:00
Andrea Fioraldi
ff9f3fbe96
Merge pull request #818 from realmadsci/add-qemu-custom-bin
Add AFL_QEMU_CUSTOM_BIN environment flag
2021-03-16 09:01:13 +01:00
vanhauser-thc
1dcc3549b6 v3.12a init 2021-03-15 23:21:03 +01:00
vanhauser-thc
ac795ae1e1 v3.11c release 2021-03-15 23:08:28 +01:00
realmadsci
01ad7610be Remove AFL_PRELOAD and AFL_USE_QASAN handlers
These are now processed in afl-qemu-trace so that the "copy+paste" code
that is in all of the other AFL tools can be removed.

This also allows the AFL_USE_QASAN flag to work the same when used
with tools like afl-fuzz as it does with afl-qemu-trace. This is
important in situations where loading the QASAN library changes
the address of your desired entrypoint, or for crash validation
using the same environment that afl-fuzz was using.

With this change, the same set of environment variables can be used
in exactly the same way between afl-fuzz, afl-showmap, and
afl-qemu-trace, and you will get exactly the same guest environment.
2021-03-15 13:03:16 -07:00
realmadsci
d4fb7f8b40 Add AFL_QEMU_CUSTOM_BIN environment flag
In QEMU mode (-Q), setting AFL_QEMU_CUSTOM_BIN cause afl-fuzz to skip
prepending afl-qemu-trace to your command line. Use this if you wish to use a
custom afl-qemu-trace or if you need to modify the afl-qemu-trace arguments.
2021-03-15 12:57:06 -07:00
vanhauser-thc
4bd0d4cbaf cmplog finetuning 2021-03-10 15:52:27 +01:00
vanhauser-thc
791c5c171d fix ctx-1 2021-03-09 18:44:42 +01:00
vanhauser-thc
47f2650a32 add AFL_NOOPT 2021-03-09 16:53:56 +01:00