Glossary
Use-after-free
A memory-safety bug where a program keeps using a pointer after the memory it points to has been freed, often leading to type confusion (CWE-416).
A use-after-free (UAF, CWE-416) occurs when code reads or writes through a pointer whose object has already been released. The allocator may have handed that memory to a different object, so the program ends up interpreting unrelated data as its own structure, including fields such as function pointers. That type confusion is why UAF is among the most serious bug classes in browsers, kernels and other large C and C++ code bases.
Root causes are usually unclear ownership, callbacks that outlive their context, and caches or iterators holding stale references. AddressSanitizer detects UAF with its quarantine; ownership types and memory-safe languages prevent it. See heap corruption and use-after-free.