Fat Pointers for Temporal Memory Safety of C
Jie Zhou, John Criswell, Michael Hicks
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 10 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Top of the Heap: Efficient Memory Error Protection of Safe Heap Objects 引用了 PtrSplit: Supporting General Pointers in Automatic Program Partitioning
- Top of the Heap: Efficient Memory Error Protection of Safe Heap Objects 引用了 FreeGuard: A Faster Secure Heap Allocator
- SoK: Challenges and Paths Toward Memory Safety for eBPF 引用了 PtrSplit: Supporting General Pointers in Automatic Program Partitioning
- SoK: Challenges and Paths Toward Memory Safety for eBPF 引用了 Top of the Heap: Efficient Memory Error Protection of Safe Heap Objects
- Cornucopia: Temporal Safety for CHERI Heaps 引用了 Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
- Cornucopia: Temporal Safety for CHERI Heaps 引用了 FreeGuard: A Faster Secure Heap Allocator
- Safeslab: Mitigating Use-After-Free Vulnerabilities via Memory Protection Keys 引用了 Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
- Safeslab: Mitigating Use-After-Free Vulnerabilities via Memory Protection Keys 引用了 FreeGuard: A Faster Secure Heap Allocator
- Cpp2Rust: Automatic Translation of C++ to Safe Rust 引用了 FreeGuard: A Faster Secure Heap Allocator
引用它的顶会 Paper10
- Top of the Heap: Efficient Memory Error Protection of Safe Heap ObjectsKaiming Huang, Mathias Payer, Zhiyun Qian, Jack Sampson 等CCS 2024 · 3 次引用
- Safeslab: Mitigating Use-After-Free Vulnerabilities via Memory Protection KeysMarius Momeu, Simon Schnückel, Kai Angnis, Michalis Polychronakis 等CCS 2024 · 3 次引用
- Cpp2Rust: Automatic Translation of C++ to Safe RustLucian Popescu, Francisco Gouveia, Henrique Preto, João Silveira 等PLDI 2026 · 1 次引用
- SoK: Challenges and Paths Toward Memory Safety for eBPFKaiming Huang, Mathias Payer, Zhiyun Qian, Jack Sampson 等S&P 2025
- Adding Spatial Memory Safety to EDK II through Checked C (Experience Paper)Sourag Cherupattamoolayil, Arunkumar Bhattar, Connor Glosner, Aravind MachiryISSTA 2025
它引用的 Paper15
- PtrSplit: Supporting General Pointers in Automatic Program PartitioningShen Liu, Gang Tan, Trent JaegerCCS 2017 · 83 次引用
- How do programmers use unsafe rust?Vytautas Astrauskas, Christoph Matheja, Federico Poli, Peter Müller 等OOPSLA 2020 · 78 次引用
- Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling PointersThurston H. Y. Dang, Petros Maniatis, David A. WagnerUSENIX Security 2017 · 77 次引用
- Cornucopia: Temporal Safety for CHERI HeapsNathaniel Wesley Filardo, Brett F. Gutstein, Jonathan Woodruff, Sam Ainsworth 等S&P 2020 · 71 次引用
- FreeGuard: A Faster Secure Heap AllocatorSam Silvestro, Hongyu Liu, Corey Crosser, Zhiqiang Lin 等CCS 2017 · 71 次引用
相关 Paper
- In-fat pointer: hardware-assisted tagged-pointer spatial memory safety defense with subobject granularity protectionShengjie Xu, Wei Huang, David LieASPLOS 2021 · 26 次引用
- Catamaran: Low-Overhead Memory Safety Enforcement via Parallel AccelerationYiyu Zhang, Tianyi Liu, Zewen Sun, Zhe Chen 等ISSTA 2023 · 3 次引用
- C to checked C by 3cAravind Machiry, John H. Kastner, Matt McCutchen, Aaron Eline 等OOPSLA 2022 · 20 次引用
- Look Before You Access: Efficient Heap Memory Safety for Embedded Systems on ARMv8-MJeonghwan Kang, Jaeyeol Park, Jiwon Seo, Donghyun KwonDAC 2024 · 1 次引用
- PACMem: Enforcing Spatial and Temporal Memory Safety via ARM Pointer AuthenticationYuan Li, Wende Tan, Zhizheng Lv, Songtao Yang 等CCS 2022 · 30 次引用
