nixpkgs/pkgs/tools/security/afl
Rick van Schijndel 9d212f5be7
afl: Fix afl-qemu build by applying new patches
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
2020-03-13 21:43:51 +01:00
..
qemu-patches afl: Fix afl-qemu build by applying new patches 2020-03-13 21:43:51 +01:00
default.nix
libdislocator.nix
qemu.nix afl: Fix afl-qemu build by applying new patches 2020-03-13 21:43:51 +01:00
README.md

Updating the QEMU patches

When updating to the latest American Fuzzy Lop, make sure to check for any new patches to qemu for binary fuzzing support:

https://github.com/google/AFL/tree/master/qemu_mode

Be sure to check the build script and make sure it's also using the right QEMU version and options in qemu.nix:

https://github.com/google/AFL/blob/master/qemu_mode/build_qemu_support.sh

afl-config.h, afl-types.h, and afl-qemu-cpu-inl.h are part of the afl source code, and copied from config.h, types.h and afl-qemu-cpu-inl.h appropriately. These files and the QEMU patches need to be slightly adjusted to fix their #includes (the patches try to otherwise include files like ../../config.h which causes the build to fail).