arXiv:2510.26086cs.LG2025-10被引 1

用大模型对比分析法,精准定位漏洞引入的代码提交。

LLMBisect: Breaking Barriers in Bug Bisection with A Comparative Analysis Pipeline

  • 构建多阶段流程,结合代码与提交信息进行上下文对比
  • 准确率比现有最优方法提升超38%,比基础大模型方法高60%
  • 适合安全研究者和自动化漏洞分析工具开发者

漏洞定位是重要的安全任务,旨在确定受漏洞影响的软件版本范围,即识别引入漏洞的提交(BIC)。传统基于补丁的方法面临多重障碍:假设引入漏洞的提交与补丁修改同一函数,这并不总是成立;仅依赖代码变更,忽略提交消息中丰富的漏洞相关信息;依赖简单启发式规则(如假设BIC初始化了补丁中删除的行),缺乏对漏洞逻辑的深入分析。本文观察到大型语言模型(LLM)具备理解代码与文本信息的潜力,可突破现有方法局限。我们提出一种综合性的多阶段管道,利用大模型实现:(1) 充分利用补丁信息,(2) 在上下文中对比多个候选提交,(3) 通过一系列逐步筛选步骤缩小候选范围。实验表明,本方法在准确率上显著优于当前最优方案,提升超过38%。结果还证实,该多阶段流程至关重要,相较基础的大模型方法准确率提高60%。

原文摘要 · Abstract (English)

Bug bisection has been an important security task that aims to understand the range of software versions impacted by a bug, i.e., identifying the commit that introduced the bug. However, traditional patch-based bisection methods are faced with several significant barriers: For example, they assume that the bug-inducing commit (BIC) and the patch commit modify the same functions, which is not always true. They often rely solely on code changes, while the commit message frequently contains a wealth of vulnerability-related information. They are also based on simple heuristics (e.g., assuming the BIC initializes lines deleted in the patch) and lack any logical analysis of the vulnerability. In this paper, we make the observation that Large Language Models (LLMs) are well-positioned to break the barriers of existing solutions, e.g., comprehend both textual data and code in patches and commits. Unlike previous BIC identification approaches, which yield poor results, we propose a comprehensive multi-stage pipeline that leverages LLMs to: (1) fully utilize patch information, (2) compare multiple candidate commits in context, and (3) progressively narrow down the candidates through a series of down-selection steps. In our evaluation, we demonstrate that our approach achieves significantly better accuracy than the state-of-the-art solution by more than 38\%. Our results further confirm that the comprehensive multi-stage pipeline is essential, as it improves accuracy by 60\% over a baseline LLM-based bisection method.

漏洞定位大模型代码分析安全研究

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。