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

LLM4CVE:利用大语言模型实现迭代式自动化漏洞修复

LLM4CVE: Enabling Iterative Automated Vulnerability Repair with Large Language Models

Mohamad Fakih, Rahul Dharmaji, Halima Bouzidi, Gustavo Quiros Araya, Oluwatosin Ogundare, Mohammad Abdullah Al Faruque

AI总结:

本文提出LLM4CVE迭代流水线,利用大语言模型自动修复真实代码漏洞,并在多种先进LLM上验证其修复质量与代码相似度。

摘要:

即使在AI驱动的代码助手、先进静态分析工具以及广泛测试框架被采用的时代,软件漏洞仍然无处不在。显然,我们不仅必须预防这些缺陷,还必须快速、高效地消除它们。然而,人工代码干预缓慢、成本高昂,并且往往会引入更多安全漏洞,在遗留代码库中尤其如此。高度先进的大语言模型(LLM)的出现,为自动修补许多软件缺陷提供了可能。我们提出LLM4CVE,这是一种基于LLM的迭代流水线,能够以高准确率稳健地修复真实世界代码中的易受攻击函数。我们使用GPT-3.5、GPT-4o、Llama 3 8B和Llama 3 70B等最先进LLM评估该流水线。借助Llama 3 70B,我们取得了8.51/10的人工验证质量评分,并使与真实代码的相似度提升20%。为推动基于LLM的漏洞修复领域的进一步研究,我们在网站上发布了测试装置、微调权重和实验数据。

英文摘要:

Software vulnerabilities continue to be ubiquitous, even in the era of AI-powered code assistants, advanced static analysis tools, and the adoption of extensive testing frameworks. It has become apparent that we must not simply prevent these bugs, but also eliminate them in a quick, efficient manner. Yet, human code intervention is slow, costly, and can often lead to further security vulnerabilities, especially in legacy codebases. The advent of highly advanced Large Language Models (LLM) has opened up the possibility for many software defects to be patched automatically. We propose LLM4CVE an LLM-based iterative pipeline that robustly fixes vulnerable functions in real-world code with high accuracy. We examine our pipeline with State-of-the-Art LLMs, such as GPT-3.5, GPT-4o, Llama 38B, and Llama 3 70B. We achieve a human-verified quality score of 8.51/10 and an increase in groundtruth code similarity of 20% with Llama 3 70B. To promote further research in the area of LLM-based vulnerability repair, we publish our testing apparatus, fine-tuned weights, and experimental data on our website

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

↑