Speculative vulnerabilities such as Spectre and Meltdown expose speculative execution state that can be exploited to leak information across security domains via side-channels. Such vulnerabilities often stay undetected for a long time as we lack the tools for systematic testing of CPUs to find them. In this paper, we propose an approach to automatically detect microarchitectural information leakage in commercial black-box CPUs. We build on speculation contracts, which we employ to specify the permitted side effects of program execution on the CPU's microarchitectural state. We propose a Model-based Relational Testing (MRT) technique to empirically assess the CPU compliance with these specifications. We implement MRT in a testing framework called Revizor, and showcase its effectiveness on real Intel x86 CPUs. Revizor automatically detects violations of a rich set of contracts, or indicates their absence. A highlight of our findings is that Revizor managed to automatically surface Spectre, MDS, and LVI, as well as several previously unknown variants.
翻译:在本文中,我们提出了一个自动检测商业黑盒CPU中微分层信息泄漏的方法。我们以投机合同为基础,我们使用这些合同来确定程序执行对CPU微分层构造状态的允许副作用。我们提出了一个基于模型的关系测试(MRT)技术,以实验性地评估CPU对这些规格的遵守情况。我们在一个称为Revizor的测试框架内实施MRT,并在真实的Intelx86 CPU上展示其有效性。Revizor自动检测违反大量合同的情况,或表明其不存在。我们发现的一个亮点是,Revizor管理了自动地表光谱、MDS和LVI,以及一些先前未知的变体。