Skip to main content
QUICK REVIEW

[论文解读] Robustly Safe Compilation or, Efficient, Provably Secure Compilation

Marco Patrignani, Deepak Garg|arXiv (Cornell University)|Apr 2, 2018
Security and Verification in ComputingComputer Science参考文献 79被引用 4
一句话总结

本文提出鲁棒安全编译(RSC),一种新的安全编译准则,确保在所有对抗性上下文中源代码级别的安全属性均被保留,为完全抽象编译提供更高效的替代方案。RSC 仅关注相关安全属性,避免不必要的运行时检查,从而实现更简单的证明和优化的代码生成,同时通过两种新颖的证明技术以及三种使用不同目标层保护机制的编译器实现,保持强大的安全保证。

ABSTRACT

Secure compilers generate compiled code that withstands many target-level attacks such as alteration of control flow, data leaks or memory corruption. Many existing secure compilers are proven to be fully abstract, meaning that they reflect and preserve observational equivalence. Fully abstract compilation is a strong and useful property that, in certain cases, comes at the cost of requiring expensive runtime constructs in compiled code. These constructs may have no relevance for security, but are needed to accommodate differences between the source language and the target language that fully abstract compilation necessarily regards. As an alternative to fully abstract compilation, this paper explores a different criterion for secure compilation called robustly safe compilation or RSC. Briefly, this criterion means that the compiled code preserves relevant safety properties of the source program against all adversarial contexts interacting with said program. We show that RSC can be attained easily and results in code that is more efficient than that generated by fully abstract compilers. We also develop three illustrative robustly-safe compilers and, through them, develop two different proof techniques for establishing that a compiler attains RSC. Through these, we also establish that proving RSC is simpler than proving fully abstraction.

研究动机与目标

  • 为解决完全抽象编译(FAC)的低效与复杂性问题,其强制实施安全保留属性,即使在与安全无关的抽象上亦然。
  • 提出鲁棒安全编译(RSC)作为FAC更实用且高效的替代方案,仅聚焦于相关安全属性。
  • 证明RSC的证明比FAC更简单,且对昂贵运行时构造的依赖更少。
  • 提出两种用于建立RSC的证明技术,并通过三种使用不同目标层保护机制的独立编译器进行验证。

提出的方法

  • 提出RSC作为一项准则,其中编译后的代码在所有对抗性上下文中均保留源代码级别的安全属性,排除无关抽象的影响。
  • 引入一种反向翻译机制,通过在运行时维护从掩码目标索引到原始源代码位置的映射,实现上下文敏感的差异检测。
  • 采用差异检测组件,在编译代码的关键位置插入条件检查(例如终止/发散),以检测并响应追踪差异。
  • 通过堆值的元级别结构分析,从掩码索引中提取源代码位置,用于反向翻译过程。
  • 应用两种证明技术:一种基于上下文等价性,另一种使用改进的逻辑关系以验证RSC。
  • 开发三种具有不同保护机制的编译器——控制流完整性、内存标记和受保护模块——以展示RSC的通用性。

实验结果

研究问题

  • RQ1能否定义一种安全编译准则,仅保留相关安全属性,避免因完全抽象而引入的不必要运行时开销?
  • RQ2如何以比完全抽象编译更简单的证明方式建立RSC?
  • RQ3RSC能否在多种目标层保护机制上应用,同时保持效率与正确性?
  • RQ4在代码大小与性能方面,RSC与完全抽象编译之间的实际权衡是什么?
  • RQ5RSC的证明技术能否推广至不同的语言设计与编译目标?

主要发现

  • RSC 实现了可证明的安全编译,与完全抽象编译相比显著降低了运行时开销,因为它避免强制实施无关抽象(如代码大小等价性)。
  • RSC 的证明比完全抽象编译更简单,通过将其中一个 RSC 编译器转换为完全抽象版本得到验证,表明 RSC 是一种更弱但足够充分的准则。
  • 三个示例性 RSC 编译器——基于控制流完整性、内存标记和受保护模块——在对抗性上下文中成功保留了安全性,同时生成了高效代码。
  • 反向翻译机制通过运行时维护一对列表,正确地将掩码目标索引映射回原始源代码位置,实现了精确的上下文敏感差异检测。
  • 差异检测组件成功地在函数体和调用点插入上下文感知检查(如终止/发散),以检测由对抗性行为引起的追踪差异。
  • RSC 对源语言(如 C 和 LLVM)中的未定义行为具有鲁棒性,避免了可能破坏朴素 FAC 方法的陷阱。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。