The product sets a pointer to a specific address other than NULL or 0.
Extended Description
Using a fixed address is not portable, because that address will probably not be valid in all environments or platforms.
ThreatScore
Threat Mapped score: 0.0
Industry: Finiancial
Threat priority: Unclassified
Observed Examples (CVEs)
No observed examples available.
Related Attack Patterns (CAPEC)
N/A
Attack TTPs
N/A
Modes of Introduction
Phase
Note
Implementation
N/A
Common Consequences
Impact: Execute Unauthorized Code or Commands — Notes: If one executes code at a known location, an attacker might be able to inject code there beforehand.
Impact: DoS: Crash, Exit, or Restart, Reduce Maintainability, Reduce Reliability — Notes: If the code is ported to another platform or environment, the pointer is likely to be invalid and cause a crash.
Impact: Read Memory, Modify Memory — Notes: The data at a known pointer location can be easily read or influenced by an attacker.
Potential Mitigations
Implementation: Never set a pointer to a fixed address. (N/A)
Applicable Platforms
C (N/A, Undetermined)
C++ (N/A, Undetermined)
C# (N/A, Undetermined)
None (Assembly, Undetermined)
Demonstrative Examples
Intro: 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.
Body: 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.
int (*pt2Function) (float, char, char)=0x08040000; int result2 = (*pt2Function) (12, 'a', 'b'); // Here we can inject code to execute.