A Lightweight Isolation Mechanism for Secure Branch Predictors
Lutan Zhao, Peinan Li, Rui Hou, Michael C. Huang, Jiazhen Li, Lixin Zhang, Xuehai Qian, Dan Meng
摘要
Recently exposed vulnerabilities reveal the necessity to improve the security of branch predictors. Branch predictors record history about the execution of different programs, and such information from different processes are stored in the same structure and thus accessible to each other. This leaves the attackers with the opportunities for malicious training and malicious perception. Instead of flush-based or physical isolation of hardware resources, we want to achieve isolation of the content in these hardware tables with some lightweight processing using randomization as follows. (1) Content encoding. We propose to use hardware-based thread-private random numbers to encode the contents of the branch predictor tables (both direction and destination histories) which we call XOR-BP. Specifically, the data is encoded by XOR operation with the key before written in the table and decoded after read from the table. Such a mechanism obfuscates the information adding difficulties to cross-process or cross-privilege level analysis and perception. It achieves a similar effect of logical isolation but adds little in terms of space or time overheads. (2) Index encoding. We propose a randomized index mechanism of the branch predictor (Noisy-XOR-BP). Similar to the XOR-BP, another thread-private random number is used together with the branch instruction address as the input to compute the index of the branch predictor. This randomized indexing mechanism disrupts the correspondence between the branch instruction address and the branch predictor entry, thus increases the noise for malicious perception attacks. Our analyses using an FPGA-based RISC-V processor prototype and additional auxiliary simulations suggest that the proposed mechanisms incur a very small performance cost while providing strong protection.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 12 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Uncovering and Exploiting AMD Speculative Memory Access Predictors for Fun and Profit 引用了 Spectre Attacks: Exploiting Speculative Execution
- Spectre Attacks: Exploiting Speculative Execution 引用了 Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
- Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch Predictor 引用了 Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
- Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch Predictor 引用了 Spectre Attacks: Exploiting Speculative Execution
- Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch Predictor 引用了 HyBP: Hybrid Isolation-Randomization Secure Branch Predictor
- Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch Predictor 引用了 MuonTrap: Preventing Cross-Domain Spectre-Like Attacks by Capturing Speculative State
- All Your PC Are Belong to Us: Exploiting Non-control-Transfer Instruction BTB Updates for Dynamic PC Extraction 引用了 Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
- All Your PC Are Belong to Us: Exploiting Non-control-Transfer Instruction BTB Updates for Dynamic PC Extraction 引用了 Spectre Attacks: Exploiting Speculative Execution
- HyBP: Hybrid Isolation-Randomization Secure Branch Predictor 引用了 Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
- HyBP: Hybrid Isolation-Randomization Secure Branch Predictor 引用了 Spectre Attacks: Exploiting Speculative Execution
- HyBP: Hybrid Isolation-Randomization Secure Branch Predictor 引用了 ScatterCache: Thwarting Cache Attacks via Cache Set Randomization
- ScatterCache: Thwarting Cache Attacks via Cache Set Randomization 引用了 Spectre Attacks: Exploiting Speculative Execution
- MuonTrap: Preventing Cross-Domain Spectre-Like Attacks by Capturing Speculative State 引用了 Spectre Attacks: Exploiting Speculative Execution
- SoK: Practical Foundations for Software Spectre Defenses 引用了 Spectre Attacks: Exploiting Speculative Execution
- SoK: Practical Foundations for Software Spectre Defenses 引用了 MuonTrap: Preventing Cross-Domain Spectre-Like Attacks by Capturing Speculative State
- SoK: Practical Foundations for Software Spectre Defenses 引用了 ConTExT: A Generic Approach for Mitigating Spectre
- ConTExT: A Generic Approach for Mitigating Spectre 引用了 Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
- ConTExT: A Generic Approach for Mitigating Spectre 引用了 Spectre Attacks: Exploiting Speculative Execution
引用它的顶会 Paper被引最多的 5 篇,共 12 篇
- SoK: Practical Foundations for Software Spectre DefensesSunjay Cauligi, Craig Disselkoen, Daniel Moghimi, Gilles Barthe 等S&P 2022 · 59 次引用
- Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch PredictorLuyi Li, Hosein Yavarzadeh, Dean M. TullsenUSENIX Security 2024 · 18 次引用
- All Your PC Are Belong to Us: Exploiting Non-control-Transfer Instruction BTB Updates for Dynamic PC ExtractionJiyong Yu, Trent Jaeger, Christopher Wardlaw FletcherISCA 2023 · 12 次引用
- HyBP: Hybrid Isolation-Randomization Secure Branch PredictorLutan Zhao, Peinan Li, Rui Hou, Michael C. Huang 等HPCA 2022 · 10 次引用
- Uncovering and Exploiting AMD Speculative Memory Access Predictors for Fun and ProfitChang Liu, Dongsheng Wang, Yongqiang Lyu, Pengfei Qiu 等HPCA 2024 · 9 次引用
它引用的 Paper5
- Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin 等S&P 2019 · 2,435 次引用
- Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch ShadowingSangho Lee, Ming-Wei Shih, Prasun Gera, Taesoo Kim 等USENIX Security 2017 · 536 次引用
- ScatterCache: Thwarting Cache Attacks via Cache Set RandomizationMario Werner, Thomas Unterluggauer, Lukas Giner, Michael Schwarz 等USENIX Security 2019 · 221 次引用
- MuonTrap: Preventing Cross-Domain Spectre-Like Attacks by Capturing Speculative StateSam Ainsworth, Timothy M. JonesISCA 2020 · 68 次引用
- ConTExT: A Generic Approach for Mitigating SpectreMichael Schwarz, Moritz Lipp, Claudio Canella, Robert Schilling 等NDSS 2020
相关 Paper
- CryptoBTB: A Secure Hierarchical BTB for Diverse Instruction Footprint WorkloadsDebpratim Adak, Eric Rotenberg, Amro Awad, Huiyang ZhouMICRO 2025 · 1 次引用
- Modeling, Derivation, and Automated Analysis of Branch Predictor Security VulnerabilitiesQuancheng Wang, Ming Tang, Ke Xu, Han WangHPCA 2024 · 5 次引用
- Branch Privilege Injection: Compromising Spectre v2 Hardware Mitigations by Exploiting Branch Predictor Race ConditionsSandro Rüegge, Johannes Wikner, Kaveh RazaviUSENIX 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
- Architectural Mimicry: Innovative Instructions to Efficiently Address Control-Flow Leakage in Data-Oblivious ProgramsHans Winderix, Marton Bognar, Job Noorman, Lesly-Ann Daniel 等S&P 2024 · 5 次引用
