Commit Graph

51 Commits

Author SHA1 Message Date
791c5c171d fix ctx-1 2021-03-09 18:44:42 +01:00
47f2650a32 add AFL_NOOPT 2021-03-09 16:53:56 +01:00
be5274d4a9 fix kctx compilation hang 2021-03-04 15:12:08 +01:00
8bdb40b763 cpu-exec: Add AFL_QEMU_EXCLUDE_RANGES
This environment variable allows rejection of
specific regions from instrumentation.

It takes priority over AFL_INST_LIBS and AFL_QEMU_INST_RANGES,
so it can be used to poke a "hole" in previously included sections.
2021-03-02 12:55:44 -08:00
938512a6b9 minor fixes 2021-02-17 09:48:04 +01:00
6caec2169c Revert "llvm bug workaround for lto extint"
This reverts commit e3a5c31307.
2021-02-15 19:14:28 +01:00
e3a5c31307 llvm bug workaround for lto extint 2021-02-15 13:25:15 +01:00
9bd1e19d7f added AFL_IGNORE_UNKNOWN_ENVS 2021-02-13 22:43:56 +01:00
9d08f0d098 added AFL_CMPLOG_ONLY_NEW feature 2021-01-30 15:39:47 +01:00
28e1aaa0f1 qasan support in aflpp 2021-01-29 15:47:25 +01:00
2044c7e2b5 fix include 2021-01-27 08:41:45 +01:00
f571f074a8 update envs 2021-01-27 08:21:22 +01:00
9cdf5c4150 User defined kill signal value (#678)
* Adding AFL_KILL_SIGNAL environment variable

Controlling the kill signal used to end forked processes.

* Checking validity of AFL_KILL_SIGNAL env variable

This commit also sets a valid value in the environment to avoid
duplicating code in at_exit(). Changing data type of
fsrv->kill_signal to u8 to match last_kill_signal.

* Adding afl_kill_signal to AFL (environment) state

This commit simply introduces a struct member for future use. The
env variable is not used from the afl struct but from fsrv, where
its validity is checked, resulting in a FATAL in case of errors.
2021-01-07 22:35:34 +01:00
98ee17bc47 fix endless loop in afl-cc allow/blocklists starting a line with a comment 2020-12-20 14:30:06 +01:00
12ebb351dc apply nocolor changes 2020-12-18 21:10:39 +01:00
d59d1fcd9f Add missing env var used in bec7edf41d/accel/tcg/cpu-exec.c (L389) and ./qemu_mode/README.persistent.md 2020-12-04 17:15:25 +01:00
a2e2fae840 AFL_CRASH_EXITCODE env var added, u8->bool 2020-12-03 14:43:06 +01:00
8584f9d2b5 added AFL_NO_AUTODICT 2020-12-01 13:13:11 +01:00
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