Lune

USENIX Security2021Top-tier venue

Preventing Use-After-Free Attacks with Fast Forward Allocation

Brian Wickman, Hong Hu, Insu Yun, Daehee Jang, Jungwon Lim, Sanidhya Kashyap, Taesoo Kim

Abstract

Memory-unsafe languages are widely used to implement critical systems like kernels and browsers, leading to thousands of memory safety issues every year. A use-after-free bug is a temporal memory error where the program accidentally visits a freed memory location. Recent studies show that useafter-free is one of the most exploited memory vulnerabilities. Unfortunately, previous efforts to mitigate use-after-free bugs are not widely deployed in real-world programs due to either inadequate accuracy or high performance overhead. In this paper, we propose to resurrect the idea of one-time allocation (OTA) and provide a practical implementation with efficient execution and moderate memory overhead. With onetime allocation, the memory manager always returns a distinct memory address for each request. Since memory locations are not reused, attackers cannot reclaim freed objects, and thus cannot exploit use-after-free bugs. We utilize two techniques to render OTA practical: batch page management and the fusion of bump-pointer and fixed-size bins memory allocation styles. Batch page management helps reduce the number of system calls which negatively impact performance, while blending the two allocation methods mitigates the memory overhead and fragmentation issues. We implemented a prototype, called FFmalloc, to demonstrate our techniques. We evaluated FFmalloc on widely used benchmarks and real-world large programs. FFmalloc successfully blocked all tested useafter-free attacks while introducing moderate overhead. The results show that OTA can be a strong and practical solution to thwart use-after-free threats.

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.

26 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

  • Guarder: A Tunable Secure Allocator cites FreeGuard: A Faster Secure Heap Allocator
  • 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 Guarder: A Tunable Secure Allocator
  • Fat Pointers for Temporal Memory Safety of C cites MarkUs: Drop-in use-after-free prevention for low-level languages
  • 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
  • ShadowBound: Efficient Heap Memory Protection Through Advanced Metadata Management and Customized Compiler Optimization cites A Robust and Efficient Defense against Use-after-Free Exploits via Concurrent Pointer Sweeping
  • ShadowBound: Efficient Heap Memory Protection Through Advanced Metadata Management and Customized Compiler Optimization cites Guarder: A Tunable Secure Allocator
  • ShadowBound: Efficient Heap Memory Protection Through Advanced Metadata Management and Customized Compiler Optimization cites MarkUs: Drop-in use-after-free prevention for low-level languages
  • ShadowBound: Efficient Heap Memory Protection Through Advanced Metadata Management and Customized Compiler Optimization cites Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • ShadowBound: Efficient Heap Memory Protection Through Advanced Metadata Management and Customized Compiler Optimization cites FreeGuard: A Faster Secure Heap Allocator
  • MarkUs: Drop-in use-after-free prevention for low-level languages cites A Robust and Efficient Defense against Use-after-Free Exploits via Concurrent Pointer Sweeping
  • 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
  • Mitigating Information Leakage Vulnerabilities with Type-based Data Isolation cites MarkUs: Drop-in use-after-free prevention for low-level languages
  • Mitigating Information Leakage Vulnerabilities with Type-based Data Isolation cites FreeGuard: A Faster Secure Heap Allocator
  • CAMP: Compiler and Allocator-based Heap Memory Protection cites MarkUs: Drop-in use-after-free prevention for low-level languages
  • CAMP: Compiler and Allocator-based Heap Memory Protection cites Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • CAMP: Compiler and Allocator-based Heap Memory Protection cites FreeGuard: A Faster Secure Heap Allocator
  • 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 Mitigating Information Leakage Vulnerabilities with Type-based Data Isolation
  • 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 papers26

  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. Fat Pointers for Temporal Memory Safety of CJie Zhou, John Criswell, Michael HicksOOPSLA 2023 · 17 citations
  3. Mitigating Information Leakage Vulnerabilities with Type-based Data IsolationAlyssa Milburn, Erik van der Kouwe, Cristiano GiuffridaS&P 2022 · 16 citations
  4. CAMP: Compiler and Allocator-based Heap Memory ProtectionZhenpeng Lin, Zheng Yu, Ziyi Guo, Simone Campanoni et al.USENIX Security 2024 · 14 citations
  5. ShadowBound: Efficient Heap Memory Protection Through Advanced Metadata Management and Customized Compiler OptimizationZheng Yu, Ganxiang Yang, Xinyu XingUSENIX Security 2024 · 13 citations

Builds on7

  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. MarkUs: Drop-in use-after-free prevention for low-level languagesSam Ainsworth, Timothy M. JonesS&P 2020 · 63 citations
  4. A Robust and Efficient Defense against Use-after-Free Exploits via Concurrent Pointer SweepingDaiping Liu, Mingwei Zhang, Haining WangCCS 2018 · 43 citations
  5. Guarder: A Tunable Secure AllocatorSam Silvestro, Hongyu Liu, Tianyi Liu, Zhiqiang Lin et al.USENIX Security 2018 · 39 citations

Related papers

  1. 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
  2. SeMalloc: Semantics-Informed Memory AllocatorRuizhe Wang, Meng Xu, N. AsokanCCS 2024
  3. PUMM: Preventing Use-After-Free Using Execution Unit PartitioningCarter Yagemann, Simon P. Chung, Brendan Saltaformaggio, Wenke LeeUSENIX Security 2023
  4. MineSweeper: a "clean sweep" for drop-in use-after-free preventionMárton Erdos, Sam Ainsworth, Timothy M. JonesASPLOS 2022 · 13 citations
  5. DMGuard: Safeguarding Kernels from Physical-Page Use-After-Free VulnerabilitiesJuhee Kim, Jaeyoung Chung, Dae R. Jeong, Byoungyoung LeeUSENIX Security 2026
Dusk over the sea between two cliffs drawn in fine vertical lines