arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2110.01439cs.PLcs.CR
收藏

SecurePtrs:用数据流反向翻译和话轮转换模拟证明安全编译

SecurePtrs: Proving Secure Compilation with Data-Flow Back-Translation and Turn-Taking Simulation

Akram El-Korashy, Roberto Blanco, Jérémy Thibault, Adrien Durier, Deepak Garg, Catalin Hritcu

摘要:

证明部分程序的安全编译通常需要将针对编译程序的攻击反向转换为针对源程序的攻击。为了证明反向翻译,可以从语法上将目标攻击者翻译为源攻击者--即,语法指导的反向翻译--或者表明目标攻击者的交互痕迹也可以由源攻击者发出--即,跟踪导向的反向翻译。当目标攻击者可能使用源语言不能直接表示的非结构化控制流时,语法导向的反向翻译是不合适的。跟踪导向的反向翻译适用于这种语法上的差异,因为只有目标攻击者的外部交互必须在源中被模仿,而不是其内部控制流。然而,当通过不可伪造的指针共享内存时,只显示外部交互是不方便的,因为关于隐藏在私有内存中的共享指针的信息不存在于跟踪中。这使得先前的证明变得不必要的复杂,因为生成的攻击者必须隐藏所有可到达的指针。在这项工作中,我们引入了更多的信息 * 数据流跟踪 *,结合最好的语法和跟踪导向的反向翻译在一个更简单的技术,处理语法不相似性和内存共享,并证明是正确的Coq。此外,我们开发了一种新的轮取模拟关系,并使用它来证明重组引理,这是重用编译器的正确性在这样的安全编译证明的关键。我们是第一个机械化这样的重组引理中存在的内存共享。我们使用这两个创新的安全编译证明代码生成编译器之间传递的源语言与结构化控制流和目标语言与非结构化控制流,都与安全指针和组件。

英文摘要:

Proving secure compilation of partial programs typically requires back-translating an attack against the compiled program to an attack against the source program. To prove back-translation, one can syntactically translate the target attacker to a source one -- i.e., syntax-directed back-translation -- or show that the interaction traces of the target attacker can also be emitted by source attackers -- i.e., trace-directed back-translation. Syntax-directed back-translation is not suitable when the target attacker may use unstructured control flow that the source language cannot directly represent. Trace-directed back-translation works with such syntactic dissimilarity because only the external interactions of the target attacker have to be mimicked in the source, not its internal control flow. Revealing only external interactions is, however, inconvenient when sharing memory via unforgeable pointers, since information about shared pointers stashed in private memory is not present on the trace. This made prior proofs unnecessarily complex, since the generated attacker had to instead stash all reachable pointers. In this work, we introduce more informative *data-flow traces*, combining the best of syntax- and trace-directed back-translation in a simpler technique that handles both syntactic dissimilarity and memory sharing well, and that is proved correct in Coq. Additionally, we develop a novel *turn-taking simulation* relation and use it to prove a recomposition lemma, which is key to reusing compiler correctness in such secure compilation proofs. We are the first to mechanize such a recomposition lemma in the presence of memory sharing. We use these two innovations in a secure compilation proof for a code generation compiler pass between a source language with structured control flow and a target language with unstructured control flow, both with safe pointers and components.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑