TL;DR
Fuzzing monolithic firmware is notoriously difficult because peripheral inputs are interspersed unpredictably in the input stream, breaking traditional desktop-centric Input-to-State (ITS) mapping techniques. SplITS overcomes this roadblock by introducing a feedback-guided search and replacement strategy tailored for non-contiguous multi-byte magic strings. This approach turns an exponential combinatorial problem into a linear one, drastically increasing code coverage and uncovering previously hidden bugs.
What Problem Does This Paper Address?
Automated vulnerability discovery in embedded firmware often relies on rehosting—running the firmware inside an emulator and using a fuzzer to feed it inputs. However, monolithic firmware interacts directly with hardware peripherals via Memory Mapped Input/Output (MMIO) regions, as shown in Figure 1.
When a fuzzer generates a stream of data, the firmware reads it byte-by-byte. Because multiple peripherals (like UART, I2C, or ADCs) are active simultaneously, the bytes intended for a specific string comparison (e.g., checking if a modem responded with "OK") end up separated by status checks and data from other devices.
Unlike desktop applications where strings are loaded as contiguous blocks, firmware inputs are fragmented and interspersed across the fuzzer's input stream (see Figure 2). Traditional Input-to-State (ITS) mapping tools look for contiguous byte matches to surgically replace them with "magic values." Because they assume contiguity, they fail completely on firmware, leaving deep code paths guarded by multi-byte string checks entirely unreachable.
Methods
SplITS introduces Split Input-to-State Mapping, a novel instrumentation and mutation framework designed to bypass non-contiguous string roadblocks without requiring source code or debug symbols.
Its core components include:
- Comparison Feedback: Instead of trying all combinations of byte replacements simultaneously (which creates a massive combinatorial explosion), SplITS tests and solves each byte of the string sequentially. By monitoring the contents of the comparison buffers, it checks if a mutation successfully changed the target byte. If it did, it locks that byte in and moves to the next, reducing the search complexity from combinatorial to linear.
- Length Feedback: If the fuzzer-generated string is shorter than the expected magic string, the fuzzer won't know how to mutate it to the correct length. SplITS tracks the lengths of observed strings via null terminators and treats previously unseen string lengths as "interesting" coverage metrics, ensuring the fuzzer retains seeds that are long enough to be successfully mutated.
- Search Optimizations: To speed up the process, SplITS applies several intuitive constraints:
- Constrained Mutable Regions: It only mutates bytes that have already been read by the firmware prior to the comparison.
- Implied Sequential Access: It assumes that string bytes, while not adjacent, are read in chronological order.
- String Contractions: If the input string is too long, it attempts to shorten it using common token delimiters (like spaces or newlines).
Datasets
The authors evaluated SplITS against a diverse benchmark of 24 real-world monolithic firmware binaries:
- 21 binaries collected from prominent prior firmware fuzzing papers (including P2IM, µEmu, Fuzzware, and Ember-IO).
- 3 new binaries sourced from popular open-source IoT projects to expand the benchmark.
The dataset was split into two categories for evaluation: Magic-String-Binaries (12 binaries containing string comparisons like strcmp or strstr) and Other-Binaries (12 binaries without string comparisons, used to measure performance overhead).
Key Insights and Ideas
- Linearizing the Combinatorial Space: The true "aha moment" of the paper is realizing that firmware execution characteristics can be exploited to simplify the search space. By using the content of the comparison buffers as a feedback loop, the fuzzer can verify individual byte hits, transforming an exponential search problem into a linear one.
- Length Matters for Seed Retention: Standard greybox fuzzers discard inputs that don't discover new basic blocks. By redefining "new string lengths" as a valuable coverage metric, SplITS forces the fuzzer to save inputs that happen to be long enough, providing the necessary raw material for the mutation engine to succeed later.
Key Results
SplITS was evaluated against state-of-the-art frameworks including Fuzzware, Ember-IO, and Icicle (with CompCov).
- Magic String Resolution: SplITS automatically solved 497% more multi-byte magic strings guarding deep execution paths compared to the baseline. It consistently solved all string comparisons across all trials for 8 of the 12 target binaries.
- Code Coverage: SplITS achieved up to a 161% increase in basic blocks covered in string-guarded binaries. It statistically significantly outperformed the state-of-the-art in 11 out of the 12 magic-string targets.
- Bug Discovery: The tool uncovered 6 previously unknown bugs in well-studied firmware, including a zero-day vulnerability in the Zephyr OS Network component (CVE-2023-0779). It also consistently reproduced deep bugs that baseline fuzzers could only find through rare, accidental mutations.
- Zero Overhead on Standard Code: When tested on the 12 binaries without string comparisons, SplITS introduced no statistically significant difference in coverage, proving it doesn't degrade general fuzzing performance.
Limitations and Future Work
- Inline Comparisons: SplITS relies on hooking standard function calls (like
BLinstructions in ARM) to intercept string comparisons. If a developer implements a custom string comparison completely inline, SplITS would fail to detect it (though the authors note they did not encounter this in their real-world dataset). - False Positives: The detection mechanism occasionally flags non-comparison functions, such as serial port print statements, as potential string checks. While this wastes a small amount of computation time attempting to map inputs, the authors note the performance impact is negligible because unmappable bytes are quickly abandoned.
- DMA Limitations: Direct Memory Access (DMA) operations were explicitly designated as out of scope for this prototype. Integrating SplITS with frameworks that specialize in DMA fuzzing remains an open area for future work.
Summary updated