Fat Pointers for Temporal Memory Safety of C

08/27/2022
by   Jie Zhou, et al.
0

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

READ FULL TEXT
research
02/17/2022

PACSafe: Leveraging ARM Pointer Authentication for Memory Safety in C/C++

Memory safety bugs remain in the top ranks of security vulnerabilities, ...
research
03/29/2021

SafeDrop: Detecting Memory Deallocation Bugs of Rust Programs via Static Data-Flow Analysis

Rust is an emerging programming language that aims to prevent memory-saf...
research
10/31/2022

Unsafe's Betrayal: Abusing Unsafe Rust in Binary Reverse Engineering via Machine Learning

Memory-safety bugs introduce critical software-security issues. Rust pro...
research
02/15/2023

Field-sensitive Data Flow Integrity

Although numerous defenses against memory vulnerability exploits have be...
research
08/19/2021

MESH: A Memory-Efficient Safe Heap for C/C++

While memory corruption bugs stemming from the use of unsafe programming...
research
06/05/2019

Practical Byte-Granular Memory Blacklisting using Califorms

Recent rapid strides in memory safety tools and hardware have improved s...
research
04/06/2022

Fast Fuzzing for Memory Errors

Greybox fuzzing is a proven effective testing method for the detection o...

Please sign up or login with your details

Forgot password? Click here to reset