Skip to content

Conversation

@david-cermak
Copy link
Contributor

This PR fixes recently deprecated afl-gcc in AFL 4.30c. Uses gcc for dependency generation, and afl-gcc-fast for compilation.

It also adds the initial lwip_fuzz target to CI, running for for 10 minutes, saving potential crashes to artifacts.


Note that this fuzzing setup is only testing simple, single-packet scenarios. The more advanced multi-packet (lwip_fuzz2) and timing-aware (lwip_fuzz3) fuzzers are broken (or unfinished), disabled due to a input format mismatch. All our existing test inputs are raw Ethernet frames, while these advanced fuzzers expect structured inputs with length and timing metadata.

// Current inputs (tcp_syn.bin): [ETH_HEADER|IP_HEADER|TCP_HEADER|DATA]
// Expected by fuzz2:            [2-byte-length|packet][2-byte-length|packet]...
// Expected by fuzz3:            [4-byte-delay|2-byte-length|packet][4-byte-delay|2-byte-length|packet]...

I will address this in future PRs.

Issue:
afl-gcc has been deprecated in v4.30
afl-cc doesn't understand some lwip comile flags
afl-gcc-fast cannot be used to generate deps
Fix: Use afl-gcc-fast for compilation, afl-cc for deps
Note: Could use standard gcc for deps generation
Running it for 10 minutes is a good tradeoff to check
for regression and not waste too much of CI resources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant