Fixing Hardware Security Bugs with Large Language Models

02/02/2023
by   Baleegh Ahmad, et al.
0

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.

READ FULL TEXT

page 4

page 5

page 7

page 10

page 11

page 12

research
11/07/2022

Towards Extending the Range of Bugs That Automated Program Repair Can Handle

Modern automated program repair (APR) is well-tuned to finding and repai...
research
03/13/2023

InferFix: End-to-End Program Repair with LLMs

Software development life cycle is profoundly influenced by bugs: their ...
research
12/03/2021

Can OpenAI Codex and Other Large Language Models Help Us Fix Security Bugs?

Human developers can produce code with cybersecurity weaknesses. Can eme...
research
03/20/2023

Large Language Models and Simple, Stupid Bugs

With the advent of powerful neural language models, AI-based systems to ...
research
06/22/2023

FLAG: Finding Line Anomalies (in code) with Generative AI

Code contains security and functional bugs. The process of identifying a...
research
06/13/2018

Detecting Speech Act Types in Developer Question/Answer Conversations During Bug Repair

This paper targets the problem of speech act detection in conversations ...
research
09/15/2017

Tortoise: Interactive System Configuration Repair

System configuration languages provide powerful abstractions that simpli...

Please sign up or login with your details

Forgot password? Click here to reset