CHOP:基于凸包优化的边界检测算法
CHOP: Bypassing Runtime Bounds Checking Through Convex Hull OPtimization
摘要:
在使用流行的程序设计语言(如C/C++)编写的程序中,不安全的内存访问是导致软件漏洞的主要原因之一。先前的内存安全检查器(如SoftBound)通过检查对数组元素的每次访问是否在相应的数组边界内来执行内存空间安全。然而,由于执行与边界检查相关联的指令的成本,它经常导致高执行时间开销。为了缓解这个问题,冗余边界检查消除技术是必要的。在本文中,我们提出了CHOP,一个凸包优化为基础的框架,绕过冗余的内存边界检查,通过配置文件引导推理。与现有的检查消除技术,是有限的静态代码分析相比,我们的解决方案利用基于模型的推理,以确定冗余的边界检查的基础上,从过去的程序执行的运行时数据。对于一个给定的功能,它快速推导和更新的知识库,包含识别冗余数组边界检查的充分条件。我们评估CHOP在现实世界的应用程序和基准测试(如SPEC)和实验结果表明,平均80.12%的动态边界检查指令可以避免,从而提高性能高达95.80%,超过SoftBound。
英文摘要:
Unsafe memory accesses in programs written using popular programming languages like C/C++ have been among the leading causes for software vulnerability. Prior memory safety checkers such as SoftBound enforce memory spatial safety by checking if every access to array elements are within the corresponding array bounds. However, it often results in high execution time overhead due to the cost of executing the instructions associated with bounds checking. To mitigate this problem, redundant bounds check elimination techniques are needed. In this paper, we propose CHOP, a Convex Hull OPtimization based framework, for bypassing redundant memory bounds checking via profile-guided inferences. In contrast to existing check elimination techniques that are limited by static code analysis, our solution leverages a model-based inference to identify redundant bounds checking based on runtime data from past program executions. For a given function, it rapidly derives and updates a knowledge base containing sufficient conditions for identifying redundant array bounds checking. We evaluate CHOP on real-world applications and benchmark (such as SPEC) and the experimental results show that on average 80.12% of dynamic bounds check instructions can be avoided, resulting in improved performance up to 95.80% over SoftBound.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。