Software is continually increasing in size and complexity, and therefore, vulnerability discovery would benefit from techniques that identify potentially vulnerable regions within large code bases, as this allows for easing vulnerability detection by reducing the search space. Previous work has explored the use of conventional code-quality and complexity metrics in highlighting suspicious sections of (source) code. Recently, researchers also proposed to reduce the vulnerability search space by studying code properties with neural networks. However, previous work generally failed in leveraging the rich metadata that is available for long-running, large code repositories.In this paper, we present an approach, named Bran, to reduce the vulnerability search space by combining conventional code metrics with fine-grained repository metadata. Bran locates code sections that are more likely to contain vulnerabilities in large code bases, potentially improving the efficiency of both manual and automatic code audits. In our experiments on four large code bases, Bran successfully highlights potentially vulnerable functions, outperforming several baselines, including state-of-art vulnerability prediction tools. We also assess Bran’s effectiveness in assisting automated testing tools. We use Bran to guide syzkaller, a known kernel fuzzer, in fuzzing a recent version of the Linux kernel. The guided fuzzer identifies 26 bugs (10 are zero-day flaws), including arbitrary writes and reads.
@inproceedings{Meng2021_Bran, title = {{Bran: Reduce Vulnerability Search Space in Large Open Source Repositories by Learning Bug Symptoms}}, author = {Meng, Dongyu and Guerriero, Michele and Machiry, Aravind and Aghakhani, Hojjat and Bose, Priyanka and Continella, Andrea and Kruegel, Christopher and Vigna, Giovanni}, booktitle = {Proceedings of the 2021 ACM Asia Conference on Computer and Communications Security}, series = {ASIA CCS '21}, month = {June}, year = {2021}, address = {New York, NY, USA}, doi = {10.1145/3433210.3453115}, isbn = {9781450382878}, keywords = {machine learning, static analysis, vulnerabilities}, location = {Virtual Event, Hong Kong}, numpages = {13}, pages = {731--743}, publisher = {Association for Computing Machinery}, url = {https://doi.org/10.1145/3433210.3453115} }