Safeslab: Mitigating Use-After-Free Vulnerabilities via Memory Protection Keys
Marius Momeu, Simon Schnückel, Kai Angnis, Michalis Polychronakis, Vasileios P. Kemerlis
Abstract
Restricting dangling pointers from accessing freed memory is a promising technique for mitigating use-after-free vulnerabilities in memory-unsafe programming languages. However, existing solutions suffer from high performance overheads, as they rely on conventional page table manipulation to make dangling pointers inaccessible. In this paper, we present Safeslab: a heap-hardening extension that aims to mitigate use-after-free vulnerabilities via a novel and efficient address aliasing approach. Safeslab assigns multiple virtual aliases to each memory page in the system, and manages their access rights via the recently introduced Memory Protection Keys hardware extension, which is designed to provide a fast alternative to page tables for memory management. This allows Safeslab to drastically reduce the number of page table modifications, while blocking dangling pointers efficiently. We integrated Safeslab into the Linux kernel, replacing its default heap allocator (SLUB). The results of our experimental evaluation with real-world benchmarks show that Safeslab incurs a negligible runtime overhead of up to 4% and moderate memory waste.
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.
3 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
- IUBIK: Isolating User Bytes in Commodity Operating System Kernels via Memory Tagging Extensions cites A Systematic Evaluation of Transient Execution Attacks and Defenses
- IUBIK: Isolating User Bytes in Commodity Operating System Kernels via Memory Tagging Extensions cites ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)
- Meltdown: Reading Kernel Memory from User Space cites Spectre Attacks: Exploiting Speculative Execution
- A Systematic Evaluation of Transient Execution Attacks and Defenses cites Spectre Attacks: Exploiting Speculative Execution
- Fast Pointer Nullification for Use-After-Free Prevention cites ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)
Cited by top-tier papers3
- Cross-Cache Attacks for the Linux Kernel via PCP MassagingClaudio Migliorelli, Andrea Mambretti, Alessandro Sorniotti, Vittorio Zaccaria et al.NDSS 2026
- IUBIK: Isolating User Bytes in Commodity Operating System Kernels via Memory Tagging ExtensionsMarius Momeu, Alexander J. Gaidis, Jasper v. d. Heidt, Vasileios P. KemerlisS&P 2025
- Fast Pointer Nullification for Use-After-Free PreventionYubo Du, Youtao Zhang, Jun YangNDSS 2026
Builds on29
- 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
- A Systematic Evaluation of Transient Execution Attacks and DefensesClaudio Canella, Jo Van Bulck, Michael Schwarz, Moritz Lipp et al.USENIX Security 2019 · 442 citations
- ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)Anjo Vahldiek-Oberwagner, Eslam Elnikety, Nuno O. Duarte, Michael Sammler et al.USENIX Security 2019 · 247 citations
- Understanding Linux MalwareEmanuele Cozzi, Mariano Graziano, Yanick Fratantonio, Davide BalzarottiS&P 2018 · 203 citations
Related papers
- FreeGuard: A Faster Secure Heap AllocatorSam Silvestro, Hongyu Liu, Corey Crosser, Zhiqiang Lin et al.CCS 2017 · 71 citations
- MarkUs: Drop-in use-after-free prevention for low-level languagesSam Ainsworth, Timothy M. JonesS&P 2020 · 63 citations
- DMGuard: Safeguarding Kernels from Physical-Page Use-After-Free VulnerabilitiesJuhee Kim, Jaeyoung Chung, Dae R. Jeong, Byoungyoung LeeUSENIX Security 2026
- Efficient Use-After-Free Prevention with Opportunistic Page-Level SweepingChanyoung Park, Hyungon MoonNDSS 2024
- Preventing Use-After-Free Attacks with Fast Forward AllocationBrian Wickman, Hong Hu, Insu Yun, Daehee Jang et al.USENIX Security 2021 · 53 citations
