Lune

ASPLOS2022Top-tier venue

MineSweeper: a "clean sweep" for drop-in use-after-free prevention

Márton Erdos, Sam Ainsworth, Timothy M. Jones

Abstract

Low-level languages, which require manual memory management from the programmer, remain in wide use for performance-critical applications. Memory-safety bugs are common, and now a major source of exploits. In particular, a use-after-free bug occurs when an object is erroneously deallocated, whilst pointers to it remain active in memory, and those (dangling) pointers are later used to access the object. An attacker can reallocate the memory area backing an erroneously freed object, then overwrite its contents, injecting carefully chosen data into the host program, thus altering its execution and achieving privilege escalation.

We present MineSweeper, a system to mitigate use-after-free vulnerabilities by retaining freed allocations in a quarantine, until no pointers to them remain in program memory, thus preventing their reallocation until it is safe. MineSweeper performs efficient linear sweeps of memory to identify quarantined items that have no dangling pointers to them, and thus can be safely reallocated. This allows MineSweeper to be significantly more efficient than previous transitive marking procedure techniques.

MineSweeper, attached to JeMalloc, improves security at an acceptable overhead in memory footprint (11.1% on average) and an execution-time cost of only 5.4% (geometric mean for SPEC CPU2006), with 9.6% additional threaded CPU usage. These figures considerably improve on the state-of-the-art for non-probabilistic drop-in temporal-safety systems, and make MineSweeper the only such scheme suitable for deployment in real-world production environments.

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.

15 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

  • Preventing Use-After-Free Attacks with Fast Forward Allocation cites MarkUs: Drop-in use-after-free prevention for low-level languages
  • Preventing Use-After-Free Attacks with Fast Forward Allocation cites Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • Preventing Use-After-Free Attacks with Fast Forward Allocation cites FreeGuard: A Faster Secure Heap Allocator
  • BUDAlloc: Defeating Use-After-Free Bugs by Decoupling Virtual Address Management from Kernel cites Preventing Use-After-Free Attacks with Fast Forward Allocation
  • BUDAlloc: Defeating Use-After-Free Bugs by Decoupling Virtual Address Management from Kernel cites MarkUs: Drop-in use-after-free prevention for low-level languages
  • BUDAlloc: Defeating Use-After-Free Bugs by Decoupling Virtual Address Management from Kernel cites Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • BUDAlloc: Defeating Use-After-Free Bugs by Decoupling Virtual Address Management from Kernel cites FreeGuard: A Faster Secure Heap Allocator
  • PoisonCap: Efficient Hierarchical Temporal Safety for CHERI cites Preventing Use-After-Free Attacks with Fast Forward Allocation
  • PoisonCap: Efficient Hierarchical Temporal Safety for CHERI cites MarkUs: Drop-in use-after-free prevention for low-level languages
  • PoisonCap: Efficient Hierarchical Temporal Safety for CHERI cites PICASSO: Scaling CHERI Use-After-Free Protection to Millions of Allocations using Colored Capabilities
  • PoisonCap: Efficient Hierarchical Temporal Safety for CHERI cites Cornucopia: Temporal Safety for CHERI Heaps
  • MarkUs: Drop-in use-after-free prevention for low-level languages cites Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • MarkUs: Drop-in use-after-free prevention for low-level languages cites FreeGuard: A Faster Secure Heap Allocator
  • PICASSO: Scaling CHERI Use-After-Free Protection to Millions of Allocations using Colored Capabilities cites Preventing Use-After-Free Attacks with Fast Forward Allocation
  • PICASSO: Scaling CHERI Use-After-Free Protection to Millions of Allocations using Colored Capabilities cites BUDAlloc: Defeating Use-After-Free Bugs by Decoupling Virtual Address Management from Kernel
  • PICASSO: Scaling CHERI Use-After-Free Protection to Millions of Allocations using Colored Capabilities cites MarkUs: Drop-in use-after-free prevention for low-level languages
  • PICASSO: Scaling CHERI Use-After-Free Protection to Millions of Allocations using Colored Capabilities cites Cornucopia: Temporal Safety for CHERI Heaps
  • PICASSO: Scaling CHERI Use-After-Free Protection to Millions of Allocations using Colored Capabilities cites Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • PICASSO: Scaling CHERI Use-After-Free Protection to Millions of Allocations using Colored Capabilities cites FreeGuard: A Faster Secure Heap Allocator
  • Cornucopia: Temporal Safety for CHERI Heaps cites MarkUs: Drop-in use-after-free prevention for low-level languages
  • Cornucopia: Temporal Safety for CHERI Heaps cites Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • Cornucopia: Temporal Safety for CHERI Heaps cites FreeGuard: A Faster Secure Heap Allocator
  • Sticky Tags: Efficient and Deterministic Spatial Memory Error Mitigation using Persistent Memory Tags cites Preventing Use-After-Free Attacks with Fast Forward Allocation
  • Sticky Tags: Efficient and Deterministic Spatial Memory Error Mitigation using Persistent Memory Tags cites MarkUs: Drop-in use-after-free prevention for low-level languages
  • Sticky Tags: Efficient and Deterministic Spatial Memory Error Mitigation using Persistent Memory Tags cites Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • StarMalloc: Verifying a Modern, Hardened Memory Allocator cites Preventing Use-After-Free Attacks with Fast Forward Allocation
  • StarMalloc: Verifying a Modern, Hardened Memory Allocator cites FreeGuard: A Faster Secure Heap Allocator
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers15

  1. Sticky Tags: Efficient and Deterministic Spatial Memory Error Mitigation using Persistent Memory TagsFloris Gorter, Taddeus Kroes, Herbert Bos, Cristiano GiuffridaS&P 2024 · 22 citations
  2. BUDAlloc: Defeating Use-After-Free Bugs by Decoupling Virtual Address Management from KernelJunho Ahn, Jaehyeon Lee, Kanghyuk Lee, Wooseok Gwak et al.USENIX Security 2024 · 6 citations
  3. PICASSO: Scaling CHERI Use-After-Free Protection to Millions of Allocations using Colored CapabilitiesMerve Gülmez, Ruben Sturm, Hossam ElAtali, Håkan Englund et al.USENIX Security 2026 · 5 citations
  4. StarMalloc: Verifying a Modern, Hardened Memory AllocatorAntonin Reitz, Aymeric Fromherz, Jonathan ProtzenkoOOPSLA 2024 · 5 citations
  5. PoisonCap: Efficient Hierarchical Temporal Safety for CHERIYuecheng Wang, Jonathan Woodruff, Alfredo Mazzinghi, Peter Rugg et al.CCS 2026 · 3 citations

Builds on8

  1. Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling PointersThurston H. Y. Dang, Petros Maniatis, David A. WagnerUSENIX Security 2017 · 77 citations
  2. Cornucopia: Temporal Safety for CHERI HeapsNathaniel Wesley Filardo, Brett F. Gutstein, Jonathan Woodruff, Sam Ainsworth et al.S&P 2020 · 71 citations
  3. FreeGuard: A Faster Secure Heap AllocatorSam Silvestro, Hongyu Liu, Corey Crosser, Zhiqiang Lin et al.CCS 2017 · 71 citations
  4. MarkUs: Drop-in use-after-free prevention for low-level languagesSam Ainsworth, Timothy M. JonesS&P 2020 · 63 citations
  5. Preventing Use-After-Free Attacks with Fast Forward AllocationBrian Wickman, Hong Hu, Insu Yun, Daehee Jang et al.USENIX Security 2021 · 53 citations

Related papers

  1. A Robust and Efficient Defense against Use-after-Free Exploits via Concurrent Pointer SweepingDaiping Liu, Mingwei Zhang, Haining WangCCS 2018 · 43 citations
  2. PUMM: Preventing Use-After-Free Using Execution Unit PartitioningCarter Yagemann, Simon P. Chung, Brendan Saltaformaggio, Wenke LeeUSENIX Security 2023
  3. SwiftSweeper: Defeating Use-After-Free Bugs Using Memory Sweeper Without Stop-the-WorldJunho Ahn, Kanghyuk Lee, Chanyoung Park, Hyungon Moon et al.S&P 2025
  4. Efficient Use-After-Free Prevention with Opportunistic Page-Level SweepingChanyoung Park, Hyungon MoonNDSS 2024
  5. FreeWill: Automatically Diagnosing Use-after-free Bugs via Reference Miscounting Detection on BinariesLiang He, Hong Hu, Purui Su, Yan Cai et al.USENIX Security 2022
Dusk over the sea between two cliffs drawn in fine vertical lines