Lares: LLM-driven Code Slice Semantic Search for Patch Presence Testing
Siyuan Li, Yaowen Zheng, Hong Li, Jingdong Guo, Chaopeng Dong, Chunpeng Yan, Weijie Wang, Yimo Ren, Limin Sun, Hongsong Zhu

TL;DR
Lares is a novel method that uses large language models and semantic code analysis to accurately detect whether patches are present in binaries, improving usability and reliability over existing techniques.
Contribution
Lares introduces Code Slice Semantic Search, enabling patch presence testing directly from source code features without relying on compilation, and evaluates across diverse software configurations.
Findings
Achieves higher precision and recall than existing methods.
Works effectively across different architectures, optimization levels, and compilers.
Eliminates the need for compilation process, enhancing usability.
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Software Engineering Research · Advanced Malware Detection Techniques
