Use-After-Free
Use-after-free is dereferencing a pointer to already-freed memory, potentially reading attacker-controlled data or achieving code execution.
Purpose
To understand UAF vulnerability mechanics and defenses; a common high-severity vulnerability in C/C++ browsers and kernels.
Mechanism
After free, the pointer is not nulled; later dereferences access reclaimed memory. If an attacker controls that memory content via heap spraying, they can forge object vtables for code execution. Defenses: null the pointer, smart pointers, heap isolation.
Use cases
- Browser vulnerability analysis
- Kernel security audit
- Memory safety