VerilogLAVD: LLM-Aided Rule Generation for Vulnerability Detection in Verilog
2508.13092v3
cs.CR, cs.AI
2025-08-22
Авторы:
Xiang Long, Yingjie Xia, Xiyuan Chen, Li Kuang
Резюме на русском
Зачастую, обнаружение проблем в проектах FPGA в ранних стадиях разработки требует специальных знаний в области безопасности, что может затруднить их раннее выявление. Недавние исследования рассматривали возможность применения боLовых языковых моделей (LLM) для детектирования уязвимостей в коде Verilog. Однако, существующие методы часто сталкиваются с проблемой недостаточного понимания структуры Verilog-кода, что приводит к несогласованным результатам. Мы предлагаем подход VerilogLAVD — первый пример использования LLM для генерации правил детектирования уязвимостей в Verilog на основе Verilog Property Graph (VeriPG). Этот подход сочетает синтаксические и семантические данные из AST, control flow и data dependency graphs. Используя LLM, мы генерируем правила для VeriPG на основе Common Weakness Enumeration (CWE). Наши эксперименты показали, что VerilogLAVD повышает F1-меру до 0.54 при сравнении с LLM и LLM с внешним знанием, что демонстрирует эффективность подхода.
Abstract
Timely detection of hardware vulnerabilities during the early design stage is
critical for reducing remediation costs. Existing early detection techniques
often require specialized security expertise, limiting their usability. Recent
efforts have explored the use of large language models (LLMs) for Verilog
vulnerability detection. However, LLMs struggle to capture the structure in
Verilog code, resulting in inconsistent detection results. To this end, we
propose VerilogLAVD, the first LLM-aided graph traversal rule generation
approach for Verilog vulnerability detection. Our approach introduces the
Verilog Property Graph (VeriPG), a unified representation of Verilog code. It
combines syntactic features extracted from the abstract syntax tree (AST) with
semantic information derived from control flow and data dependency graphs. We
leverage LLMs to generate VeriPG-based detection rules from Common Weakness
Enumeration (CWE) descriptions. These rules guide the rule executor that
traversal VeriPG for potential vulnerabilities. To evaluate VerilogLAVD, we
build a dataset collected from open-source repositories and synthesized data.
In our empirical evaluation on 77 Verilog designs encompassing 12 CWE types,
VerilogLAVD achieves an F1-score of 0.54. Compared to the LLM-only and LLM with
external knowledge baselines, VerilogLAVD improves F1-score by 0.31 and 0.27,
respectively.
Ссылки и действия
Дополнительные ресурсы: