Lune

OOPSLA2023Top-tier venue

Fat Pointers for Temporal Memory Safety of C

Jie Zhou, John Criswell, Michael Hicks

Abstract

Temporal memory safety bugs, especially use-after-free and double free bugs, pose a major security threat to C programs. Real-world exploits utilizing these bugs enable attackers to read and write arbitrary memory locations, causing disastrous violations of confidentiality, integrity, and availability. Many previous solutions retrofit temporal memory safety to C, but they all either incur high performance overhead and/or miss detecting certain types of temporal memory safety bugs.

In this paper, we propose a temporal memory safety solution that is both efficient and comprehensive. Specifically, we extend Checked C, a spatially-safe extension to C, with temporally-safe pointers. These are implemented by combining two techniques: fat pointers and dynamic key-lock checks. We show that the fat-pointer solution significantly improves running time and memory overhead compared to the disjointmetadata approach that provides the same level of protection. With empirical program data and hands-on experience porting real-world applications, we also show that our solution is practical in terms of backward compatibility-one of the major complaints about fat pointers.

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.

10 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

  • Top of the Heap: Efficient Memory Error Protection of Safe Heap Objects cites PtrSplit: Supporting General Pointers in Automatic Program Partitioning
  • Top of the Heap: Efficient Memory Error Protection of Safe Heap Objects cites FreeGuard: A Faster Secure Heap Allocator
  • SoK: Challenges and Paths Toward Memory Safety for eBPF cites PtrSplit: Supporting General Pointers in Automatic Program Partitioning
  • SoK: Challenges and Paths Toward Memory Safety for eBPF cites Top of the Heap: Efficient Memory Error Protection of Safe Heap Objects
  • 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
  • Safeslab: Mitigating Use-After-Free Vulnerabilities via Memory Protection Keys cites Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • Safeslab: Mitigating Use-After-Free Vulnerabilities via Memory Protection Keys cites FreeGuard: A Faster Secure Heap Allocator
  • Cpp2Rust: Automatic Translation of C++ to Safe Rust cites FreeGuard: A Faster Secure Heap Allocator
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers10

  1. Top of the Heap: Efficient Memory Error Protection of Safe Heap ObjectsKaiming Huang, Mathias Payer, Zhiyun Qian, Jack Sampson et al.CCS 2024 · 3 citations
  2. Safeslab: Mitigating Use-After-Free Vulnerabilities via Memory Protection KeysMarius Momeu, Simon Schnückel, Kai Angnis, Michalis Polychronakis et al.CCS 2024 · 3 citations
  3. Cpp2Rust: Automatic Translation of C++ to Safe RustLucian Popescu, Francisco Gouveia, Henrique Preto, João Silveira et al.PLDI 2026 · 1 citation
  4. SoK: Challenges and Paths Toward Memory Safety for eBPFKaiming Huang, Mathias Payer, Zhiyun Qian, Jack Sampson et al.S&P 2025
  5. Adding Spatial Memory Safety to EDK II through Checked C (Experience Paper)Sourag Cherupattamoolayil, Arunkumar Bhattar, Connor Glosner, Aravind MachiryISSTA 2025

Builds on15

  1. PtrSplit: Supporting General Pointers in Automatic Program PartitioningShen Liu, Gang Tan, Trent JaegerCCS 2017 · 83 citations
  2. How do programmers use unsafe rust?Vytautas Astrauskas, Christoph Matheja, Federico Poli, Peter Müller et al.OOPSLA 2020 · 78 citations
  3. Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling PointersThurston H. Y. Dang, Petros Maniatis, David A. WagnerUSENIX Security 2017 · 77 citations
  4. Cornucopia: Temporal Safety for CHERI HeapsNathaniel Wesley Filardo, Brett F. Gutstein, Jonathan Woodruff, Sam Ainsworth et al.S&P 2020 · 71 citations
  5. FreeGuard: A Faster Secure Heap AllocatorSam Silvestro, Hongyu Liu, Corey Crosser, Zhiqiang Lin et al.CCS 2017 · 71 citations

Related papers

  1. In-fat pointer: hardware-assisted tagged-pointer spatial memory safety defense with subobject granularity protectionShengjie Xu, Wei Huang, David LieASPLOS 2021 · 26 citations
  2. Catamaran: Low-Overhead Memory Safety Enforcement via Parallel AccelerationYiyu Zhang, Tianyi Liu, Zewen Sun, Zhe Chen et al.ISSTA 2023 · 3 citations
  3. C to checked C by 3cAravind Machiry, John H. Kastner, Matt McCutchen, Aaron Eline et al.OOPSLA 2022 · 20 citations
  4. Look Before You Access: Efficient Heap Memory Safety for Embedded Systems on ARMv8-MJeonghwan Kang, Jaeyeol Park, Jiwon Seo, Donghyun KwonDAC 2024 · 1 citation
  5. PACMem: Enforcing Spatial and Temporal Memory Safety via ARM Pointer AuthenticationYuan Li, Wende Tan, Zhizheng Lv, Songtao Yang et al.CCS 2022 · 30 citations
Dusk over the sea between two cliffs drawn in fine vertical lines