Lune

DAC2021Top-tier venue

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

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

12 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Uncovering and Exploiting AMD Speculative Memory Access Predictors for Fun and Profit cites Spectre Attacks: Exploiting Speculative Execution
  • Spectre Attacks: Exploiting Speculative Execution cites Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
  • Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch Predictor cites Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
  • Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch Predictor cites Spectre Attacks: Exploiting Speculative Execution
  • Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch Predictor cites HyBP: Hybrid Isolation-Randomization Secure Branch Predictor
  • Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch Predictor cites 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 cites 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 cites Spectre Attacks: Exploiting Speculative Execution
  • HyBP: Hybrid Isolation-Randomization Secure Branch Predictor cites Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
  • HyBP: Hybrid Isolation-Randomization Secure Branch Predictor cites Spectre Attacks: Exploiting Speculative Execution
  • HyBP: Hybrid Isolation-Randomization Secure Branch Predictor cites ScatterCache: Thwarting Cache Attacks via Cache Set Randomization
  • ScatterCache: Thwarting Cache Attacks via Cache Set Randomization cites Spectre Attacks: Exploiting Speculative Execution
  • MuonTrap: Preventing Cross-Domain Spectre-Like Attacks by Capturing Speculative State cites Spectre Attacks: Exploiting Speculative Execution
  • SoK: Practical Foundations for Software Spectre Defenses cites Spectre Attacks: Exploiting Speculative Execution
  • SoK: Practical Foundations for Software Spectre Defenses cites MuonTrap: Preventing Cross-Domain Spectre-Like Attacks by Capturing Speculative State
  • SoK: Practical Foundations for Software Spectre Defenses cites ConTExT: A Generic Approach for Mitigating Spectre
  • ConTExT: A Generic Approach for Mitigating Spectre cites Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
  • ConTExT: A Generic Approach for Mitigating Spectre cites Spectre Attacks: Exploiting Speculative Execution
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers12

  1. SoK: Practical Foundations for Software Spectre DefensesSunjay Cauligi, Craig Disselkoen, Daniel Moghimi, Gilles Barthe et al.S&P 2022 · 59 citations
  2. Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch PredictorLuyi Li, Hosein Yavarzadeh, Dean M. TullsenUSENIX Security 2024 · 18 citations
  3. 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 citations
  4. HyBP: Hybrid Isolation-Randomization Secure Branch PredictorLutan Zhao, Peinan Li, Rui Hou, Michael C. Huang et al.HPCA 2022 · 10 citations
  5. Uncovering and Exploiting AMD Speculative Memory Access Predictors for Fun and ProfitChang Liu, Dongsheng Wang, Yongqiang Lyu, Pengfei Qiu et al.HPCA 2024 · 9 citations

Builds on5

  1. Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin et al.S&P 2019 · 2,435 citations
  2. Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch ShadowingSangho Lee, Ming-Wei Shih, Prasun Gera, Taesoo Kim et al.USENIX Security 2017 · 536 citations
  3. ScatterCache: Thwarting Cache Attacks via Cache Set RandomizationMario Werner, Thomas Unterluggauer, Lukas Giner, Michael Schwarz et al.USENIX Security 2019 · 221 citations
  4. MuonTrap: Preventing Cross-Domain Spectre-Like Attacks by Capturing Speculative StateSam Ainsworth, Timothy M. JonesISCA 2020 · 68 citations
  5. ConTExT: A Generic Approach for Mitigating SpectreMichael Schwarz, Moritz Lipp, Claudio Canella, Robert Schilling et al.NDSS 2020

Related papers

  1. CryptoBTB: A Secure Hierarchical BTB for Diverse Instruction Footprint WorkloadsDebpratim Adak, Eric Rotenberg, Amro Awad, Huiyang ZhouMICRO 2025 · 1 citation
  2. Modeling, Derivation, and Automated Analysis of Branch Predictor Security VulnerabilitiesQuancheng Wang, Ming Tang, Ke Xu, Han WangHPCA 2024 · 5 citations
  3. Branch Privilege Injection: Compromising Spectre v2 Hardware Mitigations by Exploiting Branch Predictor Race ConditionsSandro Rüegge, Johannes Wikner, Kaveh RazaviUSENIX Security 2025
  4. Branch History Injection: On the Effectiveness of Hardware Mitigations Against Cross-Privilege Spectre-v2 AttacksEnrico Barberis, Pietro Frigo, Marius Muench, Herbert Bos et al.USENIX Security 2022
  5. Architectural Mimicry: Innovative Instructions to Efficiently Address Control-Flow Leakage in Data-Oblivious ProgramsHans Winderix, Marton Bognar, Job Noorman, Lesly-Ann Daniel et al.S&P 2024 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines