1. Introduction
As the foundational layer of computing systems, hardware security vulnerabilities [
1,
2,
3] propagate through the trust chain [
4] to the upper layers, eroding the trust foundation of the entire system. Compared with software vulnerabilities, hardware vulnerabilities are more difficult to detect due to lower abstraction layers, which can only be identified by in-depth analysis paired with specialized hardware toolchains. More critically, once the vulnerable hardware is manufactured, it is hard to fix. Even if it is mitigated by software [
5], it will result in performance overhead or reduced functionality.
As chip integration and microarchitecture complexity grow exponentially, traditional hardware verification methods [
6,
7,
8] encounter substantial bottlenecks. Formal verification guarantees logical correctness but is prone to state explosion in large-scale designs (e.g., complex processors), making it challenging to achieve full scenario coverage. Functional simulation depends on hardware domain expertise and requires manual test case development, suffering from limitations like low efficiency and incomplete coverage. As a mature automated testing technique in software, fuzz testing [
9] automatically generates numerous variant inputs, monitors target behavior, and explores the input space independently, without the need for complex design modeling. With only a small set of initial seeds, it efficiently identifies potential vulnerabilities.
While RTL-level fuzz testing [
10,
11,
12,
13,
14] has become a core technique for hardware vulnerability discovery, existing approaches exhibit research gap areas in control flow awareness and utilization. This leads to inadequate coverage exploration of target code in fuzz testing, which fails to meet the verification requirements of complex hardware designs. Key limitations include insufficient control flow feedback granularity, overly simplistic coverage guidance mechanisms, and limited scenario adaptability. Mainstream tools and recent studies have attempted to address these issues via control flow modeling, coverage evaluation, and timing analysis, yet significant limitations remain.
RFuzz pioneered hardware fuzz testing by implementing multiplexer switching coverage. However, it simplifies multi-cycle tests into single-cycle inputs via concatenation, fails to distinguish cross-cycle state dependencies, and incurs instrumentation costs that scale exponentially with RTL complexity. DiFuzzRTL adopts control register coverage-guided fuzz testing with only 15% instrumentation overhead. However, its register-level coverage awareness cannot capture fine-grained nodes (e.g., branches and conditional judgments), resulting in missed path updates when register states remain unchanged, making it challenging to cover complex timing scenarios during guided fuzz testing. MPFuzz integrates syntactic fuzz testing with symbolic simulation, defining Full Multiplexer Toggle Coverage (FMTC) to enhance timing monitoring. However, its control flow modeling is limited to Mux switching and does not account for multi-level control structures (e.g., FSMs and conditional branches).
Existing research suffers from two core gaps. First, current tools focus on single-layer signals and lack methods that balance fine-grained extraction with low monitoring overhead. Second, existing dynamic adjustment mechanisms rely on register or multiplexer switching, lacking dynamically adaptive testing strategies based on control flow structures.
To address the limitations of existing research, this paper makes the following key contributions. First, it proposes a four-layer control node extraction and compression mechanism based on FIRRTL. Second, it designs a fuzz strategy based on coverage feature feedback to balance random exploration and directed mining. Third, it establishes a comprehensive fuzz testing framework, CFGuide-Fuzz. Comparative experiments on a typical CPU RTL design confirm the framework’s significant advantages in enhancing control flow coverage and improving vulnerability-detection efficiency.
This paper is structured as follows:
Section 2 reviews related work and core technical background in hardware fuzz testing;
Section 3 details the CFGuide-Fuzz framework’s methodology, including the control flow extraction optimization mechanism and dynamic fuzz strategy implementation;
Section 4 presents the experimental environment, results, and performance analysis; and
Section 5 summarizes the work and outlines future research directions.
2. Related Work
Hardware fuzz testing research focuses on three core areas: hardware fuzz testing techniques, control flow analysis and extraction, and test generation strategies. This section systematically reviews the technological evolution and limitations of each domain, drawing on the latest research to clarify CFGuide-Fuzz’s academic positioning.
2.1. Hardware Fuzz Testing Techniques
Hardware fuzz testing techniques have evolved through several stages, traditional random testing, formal guided testing, coverage-guided testing, directed fuzz testing, and input optimization testing. Random testing generates arbitrary instructions and is only suitable for simple combinational logic, with low coverage efficiency. While formal verification delivers high precision, it encounters state explosion when dealing with large-scale complex processors, making it unable to provide timely and effective feedback. As a compromise strategy, coverage-guided testing balances verification efficiency and vulnerability-detection capabilities, garnering substantial attention from researchers.
Table 1 summarizes recent studies on hardware fuzz testing.
2.2. Control Flow Extraction
Control flow extraction serves as the foundation for guiding fuzz testing. CFG modeling techniques from the software domain are ill-suited for hardware’s parallelism and timing constraints. Existing approaches like RFuzz, DiFuzzRTL, and DirectFuzz employ FIRRTL instrumentation to monitor Mux signals and control registers. MPFuzz, based on PyRTL IR modeling, similarly focuses on Mux switching coverage. TheHuzz utilizes commercial tools to extract coverage metrics across six dimensions including statements, branches, and FSMs. However, its high overhead prevents real-time feedback. WhisperFuzz employs MEG modeling for microarchitecture state transitions to locate timing defects, yet fails to establish coverage metrics supporting test guidance. Existing control flow extraction and hierarchical techniques either focus on single-level control signals or achieve multi-dimensional coverage without real-time feedback. The extraction and optimization of hierarchical control flow at the RTL level is still a research gap area.
2.3. Test Generation Strategy
The core of test generation strategies lies in balancing exploration and utilization. RFuzz extracts the mux flip situation to guide fuzz and performs random bit mutation. DiFuzzRTL uses the state coverage of control registers as feedback to guide fuzz testing and perform instruction level mutation, which has strong universality but low reach rate for complex paths. DirectFuzz guides test generation through priority queues and module distance metrics, dynamically allocating mutation counts based on module distance. MPFuzz introduces ISA (Instruction Set Architecture) syntax constraints to reduce the proportion of illegal instructions, and generates seeds that satisfy FMTC (0-1-0 switching) through symbol simulation. However, symbolic solving incurs high computational cost and is only suitable for initial seed initialization. MMFuzz adjusts seed weights and mutation probabilities based on Markov chains, making it adaptable to non-processor designs. HyPFuzz significantly accelerates coverage by dynamically switching between fuzz testing and formal verification, yet it relies on commercial formal tools. WhisperFuzz’s operand variation focuses on data dependency paths, but is not associated with control flow structures. These test generation strategies optimize the randomness problem of fuzz testing from the perspective of constrained input and dynamic adjustment strategies, but cannot dynamically adjust the exploration direction and mutation intensity based on the hierarchical activation structure characteristics of hardware control flow.
2.4. Research Positioning
This work addresses two key technical gaps in hardware fuzz testing through two targeted innovations:
FIRRTL-based fine-grained control flow extraction: Enabled by lightweight instrumentation, it achieves four-tier coverage (control ports, FSMs, control nodes, conditional nodes), breaking the limitations of single-layer signal/register coverage in existing methods.
Feedback-driven dynamic fuzzing strategy: A two-stage mechanism (branch fuzzing for breadth exploration, leaf fuzzing for depth utilization) that automatically adjusts exploration weights via coverage features, eliminating the need for formal tools or manual intervention.
5. Conclusions
As a core technology for RTL-level vulnerability mining, hardware fuzz testing has long faced the key problem of the lack of fine-grained control flow guidance. Traditional fuzz strategies rely heavily on random mutations or coarse-grained coverage guidance (such as Mux coverage), which cannot accurately mine deep timing control paths in hardware, and lack control flow extraction techniques and fuzz strategies open-source tool-based, resulting in low coverage efficiency and high vulnerability-detection rates.
In response to the above issues, this paper proposes the CFGuide-Fuzz framework. Firstly, it proposes a hardware control flow hierarchical extraction method to achieve precise extraction of control nodes at different layers. Secondly, the framework achieves a balance between exploration and utilization in hardware fuzz testing by analyzing global coverage features and dynamically switching between branch and leaf fuzz strategies, solving the problem of coverage stagnation or inefficient exploration caused by a single strategy. Experimental results demonstrate that CFGuide-Fuzz enhances register state by 9.4% and doubles potential error detection capability on mainstream RISC-V kernels compared to traditional methods in the same number of iterations, validating the effectiveness of the framework.