Secure applications implement software protections against side-channel and physical attacks. Such protections are meaningful at machine code or micro-architectural level, but they typically do not carry observable semantics at source level. To prevent optimizing compilers from altering the protection, security engineers embed input/output side-effects into the protection. These side-effects are error-prone and compiler-dependent, and the current practice involves analyzing the generated machine code to make sure security or privacy properties are still enforced. Vu et al. recently demonstrated how to automate the insertion of volatile side-effects in a compiler [52], but these may be too expensive in fined-grained protections such as control-flow integrity. We introduce observations of the program state that are intrinsic to the correct execution of security protections, along with means to specify and preserve observations across the compilation flow. Such observations complement the traditional input/output-preservation contract of compilers. We show how to guarantee their preservation without modifying compilation passes and with as little performance impact as possible. We validate our approach on a range of benchmarks, expressing the secure compilation of these applications in terms of observations to be made at specific program points.
翻译:安全应用实施软件保护,防止侧通道和物理攻击。这种保护在机器代码或微构图层面是有意义的,但通常不会在源头一级带有可见的语义。为了防止优化编译者改变保护,安全工程师将输入/输出的副作用嵌入保护中。这些副作用容易出错,并取决于编译者,目前的做法是分析生成的机器代码,以确保安全或隐私特性仍然得到执行。Vu等人最近演示了如何将挥发性的副作用自动插入编译器 [52],但这些保护在控制流完整性等精细微的保护中可能过于昂贵。我们介绍对方案状态的观察,这是正确执行安全保护的固有要素,同时采用在编译者整个编译流程中指定和保留观察的手段。这种观察是对传统的输入/输出-保护合同的补充。我们展示了如何保证保存这些代码,而不修改编译通行证,并尽可能减少工作影响。我们验证了在一系列基准上的做法,在具体方案观察点上表示这些应用的安全性汇编。