arXiv:2611.03709cs.CROct 2026

Manuscript Offprint

arXiv:2611.03709

InterceptFuzz: Interception-based Stateful Fuzzing of Single-Process Targets

Ilja Siroš, Dave Singelée, Bart Preneel

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Ilja Siroš

COSIC, KU Leuven

Leuven, Belgium

ilja.siros@kuleuven.be

Dave Singelée

DistriNet, KU Leuven

Leuven, Belgium

dave.singelée@kuleuven.be

Bart Preneel

COSIC, KU Leuven

Leuven, Belgium

bart.preneel@kuleuven.be

Abstract—Stateful protocol implementations are commonly fuzzed by tools that act as a network client and exchange messages with the target over sockets. Some wireless and IoT protocol stacks, in contrast, provide a single-process simulation platform, in which all nodes run within one binary and exchange packets in memory. Such simulations execute deterministically and at high speed, which makes them well suited to fuzzing, but they offer no socket to which existing stateful fuzzers can attach. At the same time, widely deployed fuzzing infrastructure, such as Google's OSS-Fuzz, supports only stateless fuzzing engines, which treat every input in isolation and offer no built-in way to reach deeper protocol states. To address both gaps, this paper presents InterceptFuzz, a middleware that enables stateful fuzzing of single-process targets relying solely on a stateless fuzzing engine, so that it can use the engines already deployed in infrastructure such as OSS-Fuzz. InterceptFuzz requires only a minimal change to the target code: a hook placed where the target passes packets between nodes. Through this hook, InterceptFuzz records the benign traffic from which the initial seeds are derived and injects the fuzzed packets. InterceptFuzz organizes the observed packet sequences in a Prefix Tree. Each seed carries a State ID that selects a node of this tree, and InterceptFuzz deterministically replays the recorded prefix before delivering the mutated packet. Over the course of a campaign, the tree grows with newly discovered sequences, while redundant states are pruned to keep its growth in check. InterceptFuzz powered by AFL++ is evaluated on the Nexus test framework of OpenThread and on the LTE and Wi-Fi models of the ns-3 network simulator, against an interception-based adaptation of AFLNet and against Concat, a baseline fuzzer also powered by AFL++ that mutates a whole message sequence as a single input and splits it into messages at a delimiter. On OpenThread and ns-3 Wi-Fi, InterceptFuzz covers significantly more branches than both baselines. During the evaluation, seven previously unknown crash signatures were found in OpenThread. The evaluation also shows that Concat, despite its simplicity, covers more branches than AFLNet in every campaign on OpenThread and ns-3 Wi-Fi, and on OpenThread it exposes the same crash signatures as InterceptFuzz, although some of them in fewer campaigns.

Index Terms—fuzzing, stateful fuzzing, protocol testing, network simulation, wireless protocols, OpenThread, ns-3

I. INTRODUCTION

OSS-Fuzz, Google's continuous fuzzing service for open-source software, has helped identify and fix over 13,000 vulnerabilities and 50,000 bugs across 1,000 projects [1]. Yet every engine it supports—libFuzzer [2], AFL++ [3], Honggfuzz [4], and Centipede [5]—is stateless. For programs that process each input independently, this is sufficient. For protocol implementations, however, whose stateful logic is reachable only through a specific sequence of prior messages, these engines offer no built-in support.

This limitation reflects a broader divide in the fuzzing landscape. While stateful fuzzers exist in academia, several drawbacks hinder their industrial adoption. Existing stateful fuzzers almost universally assume a classic client-server architecture, acting as a malicious client that sends packets over OS-level network sockets. Furthermore, they are predominantly research prototypes, and many are not maintained beyond their initial publication. Adapting these tools to novel protocols or non-networked architectures therefore requires substantial manual engineering effort. A prominent class of targets highlighting this gap comprises systems in which stateful communication occurs entirely within a single process. This architectural pattern enables deterministic, high-throughput testing and is used in in-process simulators for network and IoT protocols.

To bridge these gaps, this paper presents InterceptFuzz, a stateful fuzzing middleware designed for single-process environments. InterceptFuzz is not a fuzzer itself but a library linked into the target. It delegates input mutation and scheduling to an existing stateless fuzzing engine, such as AFL++ or libFuzzer. This architectural choice mitigates the maintenance issues of academic fuzzers, as InterceptFuzz inherits new features of the underlying stateless engine without requiring any modifications to it. For the same reason, InterceptFuzz can use the engines already deployed in OSS-Fuzz, a prerequisite for bringing stateful fuzzing to its targets.

InterceptFuzz interacts with the target through interception hooks, i.e., single-line calls into the InterceptFuzz library that a developer places at any point of interest in the code. These hooks are designed to serve two purposes: monitoring benign traffic and injecting fuzzed inputs into the execution flow. From the traffic observed through these hooks, InterceptFuzz incrementally builds a Prefix Tree, a record of the packet sequences exchanged by the target. The tree grows by periodically adding the minimized corpus of the underlying stateless engine. To keep this growth in check, states that are no longer used are pruned. Each input generated by the stateless engine carries a State ID that points to a node in the Prefix Tree. The input is delivered only after InterceptFuzz replays the recorded prefix leading to that node, so mutations never corrupt the path to the targeted state. This mechanism ensures that inputs constructed by the underlying stateless engine reach deep, sequence-dependent code paths.

InterceptFuzz is evaluated on three targets built on two single-process protocol simulators: the LTE and Wi-Fi modules of the ns-3 network simulator [6], which is used mainly in networking research, and the Nexus test framework of OpenThread, an open-source Thread stack used in commercial products [7]. On these targets, it is compared against two baselines. The first baseline is a delimiter-based concatenation fuzzer, referred to as Concat in the following. It implements the seed concatenation strategy described in Section II-B and represents the most straightforward method to perform stateful testing with a stateless engine. In this evaluation, both InterceptFuzz and Concat use AFL++ as their underlying engine. The second baseline represents dedicated stateful fuzzers and is based on AFLNet [8], the first code- and state-coverage-guided protocol fuzzer and the reference point on which much of the subsequent work in stateful fuzzing builds [9]. Specifically, the evaluation uses the LibAFL [10] implementation of AFLNet released with Fizzle [11], which reproduces AFLNet's message-sequence inputs and response-based state-model inference, combined with the packet-level mutations and power scheduling of LibAFL. For this evaluation, its socket communication is replaced by the same interception points used by InterceptFuzz. AFLNet distinguishes protocol states by the response codes of the target, such as the status codes of FTP or RTSP, which the protocols evaluated in this paper do not provide. Following the recommendation of the AFLNet authors [9], a dissector written for each target therefore maps every intercepted response to a code that identifies its message type. All three fuzzers share one delivery mechanism, so that the comparison isolates how each handles protocol state.

The contributions of this paper are summarized as follows:

  • InterceptFuzz, an interception-based middleware that enables stateful fuzzing of single-process targets on top of unmodified stateless fuzzing engines, such as AFL++ or libFuzzer. Unlike existing stateful fuzzers, it requires no client-server setup or network sockets: it integrates with a target through a single hook function, called where packets pass between nodes, requires only slight modifications of the target code, and can reuse the existing integration tests of the target as fuzzing harnesses.

  • A Prefix Tree state model with a compact State ID seed encoding, which lets a stateless engine address previously observed protocol states and reach them deterministically, together with an epoch-based loop that alternately extends, exploits, and prunes this model.

  • An empirical evaluation on three single-process simulated targets (ns-3 LTE, ns-3 Wi-Fi, and OpenThread Nexus) against a concatenation baseline (Concat) and an interception-based adaptation of AFLNet. On OpenThread Nexus and ns-3 Wi-Fi, InterceptFuzz covers significantly more branches than both baselines.

  • Seven previously unknown crash signatures in OpenThread.

Responsible disclosure and open source. All seven crash signatures found in OpenThread were reported to the OpenThread maintainers, who have since fixed them. InterceptFuzz and all experimental artifacts are released as open source at https://github.com/KULeuven-COSIC/InterceptFuzz.

References (40)