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

跟踪相关编译器正确性与安全编译

Trace-Relating Compiler Correctness and Secure Compilation

Carmine Abate, Roberto Blanco, Stefan Ciobaca, Adrien Durier, Deepak Garg, Catalin Hritcu, Marco Patrignani, Éric Tanter, Jérémy Thibault

摘要:

在最简单的形式中,编译器正确性被定义为将编译程序的跟踪集合包含到原始程序的跟踪集合中,这相当于保留所有跟踪属性。例如,这里的跟踪收集每次执行的外部可观察事件。然而,这个定义要求源语言和目标语言的踪迹集完全相同,而当语言相距很远或观察是细粒度的时,情况就不是这样了。为了克服这个问题,我们研究了一个广义的编译器的正确性定义,它使用源和目标的痕迹从潜在的不同的集合和连接的任意关系。我们开始了解什么保证这个广义的编译器正确性定义给我们的时候,实例化与非平凡的关系跟踪。当此跟踪关系不相等时,就不再可能保持源程序的跟踪属性不变。相反,我们提供了一个通用的表征的目标跟踪属性,确保正确编译一个程序,满足给定的源属性,和双重的源跟踪属性之一,需要显示,以获得一定的目标属性的编译代码。我们表明,这种观点编译器的正确性可以自然地占未定义的行为,资源枯竭,不同的源和目标值,侧通道,和各种抽象不匹配。最后,我们表明,同样的概括也适用于许多安全编译定义,其特征在于保护编译程序免受链接的对抗代码。

英文摘要:

Compiler correctness is, in its simplest form, defined as the inclusion of the set of traces of the compiled program into the set of traces of the original program, which is equivalent to the preservation of all trace properties. Here traces collect, for instance, the externally observable events of each execution. This definition requires, however, the set of traces of the source and target languages to be exactly the same, which is not the case when the languages are far apart or when observations are fine-grained. To overcome this issue, we study a generalized compiler correctness definition, which uses source and target traces drawn from potentially different sets and connected by an arbitrary relation. We set out to understand what guarantees this generalized compiler correctness definition gives us when instantiated with a non-trivial relation on traces. When this trace relation is not equality, it is no longer possible to preserve the trace properties of the source program unchanged. Instead, we provide a generic characterization of the target trace property ensured by correctly compiling a program that satisfies a given source property, and dually, of the source trace property one is required to show in order to obtain a certain target property for the compiled code. We show that this view on compiler correctness can naturally account for undefined behavior, resource exhaustion, different source and target values, side-channels, and various abstraction mismatches. Finally, we show that the same generalization also applies to many secure compilation definitions, which characterize the protection of a compiled program against linked adversarial code.

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

↑