1323
Scope Impact Likelihood
Availability DoS: Crash, Exit, or Restart
Reduce Maintainability
Reduce Reliability
If the code is ported to another platform or environment,
the pointer is likely to be invalid and cause a crash.
Confidentiality
Integrity
Read Memory
Modify Memory
The data at a known pointer location can be easily read or
influenced by an attacker.
Potential Mitigations
Phase: Implementation
Never set a pointer to a fixed address.
Demonstrative Examples
Example 1:
This code assumes a particular function will always be found at a particular address. It assigns a
pointer to that address and calls the function.
Example Language: C (Bad)
int (*pt2Function) (float, char, char)=0x08040000;
int result2 = (*pt2Function) (12, 'a', 'b');
// Here we can inject code to execute.
The same function may not always be found at the same memory address. This could lead to a
crash, or an attacker may alter the memory at the expected address, leading to arbitrary code
execution.
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 738 CERT C Secure Coding Standard (2008) Chapter 5 -
Integers (INT)
734 2342
MemberOf 872 CERT C++ Secure Coding Section 04 - Integers (INT) 868 2374
MemberOf 884 CWE Cross-section 884 2567
MemberOf 998 SFP Secondary Cluster: Glitch in Computation 888 2419
MemberOf 1158 SEI CERT C Coding Standard - Guidelines 04. Integers
(INT)
1154 2456
MemberOf 1399 Comprehensive Categorization: Memory Safety 1400 2525
Taxonomy Mappings
Mapped Taxonomy Name Node ID Fit Mapped Node Name
CERT C Secure Coding INT36-C Imprecise Converting a pointer to integer or
integer to pointer
Software Fault Patterns SFP1 Glitch in computation
CWE-588: Attempt to Access Child of a Non-structure Pointer
Weakness ID : 588
CWE Version 4.14
CWE-588: Attempt to Access Child of a Non-structure Pointer
CWE-588: Attempt to Access Child of a Non-structure Pointer