CWE-188: Reliance on Data/Memory Layout

Base Draft Simple

CWE版本: 4.18

更新日期: 2025-09-09

弱点描述

The product makes invalid assumptions about how protocol data or memory is organized at a lower level, resulting in unintended program behavior.

常见后果

影响范围: Integrity Confidentiality

技术影响: Modify Memory Read Memory

说明: Can result in unintended modifications or exposure of sensitive memory.

潜在缓解措施

阶段: Implementation Architecture and Design

描述: In flat address space situations, never allow computing memory addresses as offsets from another memory address.

阶段: Architecture and Design

描述: Fully specify protocol layout unambiguously, providing a structured grammar (e.g., a compilable yacc grammar).

阶段: Testing

描述: Testing: Test that the implementation properly handles each case in the protocol grammar.

检测方法

方法: Fuzzing

Fuzz testing (fuzzing) is a powerful technique for generating large numbers of diverse inputs - either randomly or algorithmically - and dynamically invoking the code with those inputs. Even with random inputs, it is often capable of generating unexpected results such as crashes, memory corruption, or resource consumption. Fuzzing effectively produces repeatable test cases that clearly indicate bugs, which helps developers to diagnose the issues.

有效性: High

引入模式

阶段 说明
Implementation -

适用平台

编程语言
C (Undetermined) C++ (Undetermined)

分类映射

分类名称 条目ID 条目名称 映射适配度
CLASP - Reliance on data layout -
关键信息

CWE ID: CWE-188

抽象级别: Base

结构: Simple

状态: Draft

利用可能性: Low

相关弱点