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

VulnLLMEval:一个用于评估大语言模型在软件漏洞检测与修复中表现的框架

VulnLLMEval: A Framework for Evaluating Large Language Models in Software Vulnerability Detection and Patching

University of North Carolina at Charlotte(北卡罗来纳大学夏洛特分校)

Arastoo Zibaeirad, Marco Vieira

AI总结:

本文提出评估大语言模型软件漏洞检测与修复能力的框架VulnLLMEval,基于Linux内核307个真实漏洞构建数据集,实验发现LLM难区分漏洞与修复代码,且生成的修复方案常过度简化需优化。

摘要:

大语言模型(LLM)在代码翻译等任务中展现出应用前景,引发了人们对其在自动化软件漏洞检测(SVD)和漏洞修复(SVP)领域潜力的研究兴趣。为推动该领域的研究,建立一个基准来评估LLM在这些任务中的优势与局限性至关重要。尽管LLM具备一定能力,但它们能否准确分析复杂漏洞并生成合适的修复方案仍存疑问。本文提出VulnLLMEval,这是一个旨在评估LLM在C语言代码中识别与修复漏洞表现的框架。我们的研究包含从Linux内核中提取的307个真实漏洞,构建了一个同时包含漏洞代码与修复后代码的精心整理的数据集。该数据集基于真实代码,为评估LLM在SVD和SVP任务中的表现提供了多样化且具代表性的测试平台,为严格评估奠定了坚实基础。我们的结果显示,LLM通常难以区分漏洞代码与修复后代码。此外,在SVP任务中,这些模型倾向于过度简化代码,生成的解决方案若不经过进一步优化可能无法直接使用。

英文摘要:

Large Language Models (LLMs) have shown promise in tasks like code translation, prompting interest in their potential for automating software vulnerability detection (SVD) and patching (SVP). To further research in this area, establishing a benchmark is essential for evaluating the strengths and limitations of LLMs in these tasks. Despite their capabilities, questions remain regarding whether LLMs can accurately analyze complex vulnerabilities and generate appropriate patches. This paper introduces VulnLLMEval, a framework designed to assess the performance of LLMs in identifying and patching vulnerabilities in C code. Our study includes 307 real-world vulnerabilities extracted from the Linux kernel, creating a well-curated dataset that includes both vulnerable and patched code. This dataset, based on real-world code, provides a diverse and representative testbed for evaluating LLM performance in SVD and SVP tasks, offering a robust foundation for rigorous assessment. Our results reveal that LLMs often struggle with distinguishing between vulnerable and patched code. Furthermore, in SVP tasks, these models tend to oversimplify the code, producing solutions that may not be directly usable without further refinement.

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

↑