arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.03346cs.CRcs.SE
收藏

在OSS-Fuzz中利用人工智能修复安全漏洞

Fixing Security Vulnerabilities with AI in OSS-Fuzz

Yuntong Zhang, Jiawei Wang, Dominic Berzin, Martin Mirchev, Dongge Liu, Abhishek Arya, Oliver Chang, Abhik Roychoudhury

AI总结:

本文定制AutoCodeRover智能体,利用LLM自主性和漏洞利用输入测试执行来修复OSS-Fuzz中的安全漏洞,并证明补丁质量评估需考虑动态测试执行而非代码相似性指标。

摘要:

关键的开源软件系统通过长时间的模糊测试活动进行重要验证。这些模糊测试活动通常在程序输入域上进行有偏随机搜索,以找到导致软件系统崩溃的输入。这种模糊测试通常有助于增强软件系统的安全性,因为即使是闭源软件也可能使用开源组件。因此,测试开源软件至关重要。目前,OSS-Fuzz是用于持续验证开源系统的最重要且使用最广泛的基础设施。不幸的是,尽管OSS-Fuzz已经在1000多个软件项目中识别出超过10,000个漏洞,但检测到的漏洞可能仍未修补,因为漏洞修复在实践中通常是手动的。在这项工作中,我们利用大语言模型(LLM)智能体在自主程序改进(包括错误修复)方面的最新进展。我们对著名的AutoCodeRover智能体进行了定制,用于修复安全漏洞。这是因为像AutoCodeRover这样的LLM智能体通过代码搜索根据问题描述修复错误。相反,对于安全补丁,我们依靠漏洞利用输入的测试执行来提取与修复相关的代码元素。我们对OSS-Fuzz漏洞数据的经验表明,LLM智能体的自主性对于成功的安全修补是有用的,这与Agentless等控制流固定的方法相反。更重要的是,我们的研究结果表明,我们无法通过补丁与参考代码的代码相似性(如VulMaster中使用的CodeBLEU分数)来衡量补丁的质量,因为具有高CodeBLEU分数的补丁仍然无法通过给定的漏洞利用输入。我们的研究结果表明,安全补丁的正确性需要考虑动态属性(如测试执行),而不是依赖标准的文本/代码相似性度量。

英文摘要:

Critical open source software systems undergo significant validation in the form of lengthy fuzz campaigns. The fuzz campaigns typically conduct a biased random search over the domain of program inputs, to find inputs which crash the software system. Such fuzzing is useful to enhance the security of software systems in general since even closed source software may use open source components. Hence testing open source software is of paramount importance. Currently OSS-Fuzz is the most significant and widely used infrastructure for continuous validation of open source systems. Unfortunately even though OSS-Fuzz has identified more than 10,000 vulnerabilities across 1000 or more software projects, the detected vulnerabilities may remain unpatched, as vulnerability fixing is often manual in practice. In this work, we rely on the recent progress in Large Language Model (LLM) agents for autonomous program improvement including bug fixing. We customise the well-known AutoCodeRover agent for fixing security vulnerabilities. This is because LLM agents like AutoCodeRover fix bugs from issue descriptions via code search. Instead for security patching, we rely on the test execution of the exploit input to extract code elements relevant to the fix. Our experience with OSS-Fuzz vulnerability data shows that LLM agent autonomy is useful for successful security patching, as opposed to approaches like Agentless where the control flow is fixed. More importantly our findings show that we cannot measure quality of patches by code similarity of the patch with reference codes (as in CodeBLEU scores used in VulMaster), since patches with high CodeBLEU scores still fail to pass given the given exploit input. Our findings indicate that security patch correctness needs to consider dynamic attributes like test executions as opposed to relying of standard text/code similarity metrics.

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

↑