diff options
author | Andrew Bartlett <abartlet@samba.org> | 2019-12-04 21:23:06 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-12-10 07:50:29 +0000 |
commit | 1d98ced841f83d7305a570297908fd1270de42e0 (patch) | |
tree | e08abd292d32f7c24951246896ff91f0006ac312 /lib/fuzzing/README.md | |
parent | f4ff9a079414953b17f49857ecfca6c0e479c32f (diff) | |
download | samba-1d98ced841f83d7305a570297908fd1270de42e0.tar.gz |
lib/fuzzing: Add mode for the AFL fuzzer
This is helpful for ensuring the fuzzers still compile in autobuild as no
library support is required.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'lib/fuzzing/README.md')
-rw-r--r-- | lib/fuzzing/README.md | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/fuzzing/README.md b/lib/fuzzing/README.md index 97b49ed0fb1..5a248241248 100644 --- a/lib/fuzzing/README.md +++ b/lib/fuzzing/README.md @@ -7,6 +7,7 @@ exceptions such as crashes, assertions or memory corruption. See [Wikipedia article on fuzzing](https://en.wikipedia.org/wiki/Fuzzing) for more information. +# Hongfuzz ## Configure with fuzzing @@ -15,7 +16,7 @@ Example command line to build binaries for use with ```sh buildtools/bin/waf -C --without-gettext --enable-debug --enable-developer \ - --address-sanitizer --enable-libfuzzer \ + --address-sanitizer --enable-libfuzzer --abi-check-disable \ CC=.../honggfuzz/hfuzz_cc/hfuzz-clang configure \ LINK_CC=.../honggfuzz/hfuzz_cc/hfuzz-clang ``` @@ -32,6 +33,29 @@ buildtools/bin/waf --targets=fuzz_tiniparser build && \ --rlimit_rss 100 -f .../tiniparser-corpus -- bin/fuzz_tiniparser ``` +# AFL (american fuzzy lop) + +## Configure with fuzzing + +Example command line to build binaries for use with +[afl](http://lcamtuf.coredump.cx/afl/) + +```sh +buildtools/bin/waf -C --without-gettext --enable-debug --enable-developer \ + --enable-afl-fuzzer --abi-check-disable \ + CC=afl-gcc configure +``` + +## Fuzzing tiniparser + +Example for fuzzing `tiniparser` using `afl-fuzz` (see `--help` for more +options): + +```sh +buildtools/bin/waf --targets=fuzz_tiniparser build && \ +afl-fuzz -m 200 -i inputdir -o outputdir -- bin/fuzz_tiniparser +``` + # oss-fuzz Samba can be fuzzed by Google's oss-fuzz system. Assuming you have an |