论文标题
自动检测投机执行组合
Automatic Detection of Speculative Execution Combinations
论文作者
论文摘要
现代处理器采用不同的预测机制来推测各种说明。攻击者可以同时利用这些预测机制,以触发有关投机数据的泄漏。因此,关于这种投机性泄漏的合理推理需要考虑所有潜在的投机机制。不幸的是,现有的正式模型仅支持有关固定的,硬编码的投机机制的推理,而没有简单的支持将上述推理扩展到新机制。 在本文中,我们开发了一个框架,用于推理组成的投机语义,该语义因不同的机制而捕获投机,并将其作为观察者验证工具的一部分实施。我们实施了新颖的语义来猜测商店并返回说明,并将其与猜测分支机构的语义相结合。我们的框架产生了投机性语义,用于猜测通过施工安全的任何说明的组合,即,我们免费获得这些安全保证。我们在观察者中的新语义的实现让我们验证容易受到Spectre V1,Spectre V4和Specter V5脆弱性以及仅容易受其组成的新片段的现有代码库。
Modern processors employ different prediction mechanisms to speculate over different kinds of instructions. Attackers can exploit these prediction mechanisms simultaneously in order to trigger leaks about speculatively-accessed data. Thus, sound reasoning about such speculative leaks requires accounting for all potential mechanisms of speculation. Unfortunately, existing formal models only support reasoning about fixed, hard-coded mechanisms of speculation, with no simple support to extend said reasoning to new mechanisms. In this paper we develop a framework for reasoning about composed speculative semantics that capture speculation due to different mechanisms and implement it as part of the Spectector verification tool. We implement novel semantics for speculating over store and return instructions and combine them with the semantics for speculating over branches. Our framework yields speculative semantics for speculating over any combination of those instructions that are secure by construction, i.e., we obtain these security guarantees for free. The implementation of our novel semantics in Spectector let us verify existing codebases that are vulnerable to Spectre v1, Spectre v4, and Spectre v5 vulnerabilities as well as new snippets that are only vulnerable to their compositions.