CyberGlossary

Vulnerabilities

Stack Overflow Vulnerability

Also known as: Stack buffer overflow, Stack smashing

Definition

A buffer overflow that occurs on the program stack, typically overwriting the saved return address or local function pointers to redirect execution.

A stack overflow vulnerability is the historical archetype of memory-corruption exploits: an unchecked write into a stack-allocated buffer overruns into the function's saved frame pointer or return address, allowing an attacker to redirect control flow to attacker-controlled bytes (shellcode or ROP gadgets). Defences include stack canaries (StackGuard, /GS), non-executable stacks (DEP/NX), address-space layout randomization (ASLR), shadow stacks and Intel CET, plus compiler-level FORTIFY_SOURCE and safer string handling. Despite decades of mitigation, classic stack overflows still appear in firmware, IoT, and legacy software, and remain a regular subject of CVEs and CTF challenges.

Examples

  • CVE-2003-0352 (DCOM RPC) — Blaster worm leveraged a stack overflow.
  • CVE-2019-0708 (BlueKeep) — Remote Desktop service stack overflow.

Related terms