Lune

S&P2020Top-tier venue

MarkUs: Drop-in use-after-free prevention for low-level languages

Sam Ainsworth, Timothy M. Jones

Abstract

Use-after-free vulnerabilities have plagued software written in low-level languages, such as C and C++, becoming one of the most frequent classes of exploited software bugs. Attackers identify code paths where data is manually freed by the programmer, but later incorrectly reused, and take advantage by reallocating the data to themselves. They then alter the data behind the program’s back, using the erroneous reuse to gain control of the application and, potentially, the system. While a variety of techniques have been developed to deal with these vulnerabilities, they often have unacceptably high performance or memory overheads, especially in the worst case.We have designed MarkUs, a memory allocator that prevents this form of attack at low overhead, sufficient for deployment in real software, even under allocation- and memory-intensive scenarios. We prevent use-after-free attacks by quarantining data freed by the programmer and forbidding its reallocation until we are sure that there are no dangling pointers targeting it. To identify these we traverse live-objects accessible from registers and memory, marking those we encounter, to check whether quarantined data is accessible from any currently allocated location. Unlike garbage collection, which is unsafe in C and C++, MarkUs ensures safety by only freeing data that is both quarantined by the programmer and has no identifiable dangling pointers. The information provided by the programmer’s allocations and frees further allows us to optimise the process by freeing physical addresses early for large objects, specialising analysis for small objects, and only performing marking when sufficient data is in quarantine. Using MarkUs, we reduce the overheads of temporal safety in low-level languages to 1.1× on average for SPEC CPU2006, with a maximum slowdown of only 2×, vastly improving upon the state-of-the-art.

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.

28 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 A Robust and Efficient Defense against Use-after-Free Exploits via Concurrent Pointer Sweeping
  • Preventing Use-After-Free Attacks with Fast Forward Allocation cites CRCount: Pointer Invalidation with Reference Counting to Mitigate Use-after-free in Legacy C/C++
  • 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
  • Fat Pointers for Temporal Memory Safety of C cites Preventing Use-After-Free Attacks with Fast Forward Allocation
  • Fat Pointers for Temporal Memory Safety of C cites A Robust and Efficient Defense against Use-after-Free Exploits via Concurrent Pointer Sweeping
  • Fat Pointers for Temporal Memory Safety of C cites CRCount: Pointer Invalidation with Reference Counting to Mitigate Use-after-free in Legacy C/C++
  • Fat Pointers for Temporal Memory Safety of C cites Cornucopia: Temporal Safety for CHERI Heaps
  • Fat Pointers for Temporal Memory Safety of C cites Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • Fat Pointers for Temporal Memory Safety of C cites FreeGuard: A Faster Secure Heap Allocator
  • CRCount: Pointer Invalidation with Reference Counting to Mitigate Use-after-free in Legacy C/C++ cites Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • CRCount: Pointer Invalidation with Reference Counting to Mitigate Use-after-free in Legacy C/C++ cites FreeGuard: A Faster Secure Heap Allocator
  • Cryptographic Capability Computing cites A Robust and Efficient Defense against Use-after-Free Exploits via Concurrent Pointer Sweeping
  • Cryptographic Capability Computing cites Cornucopia: Temporal Safety for CHERI Heaps
  • Cornucopia: Temporal Safety for CHERI Heaps cites A Robust and Efficient Defense against Use-after-Free Exploits via Concurrent Pointer Sweeping
  • Cornucopia: Temporal Safety for CHERI Heaps cites CRCount: Pointer Invalidation with Reference Counting to Mitigate Use-after-free in Legacy C/C++
  • 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 Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers28

  1. Cornucopia: Temporal Safety for CHERI HeapsNathaniel Wesley Filardo, Brett F. Gutstein, Jonathan Woodruff, Sam Ainsworth et al.S&P 2020 · 71 citations
  2. Preventing Use-After-Free Attacks with Fast Forward AllocationBrian Wickman, Hong Hu, Insu Yun, Daehee Jang et al.USENIX Security 2021 · 53 citations
  3. Cryptographic Capability ComputingMichael LeMay, Joydeep Rakshit, Sergej Deutsch, David M. Durham et al.MICRO 2021 · 29 citations
  4. Sticky Tags: Efficient and Deterministic Spatial Memory Error Mitigation using Persistent Memory TagsFloris Gorter, Taddeus Kroes, Herbert Bos, Cristiano GiuffridaS&P 2024 · 22 citations
  5. Fat Pointers for Temporal Memory Safety of CJie Zhou, John Criswell, Michael HicksOOPSLA 2023 · 17 citations

Builds on4

  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. FreeGuard: A Faster Secure Heap AllocatorSam Silvestro, Hongyu Liu, Corey Crosser, Zhiqiang Lin et al.CCS 2017 · 71 citations
  3. A Robust and Efficient Defense against Use-after-Free Exploits via Concurrent Pointer SweepingDaiping Liu, Mingwei Zhang, Haining WangCCS 2018 · 43 citations
  4. CRCount: Pointer Invalidation with Reference Counting to Mitigate Use-after-free in Legacy C/C++Jangseop Shin, Donghyun Kwon, Jiwon Seo, Yeongpil Cho et al.NDSS 2019 · 37 citations

Related papers

  1. MineSweeper: a "clean sweep" for drop-in use-after-free preventionMárton Erdos, Sam Ainsworth, Timothy M. JonesASPLOS 2022 · 13 citations
  2. PUMM: Preventing Use-After-Free Using Execution Unit PartitioningCarter Yagemann, Simon P. Chung, Brendan Saltaformaggio, Wenke LeeUSENIX Security 2023
  3. Efficient Use-After-Free Prevention with Opportunistic Page-Level SweepingChanyoung Park, Hyungon MoonNDSS 2024
  4. ShadowBound: Efficient Heap Memory Protection Through Advanced Metadata Management and Customized Compiler OptimizationZheng Yu, Ganxiang Yang, Xinyu XingUSENIX Security 2024 · 13 citations
  5. Safeslab: Mitigating Use-After-Free Vulnerabilities via Memory Protection KeysMarius Momeu, Simon Schnückel, Kai Angnis, Michalis Polychronakis et al.CCS 2024 · 3 citations
Dusk over the sea between two cliffs drawn in fine vertical lines