Branch Privilege Injection: Compromising Spectre v2 Hardware Mitigations by Exploiting Branch Predictor Race Conditions
Sandro Rüegge, Johannes Wikner, Kaveh Razavi
摘要
Modern branch predictors prevent Spectre v2 attacks by associating predictions with the privilege domain they should be restricted to, or by providing barriers for invalidating predictions when switching contexts. Such branch predictors receive branch resolution and privilege domain feedback asynchronously, but it is unclear whether they always consider the correct order of events. In this paper, we introduce Branch Predictor Race Conditions (BPRC), a class of vulnerabilities where asynchronous branch predictor operations violate hardware-enforced privilege and context separation mechanisms in all recent Intel CPUs. Our analysis reveals three variants, breaching the security boundaries between user and kernel, guest and hypervisor, and across indirect branch predictor barriers. Leveraging BPRC, we introduce Branch Privilege Injection (BPI), a new Spectre v2 primitive that injects arbitrary branch predictions tagged with kernel privilege from user mode. Our end-to-end BPI exploit leaks arbitrary kernel memory from up-to-date Linux systems across six generations of Intel CPUs, at 5.6 KiB/s on Intel Raptor Cove.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Spectre on RISC-V Silicon: Attacks and Defenses on Commercial Out-of-Order Processors 引用了 Spectre Attacks: Exploiting Speculative Execution
- Transient Architectural Execution: From Weird Gates to Weird Programs 引用了 Spectre Attacks: Exploiting Speculative Execution
- Transient Architectural Execution: From Weird Gates to Weird Programs 引用了 ZombieLoad: Cross-Privilege-Boundary Data Sampling
- Transient Architectural Execution: From Weird Gates to Weird Programs 引用了 RIDL: Rogue In-Flight Data Load
- Transient Architectural Execution: From Weird Gates to Weird Programs 引用了 Meltdown: Reading Kernel Memory from User Space
- Transient Architectural Execution: From Weird Gates to Weird Programs 引用了 Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
- ZombieLoad: Cross-Privilege-Boundary Data Sampling 引用了 Spectre Attacks: Exploiting Speculative Execution
- RIDL: Rogue In-Flight Data Load 引用了 Spectre Attacks: Exploiting Speculative Execution
- RIDL: Rogue In-Flight Data Load 引用了 Meltdown: Reading Kernel Memory from User Space
- RIDL: Rogue In-Flight Data Load 引用了 Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
- iEnFlow: Endogenous Control-Flow Attacks via Conditional Branch Prediction on Apple Silicon 引用了 Spectre Attacks: Exploiting Speculative Execution
- Meltdown: Reading Kernel Memory from User Space 引用了 Spectre Attacks: Exploiting Speculative Execution
- Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution 引用了 Spectre Attacks: Exploiting Speculative Execution
- TONTOU: On the Exploitability of Time-of-Neutralization to Time-of-Use Windows 引用了 Spectre Attacks: Exploiting Speculative Execution
- Defeating Transient Execution Attacks by Limiting Secret Reachability Through Register Hiding and ShadowCFI 引用了 Spectre Attacks: Exploiting Speculative Execution
引用它的顶会 Paper5
- Defeating Transient Execution Attacks by Limiting Secret Reachability Through Register Hiding and ShadowCFIDaniël Trujillo, Jagadish Kotra, David Kaplan, Mengjia YanS&P 2026 · 1 次引用
- Spectre on RISC-V Silicon: Attacks and Defenses on Commercial Out-of-Order ProcessorsLukas Gerlach, Marton Bognar, Daniel Weber, Michael Schwarz 等USENIX Security 2026
- Transient Architectural Execution: From Weird Gates to Weird ProgramsPing-Lun Wang, Fraser Brown, Riccardo Paccagnella, Eyal Ronen 等S&P 2026
- iEnFlow: Endogenous Control-Flow Attacks via Conditional Branch Prediction on Apple SiliconKaiyuan Rong, Jiajie Chen, Junqi Fang, Peng Qu 等CCS 2026
- TONTOU: On the Exploitability of Time-of-Neutralization to Time-of-Use WindowsDaniël Trujillo, Mengjia YanUSENIX Security 2026
它引用的 Paper16
- Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin 等S&P 2019 · 2,435 次引用
- Meltdown: Reading Kernel Memory from User SpaceMoritz Lipp, Michael Schwarz, Daniel Gruss, Thomas Prescher 等USENIX Security 2018 · 1,456 次引用
- Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order ExecutionJo Van Bulck, Marina Minkin, Ofir Weisse, Daniel Genkin 等USENIX Security 2018 · 1,175 次引用
- ZombieLoad: Cross-Privilege-Boundary Data SamplingMichael Schwarz, Moritz Lipp, Daniel Moghimi, Jo Van Bulck 等CCS 2019 · 464 次引用
- RIDL: Rogue In-Flight Data LoadStephan van Schaik, Alyssa Milburn, Sebastian Österlund, Pietro Frigo 等S&P 2019 · 408 次引用
相关 Paper
- Training Solo: On the Limitations of Domain Isolation Against Spectre-v2 AttacksSander Wiebing, Cristiano GiuffridaS&P 2025
- Exploiting Inaccurate Branch History in Side-Channel AttacksYuhui Zhu, Alessandro BiondiUSENIX Security 2025
- Branch History Injection: On the Effectiveness of Hardware Mitigations Against Cross-Privilege Spectre-v2 AttacksEnrico Barberis, Pietro Frigo, Marius Muench, Herbert Bos 等USENIX Security 2022
- RETBLEED: Arbitrary Speculative Code Execution with Return InstructionsJohannes Wikner, Kaveh RazaviUSENIX Security 2022
- Breaking the Barrier: Post-Barrier Spectre AttacksJohannes Wikner, Kaveh RazaviS&P 2025
