Fat Pointers for Temporal Memory Safety of C

Jie Zhou, John Criswell, Michael Hicks
8/27/2022
cs.CR

Official code: checkedc/checkedc (3,264 stars, C, last commit 2024-10-07).

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.

Show full abstract

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 disjoint-metadata 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.

View on arXivView PDF

Code Implementations(1)

checkedc/checkedcOfficial100%

Checked C is an extension to C that lets programmers write C code with bounds checking and improved type-safety. The goal is to let people easily make their existing C code type-safe and eliminate entire classes of errors.

3,264189C, TeXFeb 23, 20162 years agoNOASSERTION
cclangllvmmemory-safetyprogramming-language+2 more

Similar Papers

Cite this paper

@article{zhou2022pointers,
  title  = {Fat Pointers for Temporal Memory Safety of C},
  author = {Jie Zhou and John Criswell and Michael Hicks},
  year   = {2022},
  eprint = {2208.12900},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2208.12900}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2208.12900.svg)](https://codeofpaper.com/paper/2208.12900)

Discussion