一句话:提出 SnapVuln:用漏洞特定的过程间切片捕获完整精确的漏洞语义,再以带注意力的门控图神经网络学习,提升漏洞检测性能。
基于学习的漏洞检测方法通过学习代码表示已取得可观效果,但其代码表示仍难以完整、精确地刻画漏洞语义,导致检测能力受限。针对这一不足,本文提出 SnapVuln:首先针对不同类型的漏洞设计多种漏洞特定的过程间切片算法,从程序中抽取与漏洞语义相关的跨过程代码片段,以获得更完整、更精确的漏洞语义;随后采用带注意力机制的门控图神经网络(GGNN)在切片所得的图结构上学习漏洞语义表示并完成检测。作者在两个公开数据集上与当前最优的基于学习方法进行对比,实验表明 SnapVuln 的性能优于这些方法;进一步的消融实验证明,SnapVuln 所捕获漏洞语义的完整性与精确性对性能提升有实质贡献。
Learning-based approaches that learn code representations for software vulnerability detection have been proven to produce inspiring results. However, they still fail to capture complete and precise vulnerability semantics for code representations. To address the limitations, in this work, we propose a learning-based approach namely SnapVuln, which first utilizes multiple vulnerability-specific inter-procedural slicing algorithms to capture vulnerability semantics of various types and then employs a Gated Graph Neural Network (GGNN) with an attention mechanism to learn vulnerability semantics. We compare SnapVuln with state-of-the-art learning-based approaches on two public datasets, and confirm that SnapVuln outperforms them. We further perform an ablation study and demonstrate that the completeness and precision of vulnerability semantics captured by SnapVuln contribute to the performance improvement.
@inproceedings{WuLXLS023,
title = {Learning Program Semantics for Vulnerability Detection via Vulnerability-Specific Inter-procedural Slicing},
author = {Bozhi Wu and Shangqing Liu and Yang Xiao and Zhiming Li and Jun Sun and Shang-Wei Lin},
booktitle = {FSE},
year = {2023},
doi = {10.1145/3611643.3616351}
}