SplITS: Split Input-to-State Mapping for Effective Firmware Fuzzing

Guy Farrelly, Paul Quirk, Salil S. Kanhere, Seyit Camtepe, Damith C. Ranasinghe

Abstract

Fuzzing monolithic firmware remains a significant challenge due to the prevalence of "magic values"—multi-byte strings or constants that guard deep execution paths. Traditional Input-to-State (ITS) mapping techniques, which are highly effective in desktop environments, fail in the embedded domain because firmware often reads peripheral data non-contiguously via Memory Mapped Input/Output (MMIO). This paper introduces SplITS, a novel fuzzing framework designed to handle "split" input mappings. By utilizing comparison-content feedback and string-length metrics, SplITS transforms the search for magic strings from a combinatorial problem into a linear one. Our evaluation on 24 real-world firmware binaries demonstrates that SplITS solves nearly 500% more magic strings than state-of-the-art tools and discovered six previously unknown vulnerabilities, including CVE-2023-0779.

Introduction

Automated software testing through fuzzing has become the industry standard for identifying security vulnerabilities. However, the effectiveness of a fuzzer is often limited by its ability to bypass "magic value" checks—specific sequences of bytes required to unlock new code paths. In desktop software, this is addressed using Input-to-State (ITS) mapping, where the fuzzer identifies a relationship between a contiguous block of input (e.g., a file) and a value used in a comparison instruction.

In monolithic firmware, this assumption of contiguity breaks down. Firmware typically interacts with peripherals (such as UART, GPS, or network controllers) byte-by-byte through MMIO. Because the CPU may perform unrelated tasks or check status registers between reading individual bytes of a command, the "magic string" becomes fragmented across the fuzzer's input stream. This fragmentation renders traditional ITS tools incapable of mapping the program state back to the original input, effectively stalling the fuzzer at the first complex check.

The SplITS Framework

To overcome the limitations of traditional ITS, we propose SplITS (Split Input-to-State Mapping). SplITS introduces two primary feedback mechanisms to bridge the gap between fragmented MMIO reads and the internal state of the firmware.

1. Comparison-Content Feedback

Traditional fuzzers often treat comparison failures as binary outcomes. SplITS, conversely, monitors the actual content of memory buffers during string comparisons (e.g., calls to strcmp or memcmp). Instead of attempting to guess an entire $N$-character string simultaneously—which results in a combinatorial explosion of possibilities—SplITS attempts to solve the string one byte at a time.

By observing how changes to specific input bytes affect the target buffer, SplITS can determine which input offset corresponds to which character in the magic string. This approach linearizes the search space: an $N$-character string can be solved in roughly $N \times 256$ attempts, rather than $256^N$. To further optimize this, SplITS employs "Implied Sequential Access," assuming that even if bytes are split by other operations, they are likely consumed in the order they appear in the input stream.

2. Length-Guided Fuzzing

Fuzzers typically prioritize inputs that reach new code branches. However, if a fuzzer provides a 2-byte input to a function expecting a 10-byte string, the comparison will fail immediately, and the fuzzer may never "save" that input for further mutation. SplITS instruments the firmware to detect the expected lengths of strings (often by identifying null terminators). It then provides feedback to the fuzzer to prioritize inputs that match the required length, ensuring the fuzzer provides enough "space" for the magic string to be successfully placed.

Experimental Evaluation

We evaluated SplITS against a benchmark of 24 real-world monolithic firmware binaries. This dataset included 21 targets from prominent firmware research (P2IM, Fuzzware, and Ember-IO) and 3 new targets from modern open-source projects. The targets were divided into "Magic-String-Binaries" (12 targets) and "Other-Binaries" (12 targets) to measure both performance gains and potential overhead.

Key Results

  • Magic String Resolution: SplITS solved 497% more magic strings compared to the baseline state-of-the-art tools, Fuzzware and ICICLE.
  • Code Coverage: The framework achieved a significant increase in code coverage, reaching up to 161% more basic blocks in complex targets by successfully navigating past string-guarded gates.
  • Vulnerability Discovery: SplITS identified six previously unknown bugs in mature firmware. Notably, it discovered a vulnerability in the Zephyr RTOS SocketCan component, which was subsequently assigned CVE-2023-0779.
  • Reliability: Unlike baseline fuzzers that occasionally bypassed checks through random chance, SplITS demonstrated consistent success across multiple trials, validating the robustness of its feedback mechanisms.

Limitations and Future Work

While SplITS represents a significant advancement in firmware security, certain challenges remain. Currently, the tool focuses on MMIO-based inputs; peripherals that utilize Direct Memory Access (DMA) to write directly to memory without CPU intervention are not yet supported. Additionally, SplITS relies on hooking standard library comparison functions. If a developer implements custom, inlined comparison loops, the tool may fail to detect the check automatically. Finally, the tool occasionally encounters false positives, such as misidentifying serial port output as a string comparison, which can lead to minor computational overhead.

Conclusion

SplITS addresses a fundamental mismatch between desktop-centric fuzzing techniques and the realities of embedded systems. By accounting for the "split" nature of firmware input and utilizing content-aware feedback, SplITS enables deep exploration of monolithic firmware that was previously inaccessible to automated tools. The researchers have open-sourced SplITS and the associated datasets to facilitate further research into embedded security.

Summary updated

BibTeX
@inproceedings{farrelly2023splits,
  author = {Guy Farrelly and Paul Quirk and Salil S. Kanhere and Seyit Camtepe and Damith C. Ranasinghe},
  title = {{SplITS: Split Input-to-State Mapping for Effective Firmware Fuzzing}},
  booktitle = {ESORICS},
  year = {2023},
  doi = {10.1007/978-3-031-51482-1\_15},
}
Figure