LLM-Enhanced Static Analysis for Precise Identification of Vulnerable OSS Versions
<|reference_start|>LLM-Enhanced Static Analysis for Precise Identification of Vulnerable OSS Versions: Open-source software (OSS) has experienced a surge in popularity, attributed to its collaborative development model and cost-effective nature. However, the adoption of specific software versions in development projects may introduce security risks when these versions bring along vulnerabilities. Current methods of identifying vulnerable versions typically analyze and trace the code involved in vulnerability patches using static analysis with pre-defined rules. They then use syntactic-level code clone detection to identify the vulnerable versions. These methods are hindered by imprecisions due to (1) the inclusion of vulnerability-irrelevant code in the analysis and (2) the inadequacy of syntactic-level code clone detection. This paper presents Vercation, an approach designed to identify vulnerable versions of OSS written in C/C++. Vercation combines program slicing with a Large Language Model (LLM) to identify vulnerability-relevant code from vulnerability patches. It then backtraces historical commits to gather previous modifications of identified vulnerability-relevant code. We propose semantic-level code clone detection to compare the differences between pre-modification and post-modification code, thereby locating the vulnerability-introducing commit (vic) and enabling to identify the vulnerable versions between the patch commit and the vic. We curate a dataset linking 74 OSS vulnerabilities and 1013 versions to evaluate Vercation. On this dataset, our approach achieves the F1 score of 92.4%, outperforming current state-of-the-art methods. More importantly, Vercation detected 134 incorrect vulnerable OSS versions in NVD reports.<|reference_end|>
@article{cheng2024llm-enhanced,
    title={LLM-Enhanced Static Analysis for Precise Identification of Vulnerable
  OSS Versions},
    author={Yiran Cheng, Lwin Khin Shar, Ting Zhang, Shouguo Yang, Chaopeng Dong,
  David Lo, Shichao Lv, Zhiqiang Shi and Limin Sun},
    journal={arXiv preprint arXiv:2408.07321},
    year={2024},
    archivePrefix={arXiv},
    eprint={2408.07321},
    primaryClass={cs.SE cs.CR}
}