Also known as: UAF · dangling pointer
A use-after-free is a memory-safety vulnerability in which a program continues to use a pointer to memory that has already been released, allowing an attacker who can control what occupies that memory to influence program behaviour.
Exploitation typically involves heap grooming: the attacker arranges for a controlled object to be allocated into the freed region, so that the stale pointer now references attacker-supplied data. Depending on the object type, this can yield anything from an information leak to full code execution.
Use-after-free bugs are notoriously difficult to find through testing because they depend on allocation timing and may appear to work correctly most of the time. They are among the most common vulnerability classes in large C and C++ codebases.
Memory Safety
Memory safety is the property of a program being unable to access memory outside the bounds of what it legitimately owns, preventing entire vulnerability classes such as buffer overflows, use-after-free, and data races.
Buffer Overflow
A buffer overflow is a memory-safety vulnerability in which a program writes more data into a fixed-size memory buffer than it can hold, corrupting adjacent memory and potentially allowing an attacker to alter program execution.
Remote Code Execution
Remote code execution (RCE) is a class of vulnerability that allows an attacker to run arbitrary code on a target system over a network, without physical access to that machine.
Rust
Rust is a systems programming language that guarantees memory safety without garbage collection, using a compile-time ownership and borrowing model to eliminate entire classes of bugs including use-after-free and data races.
Kernel
The kernel is the core of an operating system, responsible for managing memory, scheduling processes, and mediating all access between software and hardware. The Linux kernel is the component that makes a system 'Linux'.