A buffer overflow is
|“||[a] condition at an interface under which more input can be placed into a buffer or data holding area than the capacity allocated, overwriting other information. Attackers exploit such a condition to crash a system or to insert specially crafted code that allows them to gain control of the system.||”|
|“||[a] software bug that occurs when a program moves data into a space in memory, but there is not enough room in memory to store that data. The program may discard characters to try to make space for the new data. Destroying these characters can cause all sorts of problems, and often can allow things to happen which affect the integrity or security of the program. Buffer overflows can be avoided (if you are programming) by checking that there is sufficient spaced in memory before doing a move.||”|
The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without checking its length at all. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
|“|| Buffer overflow vulnerabilities are the result of programmer error. This usually happens because the programmer only considered what should happen and what could happen by mistake, but not all the "out of the box" possibilities such as entering a 2,000-character-last name.
Buffer overflows result when a program tries to write more data into a buffer than the space allocated in memory. The "extra" data then overwrite adjacent memory and ultimately result in abnormal operation of the program. A careful and successful memory overwrite can cause the program to begin execution of actual code submitted by the attacker. Most exploit code allows the attacker to create an interactive session and send commands with the privileges of the program with the buffer overflow. When network protocols have been implemented without validating the input values, these protocols can be vulnerable to buffer overflow attacks.
- ↑ NIST Special Publication 800-28, ver. 2, at C-1.
- ↑ Information Technology Security Handbook, Annex 1, Glossary.
- ↑ Common Cybersecurity Vulnerabilities in Industrial Control Systems, at 12-13.