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.
How Wrong Am I? - Studying Adversarial Examples and their Impact on Uncertainty in Gaussian Process Machine Learning Models
机器学习模型容易受到对抗性样本的影响:对输入样本的微小扰动,故意造成错误分类。目前针对对抗性示例的防御,特别是深度神经网络(DNN),主要来自经验发展,其安全保证通常只能追溯性地证明。因此,许多防御依赖于隐藏的假设,这些假设随后被越来越复杂的攻击所颠覆。这并不奇怪:众所周知,深度学习缺乏一个全面的数学框架来提供有意义的保证。在本文中,我们利用高斯过程来研究贝叶斯推理框架中的对抗性示例。在不同的模型和数据集中,我们发现偏差水平的不确定性反映了最先进的攻击(包括对高斯过程的新型白盒攻击)引入到良性样本中的扰动。我们的实验表明,即使是未优化的不确定性阈值在许多情况下也会拒绝对抗性示例。备注:在arXiv:1812.02606(The limitations of model uncertainty in adversarial settings)中完成的修改攻击可以打破模型不确定性。
Smart Contracts Claimed Vulnerable by the CVE Database, with Labels and Source Locations
Institute of Computer Engineering, Informatics, TU Wien(TU Wien 计算机工程与信息学研究所);Division of Theoretical Computer ScienceKTH Royal Institute of Technology(KTH皇家理工学院理论计算机科学系);Institute of Logic and Computation, Informatics, TU Wien(TU Wien 逻辑与计算信息学研究所)
Out of Distribution, Out of Luck: How Well Can LLMs Trained on Vulnerability Datasets Detect Top 25 CWE Weaknesses?
Singapore Management University(新加坡管理大学);Monash University(蒙纳士大学);Chinese University of Hong Kong(香港中文大学);University of Groningen(格罗宁根大学);Wuhan University(武汉大学);GovTech(政府科技局)
LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoning
Nanyang Technological University, Singapore(南洋理工大学);The Hong Kong University of Science(香港科学与技术大学);MetaTrust Labs(MetaTrust实验室);Singapore Management University, Singapore(新加坡管理学院);University of Oregon, Eugene, OR, USA(俄勒冈大学)