Commit Graph

33 Commits

Author SHA1 Message Date
f80f62f14b renamed env var to AFL_DEBUG_CHILD 2020-11-18 03:02:13 +01:00
0e748ccda7 set max testcache entries automated if not specified by the user 2020-10-23 14:05:34 +02:00
56ac3fcdc5 configurable testcache with malloc (#581)
* cache item number to cache memory size

* reload testcase if trimming changed the size

* fix splicing selection

* slim splicing

* import sync fix

* write testcache stats to fuzzer_stats

* fix new seed selection algo

* malloc+read instead of mmap

* fix

* testcache is configurable now and no reference counts

* fixes compilation, test script

* fixes

* switch TEST_CC to afl-cc in makefile

* code format

* fix

* fix crash

* fix crash

* fix env help output

* remove unnecessary pointer resets

* fix endless loop bug

* actually use the cache if set

* one more fix

* increase default cache entries, add default cache size value to config.h

Co-authored-by: hexcoder- <heiko@hexco.de>
2020-10-14 15:30:30 +02:00
0220a8ff66 Add env var toggle for StatsD 2020-10-08 20:48:46 +02:00
3d7bdc9f0b [WIP: segfault on non dogstatsd] Adding MACROS for format 2020-10-06 23:00:11 +02:00
1e0bc2e5c3 Merge remote-tracking branch 'origin/dev' into statsd_implem 2020-10-04 16:03:15 +02:00
a55e0d1189 WIP envs 2020-09-25 23:28:15 +02:00
9544b3dbf2 rewrite gcc plugin
When we started using AFL, it did not have an integrated GCC plugin.
There was one proposed by Austin Seipp, but for various reasons we
ended up using some of its infrastructure (runtime and wrapper), but
writing the GCC plugin proper from scratch.

With AFL++'s renewed interest in a GCC plugin, we rebased ours, with
some features that are or were missing in the one that was integrated:

* efficient, fully-functional inline and out-of-line instrumentation

Inline instrumentation was work in progress in the original plugin.
Controlled by AFL_GCC_OUT_OF_LINE.

* reproducible instrumentation

Obey -frandom-seed for pseudorandom number generation.

* licensing clarity and strict compliance

GPLv3+ for the plugin, that uses GCC internals; add a copy of the
license, as required.

* allow/deny list support

Copied and adjusted from the LLVM plugin implementation.

* neverZero support

Not as compact as the asm-wrapper version, but likely more efficient.
Both are quite thread-unsafe, with different caveats.
Controlled with AFL_GCC_SKIP_NEVERZERO.
2020-09-08 14:55:19 +02:00
e30b2c6af6 final changes for pre-3.0 2020-09-05 13:18:28 +02:00
75c38d6243 Merge branch 'dev' of github.com:vanhauser-thc/AFLplusplus into dev 2020-09-01 12:36:13 +02:00
6f75100602 qemuafl envs 2020-09-01 12:36:04 +02:00
664daa2f3c add qemu driver env var 2020-09-01 01:12:40 +02:00
425908a00c Option for specifying forkserver initialization timeout via environment variable (#522)
* Addition of AFL_FORKSRV_INIT_TMOUT env var

This commit introduces a new environment variable which allows to
specify the timespan AFL should wait for initial contact with the
forkserver.

This is useful for fuzz-targets requiring a rather long setup time
before the actual fuzzing can be started (e.g., unicorn).

* add .swp files to .gitignore

* Inherit init_tmout in afl_fsrv_init_dup

Without this patch, the forkserver would spawn with a timeout of 0 in
cmplog mode, leading to an immediate crash.

Additionally, this commit removes a spurious whitespace.

* Initialize afl->fsrv.init_tmout in afl_fsrv_init

Not all afl-components will need the new AFL_FORKSRV_INIT_TMOUT
environment variable. Hence, it's initialized to the safe "default"
value from before in afl_fsrv_init now.
2020-08-23 10:39:34 +02:00
1301552101 added AFL_MAX_DET_EXTRAS env var 2020-08-23 01:48:36 +02:00
af14acf2c1 Revert "Merge branch 'debug' into dev"
This reverts commit a7537b5511, reversing
changes made to 15e799f7ae.
2020-08-14 14:35:05 +02:00
d8f5502d83 initial integration 2020-08-08 20:29:56 +02:00
6d364dd2cb add sancov-like allow/denylist instrument feature 2020-08-05 01:13:51 +02:00
185f443659 add LTO AFL_LLVM_DOCUMENT_IDS feature 2020-07-31 17:53:01 +02:00
b015e4f07a epand havoc now env 2020-07-22 16:15:16 +02:00
ce9b4698fe added andrea's splicing, added cycle_schedules 2020-07-21 20:53:51 +02:00
97cef46b62 warn on deprecated env vars 2020-07-01 10:03:34 +02:00
87599de782 fix errors in last commit (u8)afl_get_env 2020-03-15 19:39:03 +01:00
126d1f1cd1 Move afl-fuzz related env variables into afl_state_t (#252)
* Move afl-fuzz related env variables into afl_state_t

* Move the env variables assignment from fuzz_init and code Format

* Fix typo

* Remove redundant env variables from afl_env struct

* Rename function to read_afl_environment
2020-03-15 18:29:23 +01:00
1148a2d0d1 document new environment variables and code format 2020-03-10 07:14:42 +01:00
36ce9c1fb9 more code format 2020-03-09 08:30:28 +01:00
9d686ba523 Add LTO collision free llvm_mode (#223)
* first new implementation, only works with AFL_DONT_OPTIMIZE

* bug hunting

* interim commit

* finalized LTO non-collision solution

* update documentation

* merge resulted in some problems, fixing these

* added lto env to env check

* fixed llvm weirdness to messes up our instrumentation due CFG rewrite optimizations

* all llvm instrumentation issues have been resolved! :-)

* llvm 9 is required (so far)

* update lto readme
2020-03-05 10:52:26 +01:00
df46521658 Finish refactoring APIs for the custom mutator and Python module
- Remove AFL_PYTHON_ONLY (env) and python_only (variable)
- Unify fuzz API of the custom mutator and Python module
- Merge the custom mutator into the old python_stage, which is now renamed to custom_mutator_stage
2020-03-03 19:48:13 -05:00
6865cd8d69 Added AFL_AUTORESUME option 2020-03-01 13:47:33 +01:00
6730b6a15a code-format, env.md fixes and adding -hh for env usage display into afl-fuzz and Makefile 2020-02-29 14:23:44 +01:00
f807d7cefb important InsTrim fixes! 2020-02-24 02:45:17 +01:00
ec8e8cb51c no unnecessary warnings in test.sh 2020-02-21 18:10:50 +01:00
20bcd4009b that env is not for the users, it is an internal env used to tell qemu that we want the cmplog shmem 2020-02-17 14:14:58 +01:00
e40415cf16 fix 2020-02-16 19:22:12 +01:00