Class 09 · KP 05 / 25
Allocated vs. Free Chunk Layout
glibc heap: a dangling pointer to a freed chunk becomes a read/write primitive.- When a chunk is freed, malloc overwrites the first bytes of the old user data with list pointers (
fd/bk). - Those pointers form the free lists (bins). Controlling them means controlling where malloc allocates next.