CWE-468 — Incorrect Pointer Scaling
CWE-468: Incorrect Pointer Scaling
MITRE CWE weakness
| Kind | Weakness |
| Abstraction | Base |
| Status | Incomplete |
| Likelihood of exploit | Medium |
Description
In C and C++, one may often accidentally refer to the wrong memory due to the semantics of when math operations are implicitly scaled.
Common consequences
- Confidentiality, Integrity: Read Memory, Modify Memory
Mitigations
Architecture and Design — Use a platform with high-level memory abstractions.
Implementation — Always use array indexing instead of direct pointer manipulation.
Architecture and Design — Use technologies for preventing buffer overflows.
References
- CWE page: https://cwe.mitre.org/data/definitions/468.html
- CWE list: https://cwe.mitre.org/data/index.html