1. CVE archive
  2. Vulnerability types
  3. CWE-469
CWE-469 · #740 most frequent type in the archive

Use of Pointer Subtraction to Determine Size

The product subtracts one pointer from another in order to determine size, but this calculation can be incorrect if the pointers do not exist in the same memory chunk.

Part of: CWE-682 · Incorrect Calculation

1CVEs of this type in the archive
0critical (CVSS ≥ 9)
0high severity (7–8.9)
Mar 22, 2026latest published

What it is

The product subtracts one pointer from another in order to determine size, but this calculation can be incorrect if the pointers do not exist in the same memory chunk.

Impact on systems

ScopeImpact
Access Control, Integrity, Confidentiality, Availability Modify Memory, Read Memory, Execute Unauthorized Code or Commands, Gain Privileges or Assume Identity
There is the potential for arbitrary code execution with privileges of the vulnerable program.

How to prevent it

Implementation Save an index variable. This is the recommended solution. Rather than subtract pointers from one another, use an index variable of the same size as the pointers in question. Use this variable to walk from one pointer to the other and calculate the difference. Always validate this number.

Source: MITRE CWE catalog · Official entry on the MITRE website

All CWE-469 CVEs

1 results

Dottor Marc

Is this type of vulnerability in your systems?

An archive tells you what exists; a Vulnerability Assessment tells you what is exposed on your side. Dottor Marc tests your web applications and network with automated and manual checks.