CWE-587 — Assignment of a Fixed Address to a Pointer
CWE-587: Assignment of a Fixed Address to a Pointer
MITRE CWE weakness
| Kind | Weakness |
| Abstraction | Variant |
| Status | Draft |
| Likelihood of exploit | — |
Description
The product sets a pointer to a specific address other than NULL or 0.
Using a fixed address is not portable, because that address will probably not be valid in all environments or platforms.
Common consequences
- Integrity, Confidentiality, Availability: Execute Unauthorized Code or Commands
- Availability: DoS: Crash, Exit, or Restart, Reduce Maintainability, Reduce Reliability
- Confidentiality, Integrity: Read Memory, Modify Memory
Mitigations
Implementation — Never set a pointer to a fixed address.
References
- CWE page: https://cwe.mitre.org/data/definitions/587.html
- CWE list: https://cwe.mitre.org/data/index.html