tests: add libFuzzer based fuzzing
authorPetr Štetiar <ynezz@true.cz>
Tue, 13 Oct 2020 12:36:44 +0000 (14:36 +0200)
committerPetr Štetiar <ynezz@true.cz>
Tue, 13 Oct 2020 13:27:49 +0000 (15:27 +0200)
commit134afc7288461bf0ef0506dfd5430bf28de0880c
tree126236e19da83475785be70f9bd01f8d65a9b992
parentde08a2c71ca83e783ab6cfc2bb6dda07b25bf381
tests: add libFuzzer based fuzzing

LibFuzzer is in-process, coverage-guided, evolutionary fuzzing engine.

LibFuzzer is linked with the library under test, and feeds fuzzed inputs
to the library via a specific fuzzing entrypoint (aka "target
function"); the fuzzer then tracks which areas of the code are reached,
and generates mutations on the corpus of input data in order to maximize
the code coverage.

So lets use libFuzzer to fuzz dns_handle_packet for the start.

Ref: https://llvm.org/docs/LibFuzzer.html
Signed-off-by: Petr Štetiar <ynezz@true.cz>
CMakeLists.txt
tests/CMakeLists.txt [new file with mode: 0644]
tests/fuzz/CMakeLists.txt [new file with mode: 0644]
tests/fuzz/dict/mdns.dict [new file with mode: 0644]
tests/fuzz/inputs/query_qu.pcap [new file with mode: 0644]
tests/fuzz/test-fuzz.c [new file with mode: 0644]