paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Lares: LLM-driven Code Slice Semantic Search for Patch Presence Testing

Lares:面向补丁存在性测试的LLM驱动代码切片语义搜索
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 5/10 · 论文将 LLM 与 SMT 结合用于代码切片语义搜索和二进制补丁存在性测试,属于 AI→PL 中利用 LLM 改进程序分析/形式化推理的交叉,且问题驱动、有跨编译器和优化级别的评测。但其应用场景是安全与二进制补丁检测,不涉及用户核心关注的 ML/Agentic 程序静态分析、浮点程序分析或贝叶斯程序分析,因此匹配度中等。引用 1 inbox
Siyuan Li, Yaowen Zheng, Hong Li, Jingdong Guo, Chaopeng Dong, Chunpeng Yan, Weijie Wang, Yimo Ren, Limin Sun, Hongsong Zhu
crossref: 2026-09-12

AI 速览

一句话:提出Lares,用LLM与SMT从补丁源码向目标二进制伪代码做代码切片语义搜索,实现免编译的补丁存在性测试。

在现代软件生态中,代码复用使1-day漏洞风险突出;仅识别目标二进制中的脆弱函数不足,还需判断其是否已被修补。现有补丁存在性测试方法可用性和准确性有限:常依赖编译过程提取特征,需大量人工且对部分软件失效,也难以区分补丁修改与编译差异。为此,作者提出Lares,其核心为代码切片语义搜索:直接从补丁源码提取特征,并在目标二进制伪代码中寻找语义等价的代码切片;通过免编译提升可用性,并利用大语言模型进行代码分析、SMT求解器进行逻辑推理以提高准确性。实验表明,Lares在精确率、召回率和可用性上更优,且首次跨优化级别、体系结构和编译器评估补丁存在性测试。

问题
如何准确、可扩展地判断目标二进制中的脆弱函数是否已被修补,同时避免依赖编译过程并区分补丁修改与编译差异。
方法
Lares 提出 Code Slice Semantic Search,从补丁源码提取特征并在目标二进制伪代码中搜索语义等价切片,结合 LLM 代码分析与 SMT 逻辑推理,无需编译。
评估
在多个数据集上评估精确率、召回率和可用性,并首次跨优化级别、体系结构和编译器进行补丁存在性测试对比。
原文摘要(Abstract)

In modern software ecosystems, 1-day vulnerabilities pose significant security risks due to extensive code reuse. Identifying vulnerable functions in target binaries alone is insufficient; it is also crucial to determine whether these functions have been patched. Existing methods, however, suffer from limited usability and accuracy. They often depend on the compilation process to extract features, requiring substantial manual effort and failing for certain software. Moreover, they cannot reliably differentiate between code changes caused by patches or compilation variations.To overcome these limitations, we propose Lares, a scalable and accurate method for patch presence testing. Lares introduces Code Slice Semantic Search, which directly extracts features from the patch source code and identifies semantically equivalent code slices in the pseudocode of the target binary. By eliminating the need for the compilation process, Lares improves usability, while leveraging large language models (LLMs) for code analysis and SMT solvers for logical reasoning to enhance accuracy. Experimental results show that Lares achieves superior precision, recall, and usability. Furthermore, it is the first work to evaluate patch presence testing across optimization levels, architectures, and compilers. The datasets and source code used in this article are available at https://github.com/Siyuan-Li201/Lares.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9340,
  title = {Lares: LLM-driven Code Slice Semantic Search for Patch Presence Testing},
  author = {Siyuan Li and Yaowen Zheng and Hong Li and Jingdong Guo and Chaopeng Dong and Chunpeng Yan and Weijie Wang and Yimo Ren and Limin Sun and Hongsong Zhu},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00081}
}