infra: add support for non-persistent mode AFL
Also adds an example of using it.
@vanhauser-thc I would like to add some fuzzers that uses non-persistent afl++ fuzzing, and by the looks of it this could be achieved without major changes. I added a simple example from binutils (but have some other examples to include down the line). Could you give this a review?
Related: https://github.com/google/oss-fuzz/issues/7347
lgtm except for my main gripe
will fix this up shortly.
Do you prefer for me to remake this as a PR on a non-fork?
Do you prefer for me to remake this as a PR on a non-fork?
Could you clarify this, not sure what it means?
Could you clarify this, not sure what it means?
Ref: https://github.com/google/oss-fuzz/pull/7351#issuecomment-1241314536
If I should make this as a branch on github.com/google/oss-fuzz instead of github.com/DavidKorczynski/oss-fuzz so you can run trial builds?
Could you clarify this, not sure what it means?
Ref: #7351 (comment)
If I should make this as a branch on github.com/google/oss-fuzz instead of github.com/DavidKorczynski/oss-fuzz so you can run trial builds?
Sorry for the late reply. We can run trial builds on forks now.
lgtm except for my main gripe
Fixed check if the binary doesn't contain ##SIG_AFL_PERSISTENT## and then treat it as non-persistent. in base runner. Can confirm it works.
It would be great if it was possible to resurrect this PR. The systemd project added a test based on a corpus produced by AFL++ in https://github.com/systemd/systemd/pull/27458 the other day. It kind of works but the problem is that the binary has to be built and run manually elsewhere to be able to keep the corpus up to date. It would be easier if it was possible to offload that onto OSS-Fuzz.
Before I forget apart from systemd I think elfutils could benefit from this too. Its fuzz targets have blind spots: https://sourceware.org/pipermail/elfutils-devel/2023q1/005957.html and the easiest way to cover them would be to fuzz the binaries. (admittedly it wouldn't be the most efficient way to fuzz it though but until proper fuzz targets are implemented this approach could be used instead).