[论文解读] SoK: Sanitizing for Security
本文提出了一套对 sanitizers(动态程序分析工具)的系统性分类,这些工具通过观察实际程序执行来检测安全漏洞。它评估了其在发现内存安全错误、性能开销、兼容性以及权衡方面的有效性,主张改进元数据标准、硬件支持,并在底层系统中更广泛地采用。
The C and C++ programming languages are notoriously insecure yet remain indispensable. Developers therefore resort to a multi-pronged approach to find security issues before adversaries. These include manual, static, and dynamic program analysis. Dynamic bug finding tools --- henceforth "sanitizers" --- can find bugs that elude other types of analysis because they observe the actual execution of a program, and can therefore directly observe incorrect program behavior as it happens. A vast number of sanitizers have been prototyped by academics and refined by practitioners. We provide a systematic overview of sanitizers with an emphasis on their role in finding security issues. Specifically, we taxonomize the available tools and the security vulnerabilities they cover, describe their performance and compatibility properties, and highlight various trade-offs.
研究动机与目标
- 为应对 C/C++ 系统中未定义行为和内存损坏普遍存在所带来的日益增长的有效性、精确性和可部署性安全测试需求。
- 明确区分 sanitizers 与漏洞利用缓解机制之间的差异,强调 sanitizers 的目标是漏洞检测而非运行时攻击防护。
- 识别 sanitizers 部署中的关键挑战,包括性能开销、误报以及与底层软件的有限兼容性。
- 通过分析现有工具、其对安全漏洞的覆盖范围及其设计权衡,为未来的研究与工程工作提供指导。
提出的方法
- 对现有 sanitizers 进行全面调查与分类,按漏洞类型、检测机制和部署上下文进行分类。
- 基于实证数据和实现细节,分析主要 sanitizers(包括 AddressSanitizer (ASan)、MemorySanitizer (MSan) 等)的性能与兼容性特征。
- 评估精度、性能与误报容忍度之间的权衡,尤其与 CFI 和 DEP 等漏洞利用缓解机制进行对比。
- 提出设计改进,例如统一的元数据存储方案,以支持多 sanitizers 组合使用并减少开销。
- 调查硬件辅助方法(如 Intel MPX、ARM tagging)以降低运行时成本并提高兼容性。
- 研究将 sanitizers 扩展至底层软件(包括内核和裸机系统)的可行性与挑战。
实验结果
研究问题
- RQ1sanitizers 在漏洞检测能力、性能开销以及与标准 C/C++ 代码和库的兼容性方面有何差异?
- RQ2sanitizer 设计中精度、误报容忍度与运行时性能之间的主要权衡是什么?
- RQ3为何 AddressSanitizer (ASan) 尽管存在更精确的替代方案,却仍是使用最广泛的 sanitizer?
- RQ4同时部署多个 sanitizers 的主要障碍是什么?如何克服这些障碍?
- RQ5硬件支持如何提升 sanitizers 在生产环境和底层系统中的效率、精度与可移植性?
主要发现
- AddressSanitizer (ASan) 在部署中占主导地位,因其与标准 C/C++ 语义和部分插桩具有较强的兼容性,尽管内存开销较高。
- sanitizers 能在错误代码的确切位置检测漏洞,而漏洞利用缓解机制仅在攻击执行期间检测异常行为。
- 误报在 sanitizers 中是可以容忍的,因为它们用于部署前检测;而漏洞利用缓解机制必须零误报,以避免程序终止。
- 当前 sanitizers 无法组合使用,因为其元数据存储和指针表示方案不兼容,导致需要多次测试运行。
- 硬件支持(如 ARM 虚拟地址标记和 Intel MPX)可降低性能开销并提高兼容性,尤其对底层系统有益。
- 将 sanitizers 扩展至内核和裸机系统在技术上是可行的,但受限于高内存开销,尤其在 32 位平台更为明显。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。