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.

Security Operations · Intermediate

Buffer Overflow

Writing more data into a memory buffer than it can hold, overwriting adjacent memory and potentially enabling code execution.

Definition

Stack and heap overflows can overwrite return addresses or function pointers, letting attackers redirect execution to injected shellcode or ROP chains. Languages without bounds checking, such as C and C++, are most affected. Mitigations include input validation, ASLR, DEP/NX, stack canaries and memory-safe languages.

Example

A long input string overwriting the saved return address in a vulnerable C program.

Exam tip

ASLR and DEP are the OS-level mitigations; input validation is the code-level answer.

Don't confuse it with

Related terms