TL;DR
T-Scheduler is a new reinforcement learning-based seed scheduler for fuzzing that models the selection of inputs as a Multi-Armed Bandit problem. By using Thompson Sampling, it achieves superior bug-finding and code coverage results compared to 11 state-of-the-art schedulers—all while requiring zero hyperparameter tuning and maintaining negligible computational overhead.
What Problem Does This Paper Address?
Fuzzing is the "gold standard" for finding software vulnerabilities, but it faces a massive data problem. As a fuzzer runs, it saves thousands of "seeds" (inputs) that trigger interesting program behaviors. The fuzzer must then decide: which seed should I mutate next to find the most new code or bugs?
This is the seed scheduling problem. Traditional fuzzers like AFL++ use simple heuristics (e.g., prioritizing smaller or faster inputs). While recent research has applied Reinforcement Learning (RL) to make these choices "smarter," existing RL approaches suffer from two major flaws:
- High Overhead: The time spent "thinking" about which seed to pick reduces the "iteration rate" (how many times the fuzzer actually tests the program), often negating the benefits of the smarter selection.
- Hyperparameter Hell: Most RL schedulers require manual tuning for different target programs. A setting that works for an image parser might fail miserably for a network protocol.
Methods
The authors propose T-Scheduler, which treats seed scheduling as a Beta-Bernoulli Multi-Armed Bandit (MAB) problem.
The "Bandit" Approach
Imagine a row of slot machines (the "bandits"). You want to pull the arm of the machine that pays out the most, but you don't know the odds. You must balance exploration (trying different machines to learn their odds) and exploitation (pulling the arm of the machine you currently think is the best).
In T-Scheduler:
- Actions: Selecting a specific seed to mutate.
- Reward: A "payout" occurs if the mutation discovers new program behavior (code coverage).
- Thompson Sampling: This is the mathematical engine. It uses a probability distribution (the Beta distribution) to model the likelihood of a seed being "interesting." It naturally balances exploration and exploitation with theoretical optimality guarantees.
Rareness Correction
To prevent the fuzzer from getting stuck on "easy" code paths that are hit frequently, T-Scheduler introduces a self-balancing rareness correction. It penalizes seeds that cover frequently executed code, forcing the fuzzer to prioritize "hard-to-reach" areas of the program.
Datasets
The authors conducted a massive evaluation totaling over 35 CPU-years of fuzzing effort. They tested T-Scheduler against 11 other schedulers (including AFLFast, Entropic, and K-Scheduler) using two industry-standard benchmarks:
- Magma: A ground-truth benchmark containing real-world programs (like
libpng,openssl, andsqlite3) with known, reachable bugs. - FuzzBench: Google's standard service for evaluating fuzzer performance based on code coverage expansion.
Key Insights and Ideas
- The "No-Tuning" Advantage: T-Scheduler is essentially "plug-and-play." Because Thompson Sampling adapts to the observed rewards in real-time, it doesn't need the manual hyperparameter tuning that plagues other RL-based fuzzers like AFL-Hier or EcoFuzz.
- Efficiency is King: In fuzzing, speed is often more important than "intelligence." T-Scheduler's logic is constant-time ($O(1)$), meaning it doesn't slow down the fuzzer's execution rate, unlike more complex hierarchical or graph-based models.
- Probabilistic vs. Deterministic: The authors found that a probabilistic variant (
Sample) generally outperformed a deterministic one (Rare+). By allowing for "sub-optimal" choices occasionally, the fuzzer explores the search space more effectively in the long run.
Key Results
- Bug Discovery: The
Samplevariant of T-Scheduler was the top performer in 80% of bug-finding metrics (Total bugs, Unique bugs, Fastest to find, and fewest Missed). - Coverage: On FuzzBench, T-Scheduler achieved the highest coverage on 13 out of 19 targets, outperforming the default AFL++ scheduler.
- Consistency: T-Scheduler showed higher "consistency" across multiple trials, meaning it is less reliant on "getting lucky" with a random seed mutation.
- Overhead: While some RL fuzzers introduce a 2x slowdown, T-Scheduler maintains iteration rates comparable to (and sometimes higher than) basic heuristic schedulers.
Limitations and Future Work
- Directed Fuzzing: T-Scheduler is currently a "greybox" fuzzer designed for general coverage. The authors suggest that the MAB model could be extended to "directed fuzzing," where the reward is based on reaching a specific, potentially vulnerable line of code.
- Complex Data Flows: While T-Scheduler is excellent at navigating the Control Flow Graph (CFG), it doesn't explicitly model complex data-flow constraints (like "magic numbers" or checksums). Combining T-Scheduler with "concolic execution" (which solves these mathematical constraints) could be a powerful hybrid.
- Metric Agnosticism: The current model treats all new coverage as an equal reward. Future work could explore "weighting" rewards based on the type of code reached (e.g., memory-management functions).
Summary updated