Buffer overflow attack
(also buffer overflow, buffer overrun, buffer overflow exploit)
Buffer overflow attack definition
A security exploit where the attacker deliberately overloads a program’s buffer (temporary storage used when moving data) to make it overwrite adjacent memory locations. This can change the app’s execution path, resulting in damaged files or exposure of sensitive data. In some cases, attackers can even insert sophisticated malicious scripts into a program’s executable code.
Real buffer overflow attack examples
1988: The Morris Worm accidentally crashed ARPANET (the precursor to the internet) as the result of a buffer overflow attack.
2019: Hackers exploited voice-over-internet protocol vulnerabilities to carry out a successful buffer overflow attack on WhatsApp and inject malware into many users’ devices.
Stopping a buffer overflow attack
- Employ bounds-checking for buffers and enforce it at runtime.
- Avoid standard library functions that have not been bounds-checked when writing code.
- Test the code for buffer overflows and patch out any bugs that cause them.