CWE-823
Use of Out-of-range Pointer Offset
About
The product performs pointer arithmetic on a valid pointer, but it uses an offset that can point outside of the intended range of valid memory locations for the resulting pointer.
While a pointer can contain a reference to any arbitrary memory location, a program typically only intends to use the pointer to access limited portions of memory, such as contiguous memory used to access an individual array. Programs may use offsets in order to access fields or sub-elements stored within structured data. The offset might be out-of-range if it comes from an untrusted source, is the result of an incorrect calculation, or occurs because of another error. If an attacker can control or influence the offset so that it points outside of the intended boundaries of the structure, then the attacker may be able to read or write to memory locations that are used elsewhere in the product. As a result, the attack might change the state of the product as accessed through program variables, cause a crash or instable behavior, and possibly lead to code execution.
Common consequences
- Confidentiality → Read Memory
- Availability → DoS: Crash, Exit, or Restart
- Integrity, Confidentiality, Availability → Execute Unauthorized Code or Commands, Modify Memory
CVEs with this weakness
Frequently asked questions
What is CWE-823?
The product performs pointer arithmetic on a valid pointer, but it uses an offset that can point outside of the intended range of valid memory locations for the resulting pointer. While a pointer can contain a reference to any arbitrary memory location, a program typically only intends to use the pointer to access limited portions of memory, such as contiguous memory used to access an individual array.
Which platforms does CWE-823 affect?
CWE-823 has been observed on: Memory-Unsafe, C, C++.
How many CVEs does Rainforest track for CWE-823?
Rainforest Labs currently tracks 1 published CVEs mapped to CWE-823. They are listed on this page.
Empower Your Security Strategy with Rainforest
Discover vulnerabilities early, prioritize critical threats, and protect what truly matters. Rainforest streamlines your security operations, saving you time and reducing costs, so you can focus on what drives your business forward.
