fuzzing: Document how to use honggfuzz to fuzz libnbd. · libguestfs/libnbd@329c523 (original) (raw)
1
1
`To report security bugs, see ‘SECURITY’ in the top source directory.
`
2
2
``
``
3
+
3
4
`Fuzzing libnbd using the American Fuzzy Lop (afl) fuzzer
`
4
5
`========================================================
`
5
6
``
`@@ -58,6 +59,27 @@ command below. You can run this even while afl-fuzz is running.
`
58
59
`This will create an HTML test coverage report in
`
59
60
`../libnbd-afl/fuzzing/sync_dir/cov/web/
`
60
61
``
``
62
+
``
63
`+
Fuzzing libnbd using honggfuzz
`
``
64
`+
==============================
`
``
65
+
``
66
`+
Recompile libnbd with honggfuzz instrumentation:
`
``
67
+
``
68
`+
./configure \
`
``
69
`+
CC=/path/to/hfuzz-clang CXX=/path/to/hfuzz-clang++ \
`
``
70
`+
--disable-shared \
`
``
71
`+
--disable-golang --disable-ocaml --disable-python
`
``
72
`+
make clean
`
``
73
`+
make
`
``
74
+
``
75
`+
Run honggfuzz using test cases:
`
``
76
+
``
77
`+
honggfuzz -i fuzzing/testcase_dir -z -- \
`
``
78
`+
./fuzzing/libnbd-fuzz-wrapper FILE
`
``
79
+
``
80
`+
(Note 3 underscore characters on each side.)
`
``
81
+
``
82
+
61
83
`Fuzzing libnbd using Clang + libFuzzer
`
62
84
`======================================
`
63
85
``