VeriCWEty:在Verilog中实现基于嵌入的行级CWE检测 VeriCWEty: Embedding enabled Line-Level CWE Detection in Verilog 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-04-15
⬇️ 4 次下载
👁️ 预览文献
💡 AI 中文简介
大语言模型生成的Verilog硬件代码常隐藏安全漏洞(CWE),现有检测方法要么抓不住语义漏洞,要么定位不精确。本文提出基于嵌入的检测框架,能在模块级和行级两个粒度上发现并分类漏洞。对CWE-1244和CWE-1245等常见弱点,精确率约89%,行级漏洞检测准确率达96%。
领域硬件安全 / RTL代码分析与漏洞检测
适合谁读需要一定专业背景(了解Verilog与硬件安全概念)
核心贡献1. 提出基于嵌入的Verilog漏洞检测框架,首次同时支持模块级和行级粒度的CWE检测与分类;2. 在行级漏洞定位上实现96%准确率,弥补了传统规则/形式化方法定位不精确的缺陷。
关键数据CWE-1244和CWE-1245等常见弱点检测精确率约89%;行级漏洞检测准确率96%。
推荐理由如果你关心LLM生成的硬件代码是否安全,这篇工作用嵌入方法把漏洞定位精确到行,值得一读。
关键词["Verilog", "CWE检测", "硬件安全", "嵌入学习", "RTL代码生成", "大语言模型"]

原文摘要

查看英文原文摘要

Large Language Models (LLMs) have shown significant improvement in RTL code generation. Despite the advances, the generated code is often riddled with common vulnerabilities and weaknesses (CWEs) that can slip by untrained eyes. Attackers can often exploit these weaknesses to fulfill their nefarious motives. Existing RTL bug-detection techniques rely on rule-based checks, formal properties, or coarse-grained structural analysis, which either fail to capture semantic vulnerabilities or lack precise localization. In our work, we bridge this gap by proposing an embedding-based bug-detection framework that detects and classifies bugs at both module and line-level granularity. Our method achieves about 89% precision in identifying common CWEs such as CWE-1244 and CWE-1245, and 96% accuracy in detecting line-level bugs.