paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Precise Compositional Buffer Overflow Detection via Heap Disjointness

基于堆不相交性的精确组合式缓冲区溢出检测
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 3/10 · 该论文属于静态分析与抽象解释,具备理论形式化、工程实现和工业落地案例,与用户 PL 背景有基础关联;但它不涉及 LLM/Agentic 程序、用 AI 改进静态分析、浮点程序分析或贝叶斯程序分析,因此与当前核心研究方向匹配度较低。引用 1 inbox
Yiyuan Guo, Peisen Yao, Charles Zhang
crossref: 2026-09-12

AI 速览

一句话:引入堆不相交假设,使符号堆位置可强更新,提升缓冲区溢出静态分析的精度与可扩展性。

缓冲区溢出静态分析需同时推理堆可达性与数值关系,二者相互依赖;符号堆位置可能别名大量位置,导致堆状态析取难以精确处理,现有方法在精度与效率间取舍。本文提出堆不相交性假设:收缩程序状态空间,使内存访问涉及的符号位置互不相交。该性质允许在符号堆位置执行强更新,将数值信息融入堆推理,并支持生成紧凑精确的函数摘要以进行组合式分析。作者在静态检测器 Cod 中实现该思想,对 PHP、QEMU 等百万行级真实项目分析,发现 29 个缓冲区溢出缺陷,误报率 37%,且可在四小时内完成分析。

问题
现有缓冲区溢出静态分析难以在百万行级代码上兼具可扩展性与低误报率,核心难点是堆可达性与数值关系相互依赖,且符号堆位置的别名会导致堆状态析取难以精确推理。
方法
引入堆不相交性假设,收缩状态空间使内存访问涉及的符号位置互不相交,从而支持符号堆位置的强更新,并据此设计组合式分析,高效生成和复用紧凑精确的函数摘要。
评估
在静态检测器 Cod 中实现,并在 PHP、QEMU 等真实大型软件上评估:发现 29 个缓冲区溢出缺陷,误报率 37%,百万行级项目可在四小时内完成分析。
原文摘要(Abstract)

Static analysis techniques for buffer overflow detection still struggle with being scalable for millions of lines of code, while being precise enough to have an acceptable false positive rate. The checking of buffer overflow necessitates reasoning about the heap reachability and numerical relations, which are mutually dependent. Existing techniques to resolve the dependency cycle either sacrifice precision or efficiency due to their limitations in reasoning about symbolic heap location, i.e., heap location with possibly symbolic numerical offsets. A symbolic heap location potentially aliases a large number of other heap locations, leading to a disjunction of heap states that is particularly challenging to reason precisely. Acknowledging the inherent difficulties in heap and numerical reasoning, we introduce a disjointness assumption into the analysis by shrinking the program state space so that all the symbolic locations involved in memory accesses are disjoint from each other. The disjointness property permits strong updates to be performed at symbolic heap locations, significantly improving the precision by incorporating numerical information in heap reasoning. Also, it aids in the design of a compositional analysis to boost scalability, where compact and precise function summaries are efficiently generated and reused. We implement the idea in the static buffer overflow detector Cod. When applying it to large, real-world software such as PHP and QEMU, we have uncovered 29 buffer overflow bugs with a false positive rate of 37%, while projects of millions of lines of code can be successfully analyzed within four hours.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8468,
  title = {Precise Compositional Buffer Overflow Detection via Heap Disjointness},
  author = {Yiyuan Guo and Peisen Yao and Charles Zhang},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3652110}
}