These patches are gathered from different sources,
such as https://patchwork.kernel.org/patch/10862231/ for the
`gettid` patch.
Another patch comes from the issue in the AFL repository.
The ultimate goal is to get these patches upstream as well,
so we don't keep these general patches only within nixos.
A PR is created against Google/AFL
https://github.com/google/AFL/pull/79,
but it might take a while before it's landed, considering the history
of the project (there are more PRs open).
ZHF: #80379
Fixes issue #82232
Apparently they set CFLAGS incompatible with clang.
Also only provide a default value for AFL_CC/AFL_CXX for afl-clang-fast:
User might want to overriding, but this is not a PATH variable that can
be prepended with :.
Looks like mostly performance enhancements and stability fixes. The main
user facing changes appear to be:
- The -Z option was removed
- A macro named FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION is defined when
compiling with afl-gcc
Full changelog at http://lcamtuf.coredump.cx/afl/ChangeLog.txt
- Adds new LLVM-based instrumentation support via afl-clang-fast.
- Experimental support for cgroup management via afl-cgroup, to
mitigate OOM issues when using afl with address sanitizer.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
This adds support for `afl-fuzz -Q`, which can be used to instrument
arbitrary black-box binary code for fuzz testing using American Fuzzy
Lop through QEMU emulation.
This requires a custom QEMU 2.2.0 build of the Linux userspace emulators
(system emulators aren't required) with some custom patches. Furthermore
we have to patch the patches a little to make the build more sane (there
are some notes in the README about this).
Overall, the addition of this feature by default doesn't significantly
impact build times (since building QEMU for only one target builds only
a fraction of the source code, and many features are disabled), so it's
enabled by default.
Signed-off-by: Austin Seipp <aseipp@pobox.com>