Simple PWN - 0x17(UAF - leak information)
tags: CTF PWN eductf
Version: Ubuntu 20.04
UAF backgroud
Original Code
1 | |
If we set the pointer to NULL after it was freed, then we can get some vital info. from this chunk.
Analyze
- After malloc all pointer

- After free
p1
- After free
p2, the data section will transfer to store metadata, andfdstore the address ofp1header

- Thus, we print out the value of
p2, we will leak something if it wasn’t setNULLafter it was freed
