TL;DR
This paper investigates the "brain" of stateful network fuzzers: the state selection algorithm. By evaluating existing methods and introducing a novel, MCTS-driven approach called AFLNetLegion, the authors reveal that while smarter state selection can drastically improve coverage in complex sub-modules, its overall impact is currently bottlenecked by the agonizingly slow execution speeds of network-based testing.
What Problem Does This Paper Address?
Fuzzing—the process of feeding random inputs to a program to find bugs—is relatively straightforward for "stateless" software like image parsers. However, network servers (like those for FTP or SMTP) are stateful: their behavior depends on the history of previous messages. To find a bug in a file-transfer command, you must first successfully log in.
State-of-the-art fuzzers like AFLNet use a "state model" to track which parts of the server's state space they have explored. The critical challenge is state selection: out of hundreds of discovered states, which one should the fuzzer prioritize to find new code paths? Until now, most researchers evaluated fuzzers as "black boxes," making it unclear if performance gains came from the state model, the mutation engine, or the selection algorithm itself.
Methods
The authors conducted their study in two phases:
- Baseline Evaluation: They tested AFLNet’s three built-in selection algorithms:
RANDOM,ROUND-ROBIN, andFAVOR(an intuitive heuristic that prioritizes rarely visited states). - AFLNetLegion: To address weaknesses in AFLNet, they developed a new algorithm based on Legion, a variant of Monte Carlo Tree Search (MCTS).
Key Innovations in AFLNetLegion: * Fine-Grained Tree Model: While AFLNet identifies states using single response codes (e.g., "220 OK"), AFLNetLegion uses the entire sequence of response codes. This prevents the fuzzer from conflating two different functional paths that happen to end in the same response code. * The UCT Function: It uses the "Upper Confidence Bound applied to Trees" (UCT) formula to mathematically balance exploration (trying less-visited states) and exploitation (focusing on states that have historically yielded high code coverage).
Datasets
The study utilized ProFuzzBench, currently the most comprehensive benchmark for stateful network protocol fuzzing. It includes six widely-used open-source targets:
- LightFTP & ProFTPD (File Transfer)
- Exim (Email/SMTP)
- OpenSSH (Secure Shell)
- OpenSSL (Encryption/TLS)
- Live555 (Media Streaming/RTSP)
Key Insights and Ideas
- The "Indistinguishable" Baseline: Surprisingly, AFLNet’s existing algorithms (
RANDOMvs.FAVOR) performed almost identically. The difference in branch coverage across all benchmarks was less than 1.2%. This suggests that current heuristics aren't as "smart" as previously thought. - Context Matters: AFLNet’s coarse-grained model often misses "interesting" states. For example, an FTP
NLST(list files) command is much more productive to fuzz after a directory has been created, but AFLNet might treat the "before" and "after" states as identical because they both return the same success code. - The Throughput Bottleneck: The "aha" moment of the paper is the realization that network fuzzing is incredibly slow. While a file fuzzer might run 1,000+ executions per second, AFLNet averages only 20 execs/s. At this speed, even a mathematically superior selection algorithm like MCTS doesn't have enough "attempts" to truly outshine simpler methods within a standard 24-hour window.
Key Results
- Case Study Success: In a targeted evaluation of the
GLOBlibrary within ProFTPD, AFLNetLegion significantly outperformed AFLNet. It was at least twice as likely to cover complex edge cases (like escaping wildcards or memory allocation failures) because its tree model correctly identified the prerequisites for those states. - Overall Performance: Across the full ProFuzzBench suite, AFLNetLegion achieved similar or slightly better coverage than the best AFLNet variant in 5 out of 6 cases. However, it struggled with OpenSSH, where the high number of unique response sequences made the MCTS tree too sparse to be effective.
Limitations and Future Work
The authors identify two primary hurdles for the field:
- Speed: Systematic algorithms need higher throughput to reach their potential. Future work should focus on "un-breaking" the network bottleneck (e.g., through better server snapshots or faster reset mechanisms).
- Input Quality: Random mutations often produce "garbage" that servers immediately reject. The authors suggest that structure-aware fuzzing (understanding the protocol grammar) is necessary to move deeper into the state machine.
- Symbolic Execution: The original Legion algorithm relied on symbolic execution to prune the search space; AFLNetLegion is "lightweight" and lacks this, which may limit its ability to identify truly unreachable states.
Summary updated