CWE•Base•Incomplete•8 recent CVEs
CWE-124Buffer Underwrite ('Buffer Underflow')
Description
The product writes to a buffer using an index or pointer that references a memory location prior to the beginning of the buffer.
Common consequences
- Integrity,Availability→Modify Memory,DoS: Crash, Exit, or RestartOut of bounds memory access will very likely result in the corruption of relevant memory, and perhaps instructions, possibly leading to a crash.
- Integrity,Confidentiality,Availability,Access Control,Other→Execute Unauthorized Code or Commands,Modify Memory,Bypass Protection Mechanism,OtherIf the corrupted memory can be effectively controlled, it may be possible to execute arbitrary code. If the corrupted memory is data rather than instructions, the system will continue to function with improper changes, possibly in violation
- Access Control,Other→Bypass Protection Mechanism,OtherWhen the consequence is arbitrary code execution, this can often be used to subvert any other security service.
Potential mitigations
- RequirementsChoose a language that is not susceptible to these issues.
- ImplementationAll calculated values that are used as index or for pointer arithmetic should be validated to ensure that they are within an expected range.