一句话:提出 SEA,用 LLM 生成间接调用与目标函数的语义摘要来过滤虚假目标,提升静态分析精度。
现代软件广泛使用间接调用以实现动态特性,这给精确构建控制流图(CFG)带来困难,并进一步影响下游静态分析任务的效果。现有各类间接调用分析器未能充分利用程序的语义信息,因而在真实场景中效果受限。本文提出语义增强分析 SEA,其核心洞察是:在常见编程实践中,间接调用与其实际被调用目标之间往往存在语义相似性,这种语义一致性可作为辅助机制,帮助静态分析技术剔除虚假目标。具体而言,SEA 利用大语言模型(LLM)从多个视角分别为间接调用点与候选目标函数生成自然语言摘要,再通过对这些摘要的分析判断二者是否适合构成调用者—被调用者对,从而得到更精确的间接调用目标集合。实验结果表明,SEA 能显著增强现有静态分析方法,为其产出更精确的目标集。
In contemporary software development, the widespread use of indirect calls to achieve dynamic features poses challenges in constructing precise control flow graphs (CFGs), which further impacts the performance of downstream static analysis tasks. To tackle this issue, various types of indirect call analyzers have been proposed. However, they do not fully leverage the semantic information of the program, limiting their effectiveness in real-world scenarios.To address these issues, this paper proposes Semantic-Enhanced Analysis (SEA), a new approach to enhance the effectiveness of indirect call analysis. Our fundamental insight is that for common programming practices, indirect calls often exhibit semantic similarity with their invoked targets. This semantic alignment serves as a supportive mechanism for static analysis techniques in filtering out false targets. Notably, contemporary large language models (LLMs) are trained on extensive code corpora, encompassing tasks such as code summarization, making them well-suited for semantic analysis. Specifically, SEA leverages LLMs to generate natural language summaries of both indirect calls and target functions from multiple perspectives. Through further analysis of these summaries, SEA can determine their suitability as caller-callee pairs. Experimental results demonstrate that SEA can significantly enhance existing static analysis methods by producing more precise target sets for indirect calls.CCS CONCEPTS•Software and its engineering → Software maintenance tools.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{ChengZWS0000C24,
title = {Semantic-Enhanced Indirect Call Analysis with Large Language Models},
author = {Baijun Cheng and Cen Zhang and Kailong Wang and Ling Shi and Yang Liu and Haoyu Wang and Yao Guo and Ding Li and Xiangqun Chen},
booktitle = {ASE},
year = {2024},
doi = {10.1145/3691620.3695016}
}