Buffer Overflow

Why does a stack buffer overflow potentially allow an attacker to execute arbitrary code?

A

Stack buffers are always mapped as executable, so any data written there runs as code

B

Overflowing the buffer corrupts the heap, which stores function pointers

C

Writing past a stack buffer can overwrite the return address, redirecting execution

D

The overflow triggers a segfault that the attacker can catch and redirect