Skip to content

Commit 329c523

Browse files
committed
fuzzing: Document how to use honggfuzz to fuzz libnbd.
1 parent b3fbcc7 commit 329c523

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

fuzzing/README

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
To report security bugs, see ‘SECURITY’ in the top source directory.
22

3+
34
Fuzzing libnbd using the American Fuzzy Lop (afl) fuzzer
45
========================================================
56

@@ -58,6 +59,27 @@ command below. You can run this even while afl-fuzz is running.
5859
This will create an HTML test coverage report in
5960
../libnbd-afl/fuzzing/sync_dir/cov/web/
6061

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+
6183
Fuzzing libnbd using Clang + libFuzzer
6284
======================================
6385

0 commit comments

Comments
 (0)