Speculation at Fault: Modeling and Testing Microarchitectural Leakage of CPU Exceptions

Microarchitectural leakage models provide effective tools to prevent vulnerabilities such as Spectre and Meltdown via secure co-design: For software, they provide a foundation for secure compilation and verification; for hardware, they provide a target specification to test and verify against. Unfortunately, existing leakage models are severely limited: None of them covers CPU exceptions, which are essential to implement security abstractions such as virtualization and memory protection, and which are the source of critical vulnerabilities such as Meltdown, MDS, and Foreshadow. In this paper, we provide the first leakage models for CPU exceptions, together with new tools for testing black-box CPUs against them. We run extensive experiments and successively refine these models, until we precisely capture the leakage for a representative subset of exceptions on four different x86 microarchitectures. In the process, we contradict, refine, and corroborate a large number of findings from prior work, and we uncover three novel transient leaks affecting stores to non-canonical addresses, stores to read-only memory, and divisions by zero.

[1]  M. Silberstein,et al.  Hide and Seek with Spectres: Efficient discovery of speculative information leaks with random testing , 2023, 2023 IEEE Symposium on Security and Privacy (SP).

[2]  C. Rossow,et al.  Microarchitectural Leakage Templates and Their Application to Cache-Based Side Channels , 2022, CCS.

[3]  Dan Page,et al.  MIRACLE: MIcRo-ArChitectural Leakage Evaluation , 2021, IACR Cryptol. ePrint Arch..

[4]  Andreas Lindner,et al.  Validation of Side-Channel Models via Observation Refinement , 2021, MICRO.

[5]  Adam Morrison,et al.  Speculative Privacy Tracking (SPT): Leaking Information From Speculative Execution Without Compromising Privacy , 2021, MICRO.

[6]  Hernán Ponce de León,et al.  Cats vs. Spectre: An Axiomatic Approach to Modeling Speculative Execution Attacks , 2021, 2022 IEEE Symposium on Security and Privacy (SP).

[7]  Christof Fetzer,et al.  Transient Execution of Non-Canonical Accesses , 2021, ArXiv.

[8]  Christian Rossow,et al.  Osiris: Automated Discovery of Microarchitectural Side Channels , 2021, USENIX Security Symposium.

[9]  Yinqian Zhang,et al.  INTROSPECTRE: A Pre-Silicon Framework for Discovery and Analysis of Transient Execution Vulnerabilities , 2021, 2021 ACM/IEEE 48th Annual International Symposium on Computer Architecture (ISCA).

[10]  M. Silberstein,et al.  Revizor: Testing Black-Box CPUs Against Speculation Contracts , 2021, IEEE Micro.

[11]  G. Barthe,et al.  SoK: Practical Foundations for Software Spectre Defenses , 2021, 2022 IEEE Symposium on Security and Privacy (SP).

[12]  Andreas Lindner,et al.  Speculative Leakage in ARM Cortex-A53 , 2020, ArXiv.

[13]  Marco Guarnieri,et al.  Hardware-Software Contracts for Secure Speculation , 2020, 2021 IEEE Symposium on Security and Privacy (SP).

[14]  Andreas Lindner,et al.  Validation of Abstract Side-Channel Models for Computer Architectures , 2020, CAV.

[15]  Rami Gökhan Kici,et al.  Automatically eliminating speculative leaks from cryptographic code with blade , 2020, Proc. ACM Program. Lang..

[16]  Berk Sunar,et al.  LVI: Hijacking Transient Execution through Microarchitectural Load Value Injection , 2020, 2020 IEEE Symposium on Security and Privacy (SP).

[17]  Yinqian Zhang,et al.  SPEECHMINER: A Framework for Investigating and Measuring Speculative Execution Vulnerabilities , 2019, NDSS.

[18]  Frank Piessens,et al.  Fallout: Leaking Data on Meltdown-resistant CPUs , 2019, CCS.

[19]  Yueqiang Cheng,et al.  SPECUSYM: Speculative Symbolic Execution for Cache Timing Leak Detection , 2019, 2020 IEEE/ACM 42nd International Conference on Software Engineering (ICSE).

[20]  Roberto Guanciale,et al.  InSpectre: Breaking and Fixing Microarchitectural Vulnerabilities by Formal Analysis , 2019, CCS.

[21]  Marco Patrignani,et al.  Exorcising Spectres with Secure Compilers , 2019, CCS.

[22]  Josep Torrellas,et al.  Speculative Taint Tracking (STT): A Comprehensive Protection for Speculatively Accessed Data , 2019, IEEE Micro.

[23]  Mahmut Kandemir,et al.  CaSym: Cache Aware Symbolic Execution for Side Channel Detection and Mitigation , 2019, 2019 IEEE Symposium on Security and Privacy (SP).

[24]  Herbert Bos,et al.  RIDL: Rogue In-Flight Data Load , 2019, 2019 IEEE Symposium on Security and Privacy (SP).

[25]  Daniel Gruss,et al.  ZombieLoad: Cross-Privilege-Boundary Data Sampling , 2019, CCS.

[26]  Marco Guarnieri,et al.  Spectector: Principled Detection of Speculative Information Flows , 2018, 2020 IEEE Symposium on Security and Privacy (SP).

[27]  Frank Piessens,et al.  A Systematic Evaluation of Transient Execution Attacks and Defenses , 2018, USENIX Security Symposium.

[28]  Margaret Martonosi,et al.  CheckMate: Automated Synthesis of Hardware Exploits and Security Litmus Tests , 2018, 2018 51st Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[29]  Thomas F. Wenisch,et al.  Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution , 2018, USENIX Security Symposium.

[30]  Michael Hamburg,et al.  Meltdown: Reading Kernel Memory from User Space , 2018, USENIX Security Symposium.

[31]  Carl A. Waldspurger,et al.  Speculative Buffer Overflows: Attacks and Defenses , 2018, ArXiv.

[32]  Julian Stecklina,et al.  LazyFP: Leaking FPU Register State using Microarchitectural Side-Channels , 2018, ArXiv.

[33]  Michael Hamburg,et al.  Spectre Attacks: Exploiting Speculative Execution , 2018, 2019 IEEE Symposium on Security and Privacy (SP).

[34]  Benjamin Grégoire,et al.  Jasmin: High-Assurance and High-Speed Cryptography , 2017, CCS.

[35]  Gilles Barthe,et al.  Verifying Constant-Time Implementations , 2016, USENIX Security Symposium.

[36]  Yuval Yarom,et al.  FLUSH+RELOAD: A High Resolution, Low Noise, L3 Cache Side-Channel Attack , 2014, USENIX Security Symposium.

[37]  Jan Reineke,et al.  CacheAudit: A Tool for the Static Analysis of Cache Side Channels , 2013, TSEC.

[38]  Adi Shamir,et al.  Efficient Cache Attacks on AES, and Countermeasures , 2010, Journal of Cryptology.

[39]  Herbert Bos,et al.  Rage Against the Machine Clear: A Systematic Analysis of Machine Clears and Their Implications for Transient Execution Attacks , 2021, USENIX Security Symposium.

[40]  Berk Sunar,et al.  Medusa: Microarchitectural Data Leakage via Automated Attack Synthesis , 2020, USENIX Security Symposium.

[41]  Cristiano Giuffrida,et al.  ABSynthe: Automatic Blackbox Side-channel Synthesis on Commodity Microarchitectures , 2020, NDSS.

[42]  Srinivas Devadas,et al.  Intel SGX Explained , 2016, IACR Cryptol. ePrint Arch..

[43]  Michael R. Clarkson,et al.  Hyperproperties , 2008, 2008 21st IEEE Computer Security Foundations Symposium.

[44]  No License,et al.  Intel ® 64 and IA-32 Architectures Software Developer ’ s Manual , 2006 .