mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-08 16:21:32 +00:00
added AFL_IGNORE_UNKNOWN_ENVS
This commit is contained in:
parent
6ce9230ed6
commit
9bd1e19d7f
@ -61,7 +61,8 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
|
|||||||
- Added a new example harness to compare python, c, and rust bindings
|
- Added a new example harness to compare python, c, and rust bindings
|
||||||
- afl-cmin and afl-showmap now support the -f option
|
- afl-cmin and afl-showmap now support the -f option
|
||||||
- changed default: no memory limit for afl-cmin and afl-cmin.bash
|
- changed default: no memory limit for afl-cmin and afl-cmin.bash
|
||||||
- warn on any _AFL and __AFL env vars
|
- warn on any _AFL and __AFL env vars.
|
||||||
|
- set AFL_IGNORE_UNKNOWN_ENVS to not warn on unknown AFL_... env vars.
|
||||||
- added dummy Makefile to instrumentation/
|
- added dummy Makefile to instrumentation/
|
||||||
- Updated utils/afl_frida to be 5% faster, 7% on x86_x64
|
- Updated utils/afl_frida to be 5% faster, 7% on x86_x64
|
||||||
- Added AFL_KILL_SIGNAL env variable (thanks @v-p-b)
|
- Added AFL_KILL_SIGNAL env variable (thanks @v-p-b)
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
users or for some types of custom fuzzing setups. See [README.md](README.md) for the general
|
users or for some types of custom fuzzing setups. See [README.md](README.md) for the general
|
||||||
instruction manual.
|
instruction manual.
|
||||||
|
|
||||||
|
Note that most tools will warn on any unknown AFL environment variables.
|
||||||
|
This is for warning on typos that can happen. If you want to disable this
|
||||||
|
check then set the `AFL_IGNORE_UNKNOWN_ENVS` environment variable.
|
||||||
|
|
||||||
## 1) Settings for all compilers
|
## 1) Settings for all compilers
|
||||||
|
|
||||||
Starting with afl++ 3.0 there is only one compiler: afl-cc
|
Starting with afl++ 3.0 there is only one compiler: afl-cc
|
||||||
@ -18,7 +22,6 @@ To select the different instrumentation modes this can be done by
|
|||||||
`MODE` can be one of `LTO` (afl-clang-lto*), `LLVM` (afl-clang-fast*), `GCC_PLUGIN`
|
`MODE` can be one of `LTO` (afl-clang-lto*), `LLVM` (afl-clang-fast*), `GCC_PLUGIN`
|
||||||
(afl-g*-fast) or `GCC` (afl-gcc/afl-g++).
|
(afl-g*-fast) or `GCC` (afl-gcc/afl-g++).
|
||||||
|
|
||||||
|
|
||||||
Because (with the exception of the --afl-MODE command line option) the
|
Because (with the exception of the --afl-MODE command line option) the
|
||||||
compile-time tools do not accept afl specific command-line options, they
|
compile-time tools do not accept afl specific command-line options, they
|
||||||
make fairly broad use of environmental variables instead:
|
make fairly broad use of environmental variables instead:
|
||||||
|
@ -61,6 +61,7 @@ static char *afl_environment_variables[] = {
|
|||||||
"AFL_FORKSRV_INIT_TMOUT",
|
"AFL_FORKSRV_INIT_TMOUT",
|
||||||
"AFL_HARDEN",
|
"AFL_HARDEN",
|
||||||
"AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES",
|
"AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES",
|
||||||
|
"AFL_IGNORE_UNKNOWN_ENVS",
|
||||||
"AFL_IMPORT_FIRST",
|
"AFL_IMPORT_FIRST",
|
||||||
"AFL_INST_LIBS",
|
"AFL_INST_LIBS",
|
||||||
"AFL_INST_RATIO",
|
"AFL_INST_RATIO",
|
||||||
|
@ -1138,7 +1138,7 @@ void ModuleSanitizerCoverage::InjectTraceForGep(
|
|||||||
IRBuilder<> IRB(GEP);
|
IRBuilder<> IRB(GEP);
|
||||||
for (Use &Idx : GEP->indices())
|
for (Use &Idx : GEP->indices())
|
||||||
if (!isa<ConstantInt>(Idx) && Idx->getType()->isIntegerTy())
|
if (!isa<ConstantInt>(Idx) && Idx->getType()->isIntegerTy())
|
||||||
IRB.CreateCall(SanCovTraceGepFunction,
|
IRB.CreateCall(SanCovTraceGepFunction,
|
||||||
{IRB.CreateIntCast(Idx, IntptrTy, true)});
|
{IRB.CreateIntCast(Idx, IntptrTy, true)});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1587,6 +1587,7 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
"libtokencap.so)\n"
|
"libtokencap.so)\n"
|
||||||
" AFL_PATH: path to instrumenting pass and runtime "
|
" AFL_PATH: path to instrumenting pass and runtime "
|
||||||
"(afl-compiler-rt.*o)\n"
|
"(afl-compiler-rt.*o)\n"
|
||||||
|
" AFL_IGNORE_UNKNOWN_ENVS: don't warn on unknown env vars\n"
|
||||||
" AFL_INST_RATIO: percentage of branches to instrument\n"
|
" AFL_INST_RATIO: percentage of branches to instrument\n"
|
||||||
" AFL_QUIET: suppress verbose output\n"
|
" AFL_QUIET: suppress verbose output\n"
|
||||||
" AFL_HARDEN: adds code hardening to catch memory bugs\n"
|
" AFL_HARDEN: adds code hardening to catch memory bugs\n"
|
||||||
|
@ -523,7 +523,7 @@ void check_environment_vars(char **envp) {
|
|||||||
if (be_quiet) { return; }
|
if (be_quiet) { return; }
|
||||||
|
|
||||||
int index = 0, issue_detected = 0;
|
int index = 0, issue_detected = 0;
|
||||||
char *env, *val;
|
char *env, *val, *ignore = getenv("AFL_IGNORE_UNKNOWN_ENVS");
|
||||||
while ((env = envp[index++]) != NULL) {
|
while ((env = envp[index++]) != NULL) {
|
||||||
|
|
||||||
if (strncmp(env, "ALF_", 4) == 0 || strncmp(env, "_ALF", 4) == 0 ||
|
if (strncmp(env, "ALF_", 4) == 0 || strncmp(env, "_ALF", 4) == 0 ||
|
||||||
@ -582,7 +582,7 @@ void check_environment_vars(char **envp) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match == 0) {
|
if (match == 0 && !ignore) {
|
||||||
|
|
||||||
WARNF("Mistyped AFL environment variable: %s", env);
|
WARNF("Mistyped AFL environment variable: %s", env);
|
||||||
issue_detected = 1;
|
issue_detected = 1;
|
||||||
|
@ -198,6 +198,7 @@ static void usage(u8 *argv0, int more_help) {
|
|||||||
"AFL_FORKSRV_INIT_TMOUT: time spent waiting for forkserver during startup (in milliseconds)\n"
|
"AFL_FORKSRV_INIT_TMOUT: time spent waiting for forkserver during startup (in milliseconds)\n"
|
||||||
"AFL_HANG_TMOUT: override timeout value (in milliseconds)\n"
|
"AFL_HANG_TMOUT: override timeout value (in milliseconds)\n"
|
||||||
"AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: don't warn about core dump handlers\n"
|
"AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: don't warn about core dump handlers\n"
|
||||||
|
"AFL_IGNORE_UNKNOWN_ENVS: don't warn on unknown env vars\n"
|
||||||
"AFL_IMPORT_FIRST: sync and import test cases from other fuzzer instances first\n"
|
"AFL_IMPORT_FIRST: sync and import test cases from other fuzzer instances first\n"
|
||||||
"AFL_KILL_SIGNAL: Signal ID delivered to child processes on timeout, etc. (default: SIGKILL)\n"
|
"AFL_KILL_SIGNAL: Signal ID delivered to child processes on timeout, etc. (default: SIGKILL)\n"
|
||||||
"AFL_MAP_SIZE: the shared memory size for that target. must be >= the size\n"
|
"AFL_MAP_SIZE: the shared memory size for that target. must be >= the size\n"
|
||||||
|
@ -1168,8 +1168,9 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stdin_file = at_file ? strdup(at_file) : (char *)
|
stdin_file = at_file ? strdup(at_file)
|
||||||
alloc_printf("%s/.afl-showmap-temp-%u", use_dir, (u32)getpid());
|
: (char *)alloc_printf("%s/.afl-showmap-temp-%u",
|
||||||
|
use_dir, (u32)getpid());
|
||||||
unlink(stdin_file);
|
unlink(stdin_file);
|
||||||
atexit(at_exit_handler);
|
atexit(at_exit_handler);
|
||||||
fsrv->out_file = stdin_file;
|
fsrv->out_file = stdin_file;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user