USENIX Security2024Top-tier venue
GhostRace: Exploiting and Mitigating Speculative Race Conditions
Hany Ragab, Andrea Mambretti, Anil Kurmus, Cristiano Giuffrida
Abstract
Race conditions arise when multiple threads attempt to access a shared resource without proper synchronization, often leading to vulnerabilities such as concurrent use-after-free. To mitigate their occurrence, operating systems rely on synchronization primitives such as mutexes, spinlocks, etc. In this paper, we present GhostRace, the first security analysis of these primitives on speculatively executed code paths. Our key finding is that all the common synchronization primitives can be microarchitecturally bypassed on speculative paths, turning all architecturally race-free critical regions into Speculative Race Conditions (SRCs). To study the severity of SRCs, we focus on Speculative Concurrent Use-After-Free (SCUAF) and uncover 1,283 potentially exploitable gadgets in the Linux kernel. Moreover, we demonstrate that SCUAF information disclosure attacks against the kernel are not only practical, but that their reliability can closely match that of traditional Spectre attacks, with our proof of concept leaking kernel memory at 12 KB/s. Crucially, we develop a new technique to create an unbounded race window, accommodating an arbitrary number of SCUAF invocations required by an end-to-end attack in a single race window. To address the new attack surface, we also propose a generic SRC mitigation to harden all the affected synchronization primitives on Linux. Our mitigation requires minimal kernel changes and incurs only ≈5% geomean performance overhead on LMBench.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext d0a981a7-21dc-4d2f-a3ad-e1d2ac125dc6Cited by top-tier papers4
- InSpectre Gadget: Inspecting the Residual Attack Surface of Cross-privilege Spectre v2Sander Wiebing, Alvise de Faveri Tron, Herbert Bos, Cristiano GiuffridaUSENIX Security 2024 · 32 citations
- Sharing is leaking: blocking transient-execution attacks with core-gapped confidential VMsCharly Castes, Andrew BaumannASPLOS 2024 · 2 citations
- Cross-Cache Attacks for the Linux Kernel via PCP MassagingClaudio Migliorelli, Andrea Mambretti, Alessandro Sorniotti, Vittorio Zaccaria et al.NDSS 2026
- MileSan: Detecting Exploitable Microarchitectural Leakage via Differential Hardware-Software Taint TrackingTobias Kovats, Flavien Solt, Katharina Ceesay-Seitz, Kaveh RazaviCCS 2025
Builds on34
- Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin et al.S&P 2019 · 2,435 citations
- Meltdown: Reading Kernel Memory from User SpaceMoritz Lipp, Michael Schwarz, Daniel Gruss, Thomas Prescher et al.USENIX Security 2018 · 1,456 citations
- RIDL: Rogue In-Flight Data LoadStephan van Schaik, Alyssa Milburn, Sebastian Österlund, Pietro Frigo et al.S&P 2019 · 408 citations
- Hawkeye: Towards a Desired Directed Grey-box FuzzerHongxu Chen, Yinxing Xue, Yuekang Li, Bihuan Chen et al.CCS 2018 · 335 citations
- SMoTherSpectre: Exploiting Speculative Execution through Port ContentionAtri Bhattacharyya, Alexandra Sandulescu, Matthias Neugschwandtner, Alessandro Sorniotti et al.CCS 2019 · 267 citations
Related papers
- Kasper: Scanning for Generalized Transient Execution Gadgets in the Linux KernelBrian Johannesmeyer, Jakob Koschel, Kaveh Razavi, Herbert Bos et al.NDSS 2022
- Speculative Probing: Hacking Blind in the Spectre EraEnes Göktas, Kaveh Razavi, Georgios Portokalidis, Herbert Bos et al.CCS 2020 · 36 citations
- An Analysis of Speculative Type Confusion Vulnerabilities in the WildOfek Kirzner, Adam MorrisonUSENIX Security 2021 · 40 citations
- ExpRace: Exploiting Kernel Races through Raising InterruptsYoochan Lee, Changwoo Min, Byoungyoung LeeUSENIX Security 2021 · 40 citations
- Spectre on RISC-V Silicon: Attacks and Defenses on Commercial Out-of-Order ProcessorsLukas Gerlach, Marton Bognar, Daniel Weber, Michael Schwarz et al.USENIX Security 2026
