> Interesting! Could you elaborate on that?
Quoting status_screen.txt:
There are four quasi-common explanations for variable behavior of the
tested program:
- Use of uninitialized memory in conjunction with some intrinsic sources of
entropy in the tested binary. This can be indicative of a security bug.
- Multiple threads executing at once in semi-random order. Not a big deal,
but to avoid hiccups, it's best to restrict instrumented programs to a
single thread. Check compile-time options or run-time flags. For example,
for ImageMagick, you can try --without-threads --disable-openmp; for
ffmpeg, look for --disable-pthreads instead.
- Attempts to create files that were already created during previous runs, or
otherwise interact with some form of persistent state. This is harmless,
but you may want to instruct the targeted program to write to stdout or to
/dev/null to avoid surprises (and disable the creation of temporary files
and similar artifacts, if applicable).
- Hitting functionality that is actually designed to behave randomly. For
example, when fuzzing sqlite, the fuzzer will dutifully detect variable
behavior once the mutation engine generates something like:
select random();
Less likely causes may include running out of disk space, SHM handles, or other
globally limited resources.
The paths where variable behavior is detected are marked with with a matching
entry in the <out_dir>/.state/variable_behavior/ directory, so you can look
them up easily.
If you can't suppress variable behavior and don't want to see these warnings,
simply set AFL_NO_VAR_CHECK=1 in the environment before running afl-fuzz. This
will also dramatically speed up session resumption.
> Instrumentation feedback should depend only on test stimulus, right?
That's usually the expected behavior.
> How is this 'variable behaviour of test programs' determined by afl-fuzz?
The sequence in which basic blocks are executed differs from one run
to another. AFL doesn't detect or handle threads in any special way.
/mz