LineVul
Michael C. Fu, Chakkrit Kla Tantithamthavorn · International Conference on Mining Software Repositories (MSR) · 2022
Software vulnerabilities are prevalent in software systems, causing a variety of problems including deadlock, information loss, or system failures. Thus, early predictions of software vulnerabilities are critically important in safety-critical software systems. Various ML/DL-based approaches have been proposed to predict vulnerabilities at the file/function/method level. Recently, IVDetect (a graph-based neural network) is proposed to predict vulnerabilities at the function level. Yet, the IVDetect approach is still inaccurate and coarse-grained. In this paper, we propose LineVul, a Transformer-based line-level vulnerability prediction approach in order to address several limitations of the state-of-the-art IVDetect approach. Through an empirical evaluation of a large-scale real-world dataset with 188k+ C/C++ functions, we show that LineVul achieves (1) 160%-379% higher F1-measure for function-level predictions; (2) 12%-25% higher Top-10 Accuracy for line-level predictions; and (3) 29%-53% less [email protected]%Recall than the baseline approaches, highlighting the significant advancement of LineVul towards more accurate and more cost-effective line-level vulnerability predictions. Our additional analysis also shows that our LineVul is also very accurate (75%-100%) for predicting vulnerable functions affected by the Top-25 most dangerous CWEs, highlighting the potential impact of our LineVul in real-world usage scenarios.
Cited by 384 works. doi:10.1145/3524842.3528452
Authors
References
- "Why Should I Trust You?"
- Transformers: State-of-the-Art Natural Language Processing
- Proceedings of the 21st International Conference on Neural Information Processing Systems
- CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Attention is not not Explanation
- Proceedings of the 3rd International Conference on Neural Information Processing Systems
- Automated Vulnerability Detection in Source Code Using Deep Representation Learning
- Are automated debugging techniques actually helping programmers?
- A C/C++ Code Vulnerability Dataset with Code Changes and CVE Summaries
- Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies