Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-188 (依赖数据/内存布局) — Vulnerability Class 1

1 vulnerabilities classified as CWE-188 (依赖数据/内存布局). AI Chinese analysis included.

CWE-188 represents a structural weakness where software makes invalid assumptions about the low-level organization of protocol data or memory layout. This flaw typically arises when applications rely on specific memory arrangements that may shift across different hardware architectures, operating systems, or protocol versions. Attackers exploit this by manipulating data structures to trigger unintended behavior, potentially leading to buffer overflows, information disclosure, or code execution if the assumed layout is violated. To mitigate this risk, developers must avoid hardcoding memory offsets or assuming contiguous variable placement. Instead, they should utilize standardized serialization formats, explicit data structures, and platform-independent abstractions. Rigorous testing across diverse environments and adhering to strict coding standards further ensures that applications remain robust against unexpected memory reorganizations, thereby preserving integrity and security regardless of the underlying infrastructure.

MITRE CWE Description
The product makes invalid assumptions about how protocol data or memory is organized at a lower level, resulting in unintended program behavior. When changing platforms or protocol versions, in-memory organization of data may change in unintended ways. For example, some architectures may place local variables A and B right next to each other with A on top; some may place them next to each other with B on top; and others may add some padding to each. The padding size may vary to ensure that each variable is aligned to a proper word size. In protocol implementations, it is common to calculate an offset relative to another field to pick out a specific piece of data. Exceptional conditions, often involving new protocol versions, may add corner cases that change the data layout in an unusual way. The result can be that an implementation accesses an unintended field in the packet, treating data of one type as data of another type.
Common Consequences (1)
Integrity, ConfidentialityModify Memory, Read Memory
Can result in unintended modifications or exposure of sensitive memory.
Mitigations (3)
Implementation, Architecture and DesignIn flat address space situations, never allow computing memory addresses as offsets from another memory address.
Architecture and DesignFully specify protocol layout unambiguously, providing a structured grammar (e.g., a compilable yacc grammar).
TestingTesting: Test that the implementation properly handles each case in the protocol grammar.
Examples (1)
In this example function, the memory address of variable b is derived by adding 1 to the address of variable a. This derived address is then used to assign the value 0 to b.
void example() { char a; char b; *(&a + 1) = 0; }
Bad · C
CVE IDTitleCVSSSeverityPublished
CVE-2026-21493 iccDEV has Type Confusion during XML Curve Serialization — iccDEV 6.6 Medium2026-01-06

Vulnerabilities classified as CWE-188 (依赖数据/内存布局) represent 1 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.