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
- 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>