arXiv:2509.22796cs.CRcs.LG2025-09被引 1

用大模型自动识别内核补丁中的严重内存漏洞,准确率达87.4%

What Do They Fix? LLM-Aided Categorization of Security Patches for Critical Memory Bugs

  • 结合提交信息与代码上下文,用双模型管道分析补丁
  • 从5140个补丁中找出111个潜在严重漏洞,90个经人工验证
  • 适合安全维护者快速发现隐蔽漏洞,尤其对无明确标识的补丁有效

开源软件是现代软件生态的基础,其中Linux内核因其广泛性和复杂性尤为关键。尽管安全补丁持续集成到主线内核,下游维护者常延迟采用,造成漏洞窗口。主要原因是难以识别涉及可利用漏洞(如越界访问、使用后释放)的安全补丁,尤其因漏洞修复被刻意隐藏、缺少或延迟分配CVE,以及近期内核CVE分配标准变更。现有细粒度补丁分类方法覆盖和准确率有限。本文提出DUALLM,一种基于大语言模型(LLM)与微调小模型的双方法流水线,结合提交标题/消息与代码上下文,实现高精度分类。实验显示其准确率达87.4%,F1得分为0.875,显著优于先前方案。在5,140个近期内核补丁中,成功识别出111个涉及越界或使用后释放漏洞的补丁,经人工验证确认90个为真阳性(多数在补丁描述中无明显指示)。此外,针对其中两个漏洞构建原型,包括一个此前未知的控制流劫持攻击,进一步验证分类正确性。

原文摘要 · Abstract (English)

Open-source software projects are foundational to modern software ecosystems, with the Linux kernel standing out as a critical exemplar due to its ubiquity and complexity. Although security patches are continuously integrated into the Linux mainline kernel, downstream maintainers often delay their adoption, creating windows of vulnerability. A key reason for this lag is the difficulty in identifying security-critical patches, particularly those addressing exploitable vulnerabilities such as out-of-bounds (OOB) accesses and use-after-free (UAF) bugs. This challenge is exacerbated by intentionally silent bug fixes, incomplete or missing CVE assignments, delays in CVE issuance, and recent changes to the CVE assignment criteria for the Linux kernel. While fine-grained patch classification approaches exist, they exhibit limitations in both coverage and accuracy. In this work, we identify previously unexplored opportunities to significantly improve fine-grained patch classification. Specifically, by leveraging cues from commit titles/messages and diffs alongside appropriate code context, we develop DUALLM, a dual-method pipeline that integrates two approaches based on a Large Language Model (LLM) and a fine-tuned small language model. DUALLM achieves 87.4% accuracy and an F1-score of 0.875, significantly outperforming prior solutions. Notably, DUALLM successfully identified 111 of 5,140 recent Linux kernel patches as addressing OOB or UAF vulnerabilities, with 90 true positives confirmed by manual verification (many do not have clear indications in patch descriptions). Moreover, we constructed proof-of-concepts for two identified bugs (one UAF and one OOB), including one developed to conduct a previously unknown control-flow hijack as further evidence of the correctness of the classification.

安全补丁大模型漏洞检测内核

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