mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
c4e902be72
Signed-off-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> |
||
---|---|---|
.. | ||
fuzz_ldap_decode.c | ||
fuzz_ldb_parse_tree.c | ||
fuzz_lzxpress.c | ||
fuzz_oLschema2ldif.c | ||
fuzz_reg_parse.c | ||
fuzz_regfio.c | ||
fuzz_tiniparser.c | ||
fuzzing.c | ||
fuzzing.h | ||
README.md | ||
wscript_build |
Fuzzing Samba
Fuzzing supplies valid, invalid, unexpected or random data as input to a piece of code. Instrumentation, usually compiler-implemented, is used to monitor for exceptions such as crashes, assertions or memory corruption.
See Wikipedia article on fuzzing for more information.
Configure with fuzzing
Example command line to build binaries for use with honggfuzz:
buildtools/bin/waf -C --without-gettext --enable-debug --enable-developer \
--address-sanitizer --enable-libfuzzer \
CC=.../honggfuzz/hfuzz_cc/hfuzz-clang configure \
LINK_CC=.../honggfuzz/hfuzz_cc/hfuzz-clang
Fuzzing tiniparser
Example for fuzzing tiniparser
using honggfuzz
(see --help
for more
options):
buildtools/bin/waf --targets=fuzz_tiniparser build && \
.../honggfuzz/honggfuzz --sanitizers --timeout 3 --max_file_size 256 \
--rlimit_rss 100 -f .../tiniparser-corpus -- bin/fuzz_tiniparser