Skip to content

Commit

Permalink
Document the recommended parameters for fuzzing
Browse files Browse the repository at this point in the history
We use those parameters for calculating the coverage.

Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #2088
  • Loading branch information
kroeckx committed Dec 16, 2016
1 parent 2fd54eb commit e104d01
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions fuzz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ Configure for fuzzing:
--with-fuzzer-lib=../../svn-work/Fuzzer/libFuzzer \
-DPEDANTIC enable-asan enable-ubsan no-shared \
-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION \
-fsanitize-coverage=edge,indirect-calls,8bit-counters
-fsanitize-coverage=edge,indirect-calls,8bit-counters \
enable-ec_nistp_64_gcc_128 -fno-sanitize=alignment enable-tls1_3 \
enable-weak-ssl-ciphers enable-rc5 enable-md2 \
enable-ssl3 enable-ssl3-method enable-nextprotoneg
$ sudo apt-get install make
$ LDCMD=clang++ make -j
$ fuzz/helper.py $FUZZER
Expand All @@ -58,9 +61,14 @@ AFL
Configure for fuzzing:

$ sudo apt-get install afl-clang
$ CC=afl-clang-fast ./config enable-fuzz-afl no-shared
$ CC=afl-clang-fast ./config enable-fuzz-afl no-shared -DPEDANTIC \
enable-tls1_3 enable-weak-ssl-ciphers enable-rc5 enable-md2 \
enable-ssl3 enable-ssl3-method enable-nextprotoneg \
enable-ec_nistp_64_gcc_128
$ make

The following options can also be enabled: enable-asan, enable-ubsan, enable-msan

Run one of the fuzzers:

$ afl-fuzz -i fuzz/corpora/$FUZZER -o fuzz/corpora/$FUZZER/out fuzz/$FUZZER
Expand Down

0 comments on commit e104d01

Please sign in to comment.