Abstract
Hardware security vulnerabilities are increasingly costly to fix as designs progress toward fabrication. This paper introduces CWEAT (CWE Analysis Techniques), a static analysis framework for early-stage Register-Transfer Level (RTL) design. CWEAT identifies Common Weakness Enumerations (CWEs) using Abstract Syntax Tree (AST) scanning and keyword-driven heuristics. Evaluation on 11 open-source designs, including complex SoCs and RISC-V cores, demonstrates its efficiency: it identified 53 potential weaknesses in a high-profile SoC with a mean scan time of just 63 milliseconds, providing designers with near-instant security feedback.
Introduction
In hardware development, the cost of fixing a bug follows an exponential curve. Identifying a vulnerability during the initial RTL design phase is significantly cheaper than addressing it after fabrication. While software engineering benefits from mature static analysis tools (linters) to catch security flaws, hardware designers have historically lacked similar early-stage support. Existing commercial linters focus primarily on functional correctness, while formal verification and simulation require more complete designs and significant computational resources. CWEAT addresses this gap by providing a lightweight, security-focused static analysis tool for the implementation phase.
Methodology: The CWEAT Framework
CWEAT is designed to bridge the gap between initial coding and full-system verification. The framework operates by parsing Verilog or SystemVerilog source code into Abstract Syntax Trees (ASTs) using the Verific library.
The core of CWEAT relies on the Visitor Pattern to traverse these ASTs. To minimize "noise" and improve performance, the framework employs Keyword Pruning. By focusing on security-relevant signals (e.g., key, lock, debug), the scanners traverse up to 80.4x fewer nodes than a full search, enabling real-time feedback.
Heuristic Scanners
The researchers developed specialized algorithms for five representative hardware CWEs, such as CWE-1234 (debug overrides) and CWE-1271 (improper initialization). These scanners use logic flows to track how identifiers are handled within conditional blocks and assignments.
Evaluation and Results
CWEAT was evaluated against 11 open-source hardware designs, including four SoCs (e.g., OpenPiton, Pulpissimo) and seven processor cores (e.g., Ibex, CV32E40P). These designs utilize popular ISAs such as RISC-V and OpenRISC.
Across these benchmarks, CWEAT identified 180 potential instances of weaknesses. In the H@DAC21 SoC, the tool flagged 53 warnings; manual inspection confirmed 11 as genuine security concerns, including a critical bug allowing unauthorized peripheral register access. The analysis is remarkably efficient, with a mean scan time of ~63ms. Even for the largest designs, the entire pipeline (parsing and scanning) completes in under 500ms.
Discussion and Future Work
A key insight from this research is the effectiveness of targeted keyword matching in reducing false positives compared to general-purpose commercial linters. While CWEAT is highly effective at finding "low-hanging fruit" vulnerabilities that require minimal context, it faces limitations. As a heuristic-based tool, it can produce false negatives if vulnerabilities are coded in non-standard ways. Furthermore, it cannot currently detect cross-module vulnerabilities that only emerge after design elaboration.
Future work aims to integrate machine learning to adapt scanners to specific team coding styles and expand the library to cover all 21 statically-detectable hardware CWEs identified by the authors.
Summary updated