Skip to main content
QUICK REVIEW

[论文解读] When Good Components Go Bad: Formally Secure Compilation Despite Dynamic Compromise

Carmine Abate, Arthur Azevedo de Amorim|arXiv (Cornell University)|Feb 2, 2018
Security and Verification in Computing参考文献 83被引用 9
一句话总结

本文提出了一种针对不安全语言中安全编译的正式安全准则 RSCDC,确保组件在遭遇未定义行为后仍能免受破坏。它证明了满足 RSCDC 的编译器可保证:在目标级别上,动态被攻破的组件造成的损害不会超过在源级别上由具有相同权限的攻击者控制的组件所能造成的损害,使用机器可检查的 Coq 证明,并通过软件故障隔离或引用监控器实现实际保护。

ABSTRACT

We propose a new formal criterion for evaluating secure compilation schemes for unsafe languages, expressing end-to-end security guarantees for software components that may become compromised after encountering undefined behavior---for example, by accessing an array out of bounds. Our criterion is the first to model dynamic compromise in a system of mutually distrustful components with clearly specified privileges. It articulates how each component should be protected from all the others---in particular, from components that have encountered undefined behavior and become compromised. Each component receives secure compilation guarantees---in particular, its internal invariants are protected from compromised components---up to the point when this component itself becomes compromised, after which we assume an attacker can take complete control and use this component's privileges to attack other components. More precisely, a secure compilation chain must ensure that a dynamically compromised component cannot break the safety properties of the system at the target level any more than an arbitrary attacker-controlled component (with the same interface and privileges, but without undefined behaviors) already could at the source level. To illustrate the model, we construct a secure compilation chain for a small unsafe language with buffers, procedures, and components, targeting a simple abstract machine with built-in compartmentalization. We give a machine-checked proof in Coq that this compiler satisfies our secure compilation criterion. Finally, we show that the protection guarantees offered by the compartmentalized abstract machine can be achieved at the machine-code level using either software fault isolation or a tag-based reference monitor.

研究动机与目标

  • 形式化在可能存在相互不信任的组件且这些组件可能因未定义行为而被攻破的系统中,安全编译的安全保证。
  • 定义一个准则,确保被攻破的组件在目标级别上造成的损害不会超过其在源级别上可能造成的损害。
  • 在 Coq 中提供机器可检查的证明,形式化验证满足所提出的 RSCDC 准则的安全编译链。
  • 展示基于分段隔离的保护机制如何通过软件故障隔离或基于标签的引用监控器在机器代码级别实现。

提出的方法

  • 提出 RSCDC(Robust Safety Criteria for Dynamic Compromise,动态破坏鲁棒安全准则)作为不安全语言中安全编译的正式准则。
  • 将动态破坏建模为组件在遭遇未定义行为后完全被攻击者控制。
  • 定义一类安全属性 ZP = Safety ∩ Closed≺P,这些属性在 RSCDC 下被保留,从而确保对未定义行为扩展的鲁棒性。
  • 为一种小型不安全语言构建一个安全编译链,目标是具有内置隔离机制的分段化抽象机器。
  • 使用 Coq 中的机器可检查证明,形式化验证编译器满足 RSCDC。
  • 通过在机器代码级别使用软件故障隔离或基于标签的引用监控器,演示该保护模型的实际部署。

实验结果

研究问题

  • RQ1当组件可能因未定义行为而被攻破时,如何形式化定义编译链的安全保证?
  • RQ2安全编译链必须保留哪些属性,才能确保被攻破的组件在目标级别上造成的损害不会超过其在源级别上可能造成的损害?
  • RQ3所提出的 RSCDC 准则能否使用 Coq 等证明助手中的机器可检查证明进行形式化验证?
  • RQ4如何利用现有的低级别机制在机器代码级别强制实现分段化安全保证?
  • RQ5在 RSCDC 下被保留的属性类别是什么?如何在源语言中表达这些属性以确保目标级别的鲁棒性?

主要发现

  • RSCDC 准则被形式化定义,并被证明等价于保留类别 ZP = Safety ∩ Closed≺P 中的所有属性。
  • 为一种小型不安全语言的安全编译链在 Coq 中进行了形式化验证,以满足 RSCDC,确保动态破坏不会使攻击面扩大到超过源级别已可能的范围。
  • 本文表明,分段化安全保证可以通过在机器代码级别使用软件故障隔离或基于标签的引用监控器来实现。
  • ZP 类别包括在未定义行为扩展下仍保持封闭的安全属性,确保若某条包含未定义行为的执行轨迹被允许,则其所有扩展也均被允许。
  • 定义了一个更强的性质 S1 的变体,记为 SZ+P1,并证明其属于 ZP,表明此类性质可在 RSCDC 下实现鲁棒性。
  • 对于任意不属于 ZP 的安全属性 π,可构造一个更强的变体 πZ+P,使其属于 ZP 且尽可能宽松,从而使得基于 RSCDC 的编译可保留期望的安全保证。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。