Buffer (empty) Buffer (payload) Canary Saved frame ptr Return address Overwritten (corrupted)
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Stack Buffer Overflow: Smashing the Return Address

A stack buffer overflow happens when a program copies more bytes into a fixed-size local buffer than it can hold, and the excess bleeds into whatever memory sits right after it on the call stack. This simulator renders that stack layout as a real 3D column of memory cells — buffer, canary, saved frame pointer, return address — and lets you drag a payload-length slider past the buffer boundary to watch the overflow physically climb through each region. Toggle a stack canary to see the classic mitigation catch the corruption before the vulnerable function returns, or toggle ASLR to see why a hijacked return address alone is not enough for a reliable exploit once the stack's base address is randomized.