logo
Home/CWEs/CWE-588/

CWE-588 - Attempt to Access Child of a Non-structure Pointer

  • Abstraction:Variant
  • Structure:Simple
  • Status:Incomplete
  • Release Date:2006-12-15
  • Latest Modification Date:2023-10-26

Weakness Name

Attempt to Access Child of a Non-structure Pointer

Description

Casting a non-structure type to a structure type and accessing a field can lead to memory access errors or data corruption.

Common Consequences

Scope: Integrity

Impact: Modify Memory

Notes: Adjacent variables in memory may be corrupted by assignments performed on fields after the cast.

Scope: Availability

Impact: DoS: Crash, Exit, or Restart

Notes: Execution may end due to a memory access error.

Related Weaknesses

CWE-704Incorrect Type Conversion or Cast

CWE-758Reliance on Undefined, Unspecified, or Implementation-Defined Behavior