ret2spec: Speculative Execution Using Return Stack Buffers
Abstract
Speculative execution is an optimization technique that has been part of CPUs for over a decade. It predicts the outcome and target of branch instructions to avoid stalling the execution pipeline. However, until recently, the security implications of speculative code execution have not been studied. In this paper, we investigate a special type of branch predictor that is responsible for predicting return addresses. To the best of our knowledge, we are the first to study return address predictors and their consequences for the security of modern software. In our work, we show how return stack buffers (RSBs), the core unit of return address predictors, can be used to trigger misspeculations. Based on this knowledge, we propose two new attack variants using RSBs that give attackers similar capabilities as the documented Spectre attacks. We show how local attackers can gain arbitrary speculative code execution across processes, e.g., to leak passwords another user enters on a shared system. Our evaluation showed that the recent Spectre countermeasures deployed in operating systems can also cover such RSB-based cross-process attacks. Yet we then demonstrate that attackers can trigger misspeculation in JIT environments in order to leak arbitrary memory content of browser processes. Reading outside the sandboxed memory region with JIT-compiled code is still possible with 80% accuracy on average.
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.
124 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- LVI: Hijacking Transient Execution through Microarchitectural Load Value Injection cites Spectre Attacks: Exploiting Speculative Execution
- LVI: Hijacking Transient Execution through Microarchitectural Load Value Injection cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
- LVI: Hijacking Transient Execution through Microarchitectural Load Value Injection cites RIDL: Rogue In-Flight Data Load
- LVI: Hijacking Transient Execution through Microarchitectural Load Value Injection cites A Systematic Evaluation of Transient Execution Attacks and Defenses
- LVI: Hijacking Transient Execution through Microarchitectural Load Value Injection cites Fallout: Leaking Data on Meltdown-resistant CPUs
- Spectre Attacks: Exploiting Speculative Execution cites ASLR on the Line: Practical Cache Attacks on the MMU
- Prefetch Side-Channel Attacks: Bypassing SMAP and Kernel ASLR cites Breaking Kernel Address Space Layout Randomization with Intel TSX
- Breaking Kernel Address Space Layout Randomization with Intel TSX cites Prefetch Side-Channel Attacks: Bypassing SMAP and Kernel ASLR
- ZombieLoad: Cross-Privilege-Boundary Data Sampling cites Spectre Attacks: Exploiting Speculative Execution
- ZombieLoad: Cross-Privilege-Boundary Data Sampling cites Prefetch Side-Channel Attacks: Bypassing SMAP and Kernel ASLR
- ZombieLoad: Cross-Privilege-Boundary Data Sampling cites A Systematic Evaluation of Transient Execution Attacks and Defenses
- ZombieLoad: Cross-Privilege-Boundary Data Sampling cites Breaking Kernel Address Space Layout Randomization with Intel TSX
- RIDL: Rogue In-Flight Data Load cites Spectre Attacks: Exploiting Speculative Execution
- RIDL: Rogue In-Flight Data Load cites ASLR on the Line: Practical Cache Attacks on the MMU
- A Systematic Evaluation of Transient Execution Attacks and Defenses cites Spectre Attacks: Exploiting Speculative Execution
- A Systematic Evaluation of Transient Execution Attacks and Defenses cites Prefetch Side-Channel Attacks: Bypassing SMAP and Kernel ASLR
- ASLR on the Line: Practical Cache Attacks on the MMU cites Breaking Kernel Address Space Layout Randomization with Intel TSX
- Fallout: Leaking Data on Meltdown-resistant CPUs cites Spectre Attacks: Exploiting Speculative Execution
- Fallout: Leaking Data on Meltdown-resistant CPUs cites Prefetch Side-Channel Attacks: Bypassing SMAP and Kernel ASLR
- Fallout: Leaking Data on Meltdown-resistant CPUs cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
- Fallout: Leaking Data on Meltdown-resistant CPUs cites RIDL: Rogue In-Flight Data Load
- Fallout: Leaking Data on Meltdown-resistant CPUs cites ASLR on the Line: Practical Cache Attacks on the MMU
- Fallout: Leaking Data on Meltdown-resistant CPUs cites Breaking Kernel Address Space Layout Randomization with Intel TSX
- Fallout: Leaking Data on Meltdown-resistant CPUs cites ARMageddon: Cache Attacks on Mobile Devices
Cited by top-tier papers124
- ZombieLoad: Cross-Privilege-Boundary Data SamplingMichael Schwarz, Moritz Lipp, Daniel Moghimi, Jo Van Bulck et al.CCS 2019 · 464 citations
- A Systematic Evaluation of Transient Execution Attacks and DefensesClaudio Canella, Jo Van Bulck, Michael Schwarz, Moritz Lipp et al.USENIX Security 2019 · 442 citations
- RIDL: Rogue In-Flight Data LoadStephan van Schaik, Alyssa Milburn, Sebastian Österlund, Pietro Frigo et al.S&P 2019 · 408 citations
- Fallout: Leaking Data on Meltdown-resistant CPUsClaudio Canella, Daniel Genkin, Lukas Giner, Daniel Gruss et al.CCS 2019 · 289 citations
- LVI: Hijacking Transient Execution through Microarchitectural Load Value InjectionJo Van Bulck, Daniel Moghimi, Michael Schwarz, Moritz Lipp et al.S&P 2020 · 275 citations
Builds on8
- Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin et al.S&P 2019 · 2,435 citations
- ARMageddon: Cache Attacks on Mobile DevicesMoritz Lipp, Daniel Gruss, Raphael Spreitzer, Clémentine Maurice et al.USENIX Security 2016 · 451 citations
- Prefetch Side-Channel Attacks: Bypassing SMAP and Kernel ASLRDaniel Gruss, Clémentine Maurice, Anders Fogh, Moritz Lipp et al.CCS 2016 · 278 citations
- ASLR on the Line: Practical Cache Attacks on the MMUBen Gras, Kaveh Razavi, Erik Bosman, Herbert Bos et al.NDSS 2017 · 276 citations
- Breaking Kernel Address Space Layout Randomization with Intel TSXYeongjin Jang, Sangho Lee, Taesoo KimCCS 2016 · 174 citations
Related papers
- SpecCFI: Mitigating Spectre Attacks using CFI Informed SpeculationEsmaeil Mohammadian Koruyeh, Shirin Haji Amin Shirazi, Khaled N. Khasawneh, Chengyu Song et al.S&P 2020 · 74 citations
- SSBleed: Non-Speculative Side-Channel Attacks via Speculative Store Bypass on Armv9 CPUsChang Liu, Hongpei Zheng, Xin Zhang, Dapeng Ju et al.HPCA 2026 · 1 citation
- Exploiting Inaccurate Branch History in Side-Channel AttacksYuhui Zhu, Alessandro BiondiUSENIX Security 2025
- 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
- SPECRUN: The Danger of Speculative Runahead Execution in ProcessorsChaoqun Shen, Gang Qu, Jiliang ZhangDAC 2024 · 1 citation
