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

错误考试中的高分:机器学习漏洞检测基准测试研究

Top Score on the Wrong Exam: On Benchmarking in Machine Learning for Vulnerability Detection

MPI-SP Bochum(波恩大学马克斯·普朗克研究所)

Niklas Risse, Jing Liu, Marcel Böhme

AI总结:

本研究揭示机器学习漏洞检测领域主流基准测试存在缺陷:多数函数级分类任务在缺乏调用上下文时无法判定,高分源于虚假相关性,并提出改进基准测试方法以评估真实能力。

摘要:

根据我们对机器学习漏洞检测(ML4VD)领域的调查,过去五年发表的论文中,每10篇就有9篇将ML4VD定义为一个函数级二元分类问题:给定一个函数,它是否包含安全缺陷?作为安全研究人员,在面临决定给定函数是否使程序易受攻击时,我们通常首先希望了解调用该函数的上下文。在本文中,我们研究了在没有进一步上下文的情况下,这种决策在多大程度上能够真正做出,并研究了最流行的ML4VD数据集中的易受攻击和非易受攻击函数。我们将“易受攻击”函数定义为参与实际安全缺陷补丁并被确认导致程序漏洞的函数,否则为“非易受攻击”。我们发现,在几乎所有情况下,没有进一步上下文就无法做出此决策。易受攻击函数通常仅因为存在相应的漏洞诱导调用上下文而变得易受攻击,而非易受攻击函数在存在相应上下文时往往也会变得易受攻击。但为什么ML4VD技术能取得高分,尽管这些样本中明显缺乏足够信息?虚假相关性:我们发现,即使仅使用词频信息也能获得高分。这表明这些数据集可以被利用来获得高分,而无需实际检测任何安全漏洞。我们得出结论,ML4VD的主流问题定义是不明确的,并质疑这一日益增长的研究领域的内部有效性。建设性地,我们呼吁采用更有效的基准测试方法来评估ML4VD的真实能力,提出替代的问题定义,并探讨对机器学习和编程分析研究评估的更广泛影响。

英文摘要:

According to our survey of machine learning for vulnerability detection (ML4VD), 9 in every 10 papers published in the past five years define ML4VD as a function-level binary classification problem: Given a function, does it contain a security flaw? From our experience as security researchers, faced with deciding whether a given function makes the program vulnerable to attacks, we would often first want to understand the context in which this function is called. In this paper, we study how often this decision can really be made without further context and study both vulnerable and non-vulnerable functions in the most popular ML4VD datasets. We call a function "vulnerable" if it was involved in a patch of an actual security flaw and confirmed to cause the program's vulnerability. It is "non-vulnerable" otherwise. We find that in almost all cases this decision cannot be made without further context. Vulnerable functions are often vulnerable only because a corresponding vulnerability-inducing calling context exists while non-vulnerable functions would often be vulnerable if a corresponding context existed. But why do ML4VD techniques achieve high scores even though there is demonstrably not enough information in these samples? Spurious correlations: We find that high scores can be achieved even when only word counts are available. This shows that these datasets can be exploited to achieve high scores without actually detecting any security vulnerabilities. We conclude that the prevailing problem statement of ML4VD is ill-defined and call into question the internal validity of this growing body of work. Constructively, we call for more effective benchmarking methodologies to evaluate the true capabilities of ML4VD, propose alternative problem statements, and examine broader implications for the evaluation of machine learning and programming analysis research.

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

↑