test: split fuzz into different files and binaries

This is in preparation to add more fuzzing code...
This commit is contained in:
Simon Goldschmidt
2020-02-17 22:05:46 +01:00
parent fc85b055d7
commit a07e0a82c9
6 changed files with 302 additions and 164 deletions

View File

@@ -1,17 +1,14 @@
Fuzzing the lwIP stack (afl-fuzz requires linux/unix or similar)
This directory contains a small app that reads Ethernet frames from stdin and
processes them. It is used together with the 'american fuzzy lop' tool (found
This directory contains small apps that read Ethernet frames from stdin and
process them. They are used together with the 'american fuzzy lop' tool (found
at http://lcamtuf.coredump.cx/afl/) and the sample inputs to test how
unexpected inputs are handled. The afl tool will read the known inputs, and
try to modify them to exercise as many code paths as possible, by instrumenting
the code and keeping track of which code is executed.
Just running make will produce the test program.
Running make with parameter 'D=-DLWIP_FUZZ_MULTI_PACKET' will produce a binary
that parses the input data as multiple packets (experimental!).
Just running make will produce the test programs.
Then run afl with:
@@ -34,4 +31,3 @@ file to simplify viewing in wireshark.
The lwipopts.h file needs to have checksum checking off, otherwise almost every
packet will be discarded because of that. The other options can be tuned to
expose different parts of the code.