use-after-free
termprogrammingsecurityhacking
Using a pointer to memory that has already been released, back when it still meant something.
The pointer is now dangling: the allocator may have handed that block to something else entirely, so the program is reading or writing another object's data through the wrong lens. It is more dangerous than a plain crash because the contents are attacker-influenceable if they can control what gets allocated into the freed space, which makes it a mainstay of modern browser and kernel exploitation, and the reason double-free is treated as its sibling. Defenses are ownership discipline, setting pointers to null after freeing, hardened allocators, and ultimately languages that make the pattern unrepresentable. It is CWE-416.
Also known as: UAF, dangling pointer, CWE-416