thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Application & OT Security · Intermediate

Stack-Based Buffer Overflow

Writing past the end of a buffer allocated on the call stack, which can overwrite the saved return address and hijack execution.

Definition

Caused by unbounded copies into fixed-size local arrays in languages like C. Modern mitigations include stack canaries, DEP/NX, ASLR, shadow stacks and bounds-checked APIs, but the root fix is bounds checking or a memory-safe language. Tracked as CWE-121.

Example

Copying a 500-byte network field into a 64-byte local array with strcpy.

Exam tip

Canaries detect stack smashing; bounds checking prevents it.

Related terms