CWE-806: Buffer Access Using Size of Source Buffer
The product uses the size of a source buffer when reading from or writing to a destination buffer, which may cause it to access memory that is outside of the bounds of the buffer.
Last updated
Overview
When the size of the destination is smaller than the size of the source, a buffer overflow could occur.
Common consequences
What can happen when CWE-806 is exploited.
Modify Memory, DoS: Crash, Exit, or Restart, DoS: Resource Consumption (CPU)
Affects: Availability
Buffer overflows generally lead to crashes. Other attacks leading to lack of availability are possible, including putting the program into an infinite loop.
Read Memory, Modify Memory, Execute Unauthorized Code or Commands
Affects: Integrity, Confidentiality, Availability
Buffer overflows often can be used to execute arbitrary code, which is usually outside the scope of a program's implicit security policy.
Bypass Protection Mechanism
Affects: Access Control
When the consequence is arbitrary code execution, this can often be used to subvert any other security service.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
Applies to
Languages