Introduction
Detecting security vulnerabilities in hardware is a high-stakes endeavor. Unlike software, a bug that reaches silicon can incur millions of dollars in rectification costs or necessitate a total product recall. Currently, hardware designers rely on static analysis techniques—such as linting and formal verification—to identify vulnerabilities during the Register-Transfer Level (RTL) design phase.
However, traditional static analysis suffers from two primary limitations. First, the "Noise Problem": these tools frequently generate thousands of violations, many of which are benign false positives that overwhelm human reviewers. Second, the "Context Gap": while static tools can detect rule violations, they lack the semantic understanding to explain why a violation poses a security risk or to identify which specific signals (assets) are critical for protection.
Conversely, Large Language Models (LLMs) excel at semantic reasoning and code comprehension but are prone to "hallucinations" and cannot provide formal proofs of security. LASHED (LLMs And Static Hardware Analysis) bridges this gap by integrating the reasoning capabilities of LLMs with the rigorous verification of static hardware tools.
The LASHED Framework
LASHED employs a three-stage pipeline designed to automate and refine the detection of hardware security bugs.
- Asset Identification (AssetID): The LLM serves as a security expert. Provided with a Common Weakness Enumeration (CWE) description and the RTL source code, it identifies "security-relevant assets"—the specific registers or signals that require protection.
- Static Analysis: The identified assets are used to configure traditional verification tools. For structural bugs, LASHED generates lint checks (using Synopsys VC SpyGlass). For behavioral bugs, it populates SystemVerilog Assertion (SVA) templates, which are then verified by a formal tool (VC Formal).
- Contextualization: The LLM reviews the failing results from the static tools. It performs a "sanity check" to prune false positives and generates human-readable explanations of the security threats for the remaining valid bugs.
Experimental Evaluation
The framework was evaluated across four diverse, open-source RISC-V based Systems-on-Chip (SoCs): H@DAC-21 (an OpenPiton-based SoC), OpenTitan (a Silicon Root of Trust project), Hummingbirdv2 E203, and VeerWolf. The study targeted five specific CWEs, ranging from improper debug access (CWE-1191) to missing lock bit protection (CWE-1233).
Key Results
LASHED demonstrated significant improvements in both precision and noise reduction compared to standalone static analysis.
- High Precision: Utilizing GPT-4o with optimized prompting, LASHED achieved a precision of 87.5%, correctly identifying 35 plausible CWEs out of 40 flagged instances.
- Effective Noise Reduction: The "think again" reasoning strategy (Variation v2) proved highly effective, reducing false positives from 103 down to 55 in specific tests.
- Model Performance: Scaling from GPT-4o-mini (0.47 precision) to GPT-4o (0.58 precision) showed a clear advantage for larger, more capable models in hardware security contexts.
- Efficiency: The automated flow is cost-effective, with experiments averaging 163 seconds and costing between $0.05 and $0.38 in API fees, making it suitable for integration into CI/CD pipelines.
Discussion and Future Work
A key insight from the study is that LLMs are most effective when used as semantic filters rather than primary bug finders. While static analysis provides the "ground truth" of a failure, the LLM provides the necessary context to determine if that failure constitutes a genuine security risk.
However, limitations remain. The pipeline is highly dependent on the initial Asset Identification stage; if the LLM fails to identify a critical signal, the subsequent static analysis will miss the bug. Furthermore, while LLMs handle structural flaws well, they still struggle with complex behavioral flows requiring deep formal logic. Future research will explore the use of newer reasoning-heavy models and expanding the library of SVA templates to cover a broader spectrum of hardware vulnerabilities.
Summary updated