mirror of
https://gitlab.nic.cz/knot/knot-dns.git
synced 2026-05-28 04:02:31 -04:00
The knotd_stdio wrapper is broken and unused. In the context of upcoming AI tools, it's not worth keeping. |
||
|---|---|---|
| .. | ||
| check | ||
| fuzz_dname_from_str.in | ||
| fuzz_dname_to_str.in | ||
| fuzz_packet.in@69e4a98151 | ||
| fuzz_zscanner.in@4cf63e8894 | ||
| .gitignore | ||
| fuzz_dname_from_str.c | ||
| fuzz_dname_to_str.c | ||
| fuzz_packet.c | ||
| fuzz_zscanner.c | ||
| main.c | ||
| Makefile.am | ||
| README.md | ||
Fuzzing with libFuzzer (requires Clang 6.0+)
- Ensure Clang with
-fsanitize=fuzzersupport (e.g. LLVM) - Configure with
- Compile Knot DNS:
make
- Create and check the fuzzing binaries
cd tests-fuzzmake check
- Download the corpora
git submodule initgit submodule update --recursive --remote
- (Optional) add more test cases
./fuzz_packet -merge=1 fuzz_packet.in <DIR_WITH_NEW_PACKET_TEST_CASES>./fuzz_zscanner -merge=1 fuzz_zscanner.in <DIR_WITH_NEW_ZSCANNER_TEST_CASES>
- Run the fuzzer
- (Set proper symbolizer if necessary
export ASAN_SYMBOLIZER_PATH=$(readlink -f `which llvm-symbolizer-6.0`)for ASAN orexport UBSAN_SYMBOLIZER_PATH=$(readlink -f `which llvm-symbolizer-6.0`)for UBSAN) ./fuzz_packet fuzz_packet.inor./fuzz_zscanner fuzz_zscanner.in- (Add parallel fuzzing
-jobs=<CPUS>
- (Set proper symbolizer if necessary