This vulnerability occurs when a program calculates a new memory address using a valid pointer and an offset, but the resulting address points outside the intended, safe memory region, such as beyond the bounds of an array or structure.
Pointers are designed to reference memory, but software logic typically expects them to operate within specific boundaries, like an array's allocated space. When an offset—often from user input, a miscalculation, or corrupted data—pushes the pointer beyond these boundaries, it can read or write to arbitrary, unintended memory locations. An attacker who controls this offset can exploit this to leak sensitive data, corrupt critical program variables, crash the application, or potentially execute malicious code. The core issue is a failure to properly validate that the pointer arithmetic result remains within the legitimate range of the target data structure before it is used.
Impact: Read Memory
If the untrusted pointer is used in a read operation, an attacker might be able to read sensitive portions of memory.
Impact: DoS: Crash, Exit, or Restart
If the untrusted pointer references a memory location that is not accessible to the program, or points to a location that is "malformed" or larger than expected by a read or write operation, the application may terminate unexpectedly.
Impact: Execute Unauthorized Code or CommandsModify Memory
If the untrusted pointer is used in a function call, or points to unexpected data in a write operation, then code execution may be possible.