43 Commits

Author SHA1 Message Date
van Hauser
9d08f0d098 added AFL_CMPLOG_ONLY_NEW feature 2021-01-30 15:39:47 +01:00
Andrea Fioraldi
28e1aaa0f1 qasan support in aflpp 2021-01-29 15:47:25 +01:00
van Hauser
2044c7e2b5 fix include 2021-01-27 08:41:45 +01:00
van Hauser
f571f074a8 update envs 2021-01-27 08:21:22 +01:00
buherator
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
van Hauser
98ee17bc47 fix endless loop in afl-cc allow/blocklists starting a line with a comment 2020-12-20 14:30:06 +01:00
hexcoder-
12ebb351dc apply nocolor changes 2020-12-18 21:10:39 +01:00
Thomas Rooijakkers
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
Dominik Maier
a2e2fae840 AFL_CRASH_EXITCODE env var added, u8->bool 2020-12-03 14:43:06 +01:00
van Hauser
8584f9d2b5 added AFL_NO_AUTODICT 2020-12-01 13:13:11 +01:00
Dominik Maier
f80f62f14b renamed env var to AFL_DEBUG_CHILD 2020-11-18 03:02:13 +01:00
van Hauser
0e748ccda7 set max testcache entries automated if not specified by the user 2020-10-23 14:05:34 +02:00
van Hauser
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
Edznux
0220a8ff66
Add env var toggle for StatsD 2020-10-08 20:48:46 +02:00
Edznux
3d7bdc9f0b
[WIP: segfault on non dogstatsd] Adding MACROS for format 2020-10-06 23:00:11 +02:00
Edznux
1e0bc2e5c3
Merge remote-tracking branch 'origin/dev' into statsd_implem 2020-10-04 16:03:15 +02:00
Edznux
a55e0d1189
WIP envs 2020-09-25 23:28:15 +02:00
Alexandre Oliva
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
vanhauser-thc
e30b2c6af6 final changes for pre-3.0 2020-09-05 13:18:28 +02:00
Andrea Fioraldi
75c38d6243 Merge branch 'dev' of github.com:vanhauser-thc/AFLplusplus into dev 2020-09-01 12:36:13 +02:00
Andrea Fioraldi
6f75100602 qemuafl envs 2020-09-01 12:36:04 +02:00
van Hauser
664daa2f3c add qemu driver env var 2020-09-01 01:12:40 +02:00
Marius Muench
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
Dominik Maier
1301552101 added AFL_MAX_DET_EXTRAS env var 2020-08-23 01:48:36 +02:00
root
af14acf2c1 Revert "Merge branch 'debug' into dev"
This reverts commit a7537b5511ad767d2240cf2dc6d3e261daa676f9, reversing
changes made to 15e799f7ae666418e75c6a79db833c5316b21f97.
2020-08-14 14:35:05 +02:00
van Hauser
d8f5502d83 initial integration 2020-08-08 20:29:56 +02:00
van Hauser
6d364dd2cb add sancov-like allow/denylist instrument feature 2020-08-05 01:13:51 +02:00
van Hauser
185f443659 add LTO AFL_LLVM_DOCUMENT_IDS feature 2020-07-31 17:53:01 +02:00
Andrea Fioraldi
b015e4f07a epand havoc now env 2020-07-22 16:15:16 +02:00
van Hauser
ce9b4698fe added andrea's splicing, added cycle_schedules 2020-07-21 20:53:51 +02:00
van Hauser
97cef46b62 warn on deprecated env vars 2020-07-01 10:03:34 +02:00
van Hauser
87599de782 fix errors in last commit (u8)afl_get_env 2020-03-15 19:39:03 +01:00
Rishi Ranjan
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
van Hauser
1148a2d0d1 document new environment variables and code format 2020-03-10 07:14:42 +01:00
van Hauser
36ce9c1fb9 more code format 2020-03-09 08:30:28 +01:00
van Hauser
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
h1994st
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
Dominik Maier
6865cd8d69 Added AFL_AUTORESUME option 2020-03-01 13:47:33 +01:00
van Hauser
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
van Hauser
f807d7cefb important InsTrim fixes! 2020-02-24 02:45:17 +01:00
van Hauser
ec8e8cb51c no unnecessary warnings in test.sh 2020-02-21 18:10:50 +01:00
Andrea Fioraldi
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
van Hauser
e40415cf16 fix 2020-02-16 19:22:12 +01:00