相似但修补的代码有害 -- 相似但修补的代码对重复漏洞检测的影响以及如何去除它们
Similar but Patched Code Considered Harmful -- The Impact of Similar but Patched Code on Recurring Vulnerability Detection and How to Remove Them
AI总结:
本文提出FVF框架,通过分析代码变更历史来识别和过滤相似但已修补的代码,减少漏洞检测中的误报,构建了真实世界SBP数据集并验证了现有深度学习方法的无效性。
摘要:
识别重复漏洞对于确保软件安全至关重要。基于克隆的技术虽然被广泛使用,但往往会产生许多误报,因为存在相似但已修补(SBP)的代码,这种代码与漏洞代码相似,但由于已被修补而不再具有漏洞。尽管SBP代码对现有方法的有效性构成重大挑战,但尚未得到充分研究。本文提出了一种编程语言无关的框架,Fixed Vulnerability Filter(FVF),用于识别和过滤漏洞检测中的SBP实例。与现有研究利用函数签名不同,我们的方法分析代码变更历史,以精确定位SBP并相应减少误报。在实际场景下的评估证实了我们方法的有效性和精确性。值得注意的是,FVF在四个漏洞检测工具(即ReDeBug、VUDDY、MVP和一个基础哈希方法)中识别并过滤了65.1%的误报,且未产生假阳性。我们进一步将FVF应用于1,081个真实世界软件项目,并构建了一个包含6,827个SBP函数的真实世界SBP数据集。由于SBP的性质,该数据集可以作为严格基准,测试漏洞检测方法在区分真实漏洞和SBP方面的敏感性。使用该数据集,我们展示了四种最先进的深度学习基于漏洞检测方法的无效性。我们的数据集可以帮助开发人员对漏洞检测方法进行更现实的评估,并为进一步探索真实世界中的SBP场景铺平道路。
英文摘要:
Identifying recurring vulnerabilities is crucial for ensuring software security. Clone-based techniques, while widely used, often generate many false alarms due to the existence of similar but patched (SBP) code, which is similar to vulnerable code but is not vulnerable due to having been patched. Although the SBP code poses a great challenge to the effectiveness of existing approaches, it has not yet been well explored. In this paper, we propose a programming language agnostic framework, Fixed Vulnerability Filter (FVF), to identify and filter such SBP instances in vulnerability detection. Different from existing studies that leverage function signatures, our approach analyzes code change histories to precisely pinpoint SBPs and consequently reduce false alarms. Evaluation under practical scenarios confirms the effectiveness and precision of our approach. Remarkably, FVF identifies and filters 65.1% of false alarms from four vulnerability detection tools (i.e., ReDeBug, VUDDY, MVP, and an elementary hash-based approach) without yielding false positives. We further apply FVF to 1,081 real-world software projects and construct a real-world SBP dataset containing 6,827 SBP functions. Due to the SBP nature, the dataset can act as a strict benchmark to test the sensitivity of the vulnerability detection approach in distinguishing real vulnerabilities and SBPs. Using this dataset, we demonstrate the ineffectiveness of four state-of-the-art deep learning-based vulnerability detection approaches. Our dataset can help developers make a more realistic evaluation of vulnerability detection approaches and also paves the way for further exploration of real-world SBP scenarios.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。