arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.01215cs.CR
收藏

使用大型语言模型修复硬件安全漏洞

Fixing Hardware Security Bugs with Large Language Models

Baleegh Ahmad, Shailja Thakur, Benjamin Tan, Ramesh Karri, Hammond Pearce

AI总结:

本文构建硬件安全漏洞语料库与定量评估框架,通过提示工程和 LLM 集成实现 Verilog 安全漏洞自动修复,并在十个基准及 Cirfix 测试集上展现优于现有工具的效果。

摘要:

诸如 OpenAI 的 Codex 等新型的、基于 AI 的代码编写大型语言模型(LLM),已经在许多与编程相邻的领域中展示了能力。在本工作中,我们研究如何利用 LLM 自动修复硬件设计中存在的、与安全相关的漏洞。我们聚焦于用硬件描述语言 Verilog 编写的代码中的漏洞修复。为开展本研究,我们构建了一个能够代表该领域的硬件安全漏洞语料库。随后,我们设计并实现了一个框架,用于定量评估任何承担修复指定漏洞任务的 LLM 的性能。该框架支持对提示进行设计空间探索(即提示工程),并识别 LLM 的最佳参数。我们表明,多个 LLM 组成的集成能够修复我们全部十个基准测试。该集成在 Cirfix 自身的漏洞套件上优于最先进的硬件漏洞修复工具 Cirfix。这些结果表明,LLM 能够修复硬件安全漏洞,并且该框架是迈向自动化端到端漏洞修复框架这一最终目标的重要一步。

英文摘要:

Novel AI-based code-writing Large Language Models (LLMs) such as OpenAI's Codex have demonstrated capabilities in many coding-adjacent domains. In this work we consider how LLMs maybe leveraged to automatically repair security relevant bugs present in hardware designs. We focus on bug repair in code written in the Hardware Description Language Verilog. For this study we build a corpus of domain-representative hardware security bugs. We then design and implement a framework to quantitatively evaluate the performance of any LLM tasked with fixing the specified bugs. The framework supports design space exploration of prompts (i.e., prompt engineering) and identifying the best parameters for the LLM. We show that an ensemble of LLMs can repair all ten of our benchmarks. This ensemble outperforms the state-of-the-art Cirfix hardware bug repair tool on its own suite of bugs. These results show that LLMs can repair hardware security bugs and the framework is an important step towards the ultimate goal of an automated end-to-end bug repair framework.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑