---
title: "CWE-468: Incorrect Pointer Scaling"
url: https://radicalnotion.ai/cwe/cwe-468
type: cwe
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."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-468: Incorrect Pointer Scaling

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Incomplete
- **Likelihood of exploit:** Medium
- **CVEs with this as primary weakness:** 13
- **Of those, in CISA KEV:** 0
- **New in 2026:** 9
- **CWE catalog version:** 4.21

## 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.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | Programmers may try to index from a pointer by adding a number of bytes. This is incorrect because C and C++ implicitly scale the operand by the size of the data type. |

## Applicable platforms

**Languages:** C (Undetermined), C++ (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Integrity | Read Memory, Modify Memory | Incorrect pointer scaling will often result in buffer overflow conditions. Confidentiality can be compromised if the weakness is in the context of a buffer over-read or under-read. |

## Potential 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.

## Detection methods

### Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Effectiveness: High

## Demonstrative examples

### Example 1

This example attempts to calculate the position of the second byte of a pointer.

Bad code:

```c
int *p = x;
char * second_char = (char *)(p + 1);
```

In this example, second\_char is intended to point to the second byte of p. But, adding 1 to p actually adds sizeof(int) to p, giving a result that is incorrect (3 bytes off on 32-bit platforms). If the resulting memory address is read, this could potentially be an information leak. If it is a write, it could be a security-critical write to unauthorized memory-- whether or not it is a buffer overflow. Note that the above code may also be wrong in other ways, particularly in a little endian environment.

## Real CVEs with this weakness (sample of 12 of 13)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-80637 | netfilter: synproxy: fix unaligned memory access in timestamp adjustment | critical | 9.8 | - | No | 2026-08-28 |
| CVE-2026-24872 | Pointer arithmetic error in SkyFire\_548 | critical | 9.8 | - | No | 2026-01-27 |
| CVE-2024-1915 | Incorrect Pointer Scaling in Mitsubishi Electric MELSEC-Q/L Series | critical | 9.8 | - | No | 2024-03-15 |
| CVE-2024-0802 | Incorrect Pointer Scaling in Mitsubishi Electric MELSEC-Q/L Series | critical | 9.8 | - | No | 2024-03-14 |
| CVE-2026-23316 | net: ipv4: fix ARM64 alignment fault in multipath hash seed | high | 8.7 | - | No | 2026-03-25 |
| CVE-2026-31553 | KVM: arm64: Fix the descriptor address in \_\_kvm\_at\_swap\_desc() | high | 8.6 | - | No | 2026-04-24 |
| CVE-2026-23383 | bpf, arm64: Force 8-byte alignment for JIT buffer to prevent atomic tearing | high | 7.8 | - | No | 2026-03-25 |
| CVE-2026-98216 | IB/hfi1: Fix the PIO\_CRED credit-return mmap | high | 7.1 | - | No | 2026-10-06 |
| CVE-2026-53343 | ARM: 9475/1: entry: use byte load for KASAN VMAP stack shadow | high | 7.1 | - | No | 2026-07-01 |
| CVE-2026-34194 | GPU DDK - UAF read and/or write to arbitrary physical pages in DevmemIntChangeSparse due to incorrect calculation of the virtual index count | high | 7.1 | - | No | 2026-06-08 |
| CVE-2025-40063 | crypto: comp - Use same definition of context alloc and free ops | high | 7.0 | - | No | 2025-10-28 |
| CVE-2025-38158 | hisi\_acc\_vfio\_pci: fix XQE dma address error | medium | 5.7 | - | No | 2025-07-03 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-682](https://radicalnotion.ai/cwe/cwe-682) | Incorrect Calculation |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| CLASP | Unintentional pointer scaling | - | - |
| CERT C Secure Coding | Do not add or subtract a scaled integer to a pointer | ARR39-C | Exact |
| CERT C Secure Coding | Ensure pointer arithmetic is used correctly | EXP08-C | - |
| Software Fault Patterns | Glitch in computation | SFP1 | - |

## Frequently asked questions

### What is CWE-468?

In C and C++, one may often accidentally refer to the wrong memory due to the semantics of when math operations are implicitly scaled.

### What CVEs are caused by CWE-468?

13 recorded CVEs are attributed to CWE-468, including CVE-2026-80637, CVE-2026-24872 and CVE-2024-1915.

### How do you prevent CWE-468?

Use a platform with high-level memory abstractions.

### How is CWE-468 detected?

Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

### What are the consequences of CWE-468?

Exploiting CWE-468 can lead to: Read Memory, Modify Memory.

### Is CWE-468 actively exploited?

13 recorded CVEs are caused by CWE-468; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/468.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-468). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
