Common Weakness Enumeration

CWE-124

Buffer Underwrite ('Buffer Underflow')

The product writes to a buffer using an index or pointer that references a memory location prior to the beginning of the buffer.

Mitigation

Phase: Requirements

Description:

  • Choose a language that is not susceptible to these issues.
Mitigation

Phase: Implementation

Description:

  • All calculated values that are used as index or for pointer arithmetic should be validated to ensure that they are within an expected range.

No CAPEC attack patterns related to this CWE.

Back to CWE stats page