一句话:提出 LLift,将静态分析与 LLM 结合,用于检测 Linux 内核中的未初始化使用缺陷。
静态分析在大型复杂代码库中精度不足,而大语言模型(LLM)为解决这一难题提供了新思路。本文提出 LLift,一种将静态分析与 LLM 协同的框架,聚焦 Linux 内核中的未初始化使用(UBI)缺陷。作者基于 Linux 变量使用约定,通过 post-constraint guidance 增强路径分析,并设计系统化流程以应对缺陷特定建模、超大代码库和 LLM 不可预测性等挑战。真实评估在主流 Linux 内核中发现了四个此前未知的 UBI 缺陷,并获 Linux 社区确认,表明静态分析与 LLM 结合具有实际潜力。
While static analysis is instrumental in uncovering software bugs, its precision in analyzing large and intricate codebases remains challenging. The emerging prowess of Large Language Models (LLMs) offers a promising avenue to address these complexities. In this paper, we present LLift, a pioneering framework that synergizes static analysis and LLMs, with a spotlight on identifying use-before-initialization (UBI) bugs within the Linux kernel. Drawing from our insights into variable usage conventions in Linux, we enhance path analysis using post-constraint guidance. This approach, combined with our methodically crafted procedures, empowers LLift to adeptly handle the challenges of bug-specific modeling, extensive codebases, and the unpredictable nature of LLMs. Our real-world evaluations identified four previously undiscovered UBI bugs in the mainstream Linux kernel, which the Linux community has acknowledged. This study reaffirms the potential of marrying static analysis with LLMs, setting a compelling direction for future research in this area.
@article{paperbot2534,
title = {Enhancing Static Analysis for Practical Bug Detection: An LLM-Integrated Approach},
author = {Haonan Li and Yu Hao and Yizhuo Zhai and Zhiyun Qian},
journal = {Proceedings of the ACM on Programming Languages},
volume = {8},
number = {OOPSLA1},
year = {2024},
doi = {10.1145/3649828}
}