论文标题

用于推理安全漏洞的投机执行的抽象语义

An abstract semantics of speculative execution for reasoning about security vulnerabilities

论文作者

Colvin, Robert J., Winter, Kirsten

论文摘要

由于现代微体系特征(例如排序执行)的复杂性,有关软件正确性和安全性的推理变得越来越困难。一类称为“幽灵”的安全漏洞,该漏洞利用了推测性,额外执行的副作用,此后引起了很多关注。在本文中,我们将投机性执行及其副作用进行形式化,目的是允许在程序级别抽象地对投机进行推理,从而限制了对处理器特定或低级语义的暴露。为此,我们在编程语言中明确地对投机性执行进行了编码,而不仅仅是在操作语义中;结果,通过重新定义有条件语句的含义,并引入新颖的语言构造,以建模替代分支的瞬态执行来捕获投机执行的效果。我们在系统的全局状态中添加了一个抽象的缓存,并得出了由于投机载荷而导致缓存副作用的一些一般完善规则。该扩展的基础是基于指令级并行性的语义模型。这些规则是在模拟工具中编码的,我们用它来分析幽灵攻击和脆弱的代码片段的抽象规范。

Reasoning about correctness and security of software is increasingly difficult due to the complexity of modern microarchitectural features such as out-of-order execution. A class of security vulnerabilities termed Spectre that exploits side effects of speculative, out-of-order execution was announced in 2018 and has since drawn much attention. In this paper we formalise speculative execution and its side effects with the intention of allowing speculation to be reasoned about abstractly at the program level, limiting the exposure to processor-specific or low-level semantics. To this end we encode and expose speculative execution explicitly in the programming language, rather than solely in the operational semantics; as a result the effects of speculative execution are captured by redefining the meaning of a conditional statement, and introducing novel language constructs that model transient execution of an alternative branch. We add an abstract cache to the global state of the system, and derive some general refinement rules that expose cache side effects due to speculative loads. Underlying this extension is a semantic model that is based on instruction-level parallelism. The rules are encoded in a simulation tool, which we use to analyse an abstract specification of a Spectre attack and vulnerable code fragments.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源