What Is a Buffer Overflow?

Most of the new exploits are based on buffer overflow attacks. A buffer overflow attack is when an attacker tries to store too much information in an undersized receptacle. A common implementation is when a user of the program gives the program more data than the developers of the program allocated to store it. For example, let’s say that a programmer only allocates enough memory for a variable to hold 10 characters and someone tries to have that variable hold 20 characters. As in this case, the main cause of buffer overflow problems is not having proper bounds checking in the software.

An example of a buffer overflow is a program that is only expecting a string of 50 characters and the user enters 100 characters. ...

Get Hackers Beware now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.