What Is a Buffer Overflow?
- A buffer is a fixed-size region of memory, e.g.
char buf[64];. - An overflow happens when a program writes past the end of that buffer.
- The extra bytes land on adjacent memory — other variables, saved registers, the return address.
Root cause: an unbounded copy — the amount written is driven by the input, not by the buffer size.
Key Takeaway
Overflow = data size is controlled by the attacker, but the destination size is fixed and smaller.