Skip to content

Glossary

Stack

A LIFO memory region that grows downward, used for return addresses, local variables, and saved registers during function calls.

The stack is a last-in-first-out (LIFO) region of memory managed by the CPU's stack pointer register (RSP on x86-64). It grows toward lower addresses: PUSH decrements RSP and writes data; POP reads data and increments RSP. Each function call creates a stack frame holding the return address, saved registers, and local variables. The layout of a stack frame is dictated by the calling convention in use. Stack overflows caused by writing beyond a buffer on the stack are one of the most classic vulnerability classes in binary exploitation.