
In a classic buffer overflow exploit, the attacker sends data to a program, which it stores in an undersized stack buffer. Nevertheless, attackers have managed to identify buffer overflows in a staggering array of products and components. Part of the problem is due to the wide variety of ways buffer overflows can occur, and part is due to the error-prone techniques often used to prevent them.īuffer overflows are not easy to discover and even when one is discovered, it is generally extremely difficult to exploit.

Most software developers know what a buffer overflow vulnerability is, but buffer overflow attacks against both legacy and newly-developed applications are still quite common. Descriptionīuffer overflow is probably the best known form of software security vulnerability. NVD CategorizationĬWE-788: Access of Memory Location After End of Buffer: This typically occurs when a pointer or its index is incremented to a position after the buffer or when pointer arithmetic results in a position after the buffer. Writing outside the bounds of a block of allocated memory can corrupt data, crash the program, or cause the execution of malicious code. In this case, a buffer is a sequential section of memory allocated to contain anything from a character string to an array of integers. See the OWASP Testing Guide article on how toĪ buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold or when a program attempts to put data in a memory area past a buffer.
Buffer overflow how to#
How to Test for Buffer Overflow Vulnerabilities

How to Review Code for Buffer Overflow Vulnerabilities See the OWASP Development Guide article on how to avoid buffer overflow vulnerabilities. How to Avoid Buffer Overflow Vulnerabilities See the OWASP article on Buffer Overflow Attacks.
