CWE-590 - Free of Memory not on the Heap
CWE-590
- Abstraction:
- Variant
- Structure:
- Simple
- Status:
- Incomplete
- Weakness Name
Free of Memory not on the Heap
- Description
The product calls free() on a pointer to memory that was not allocated using associated heap allocation functions such as malloc(), calloc(), or realloc().
When free() is called on an invalid pointer, the program's memory management data structures may become corrupted. This corruption can cause the program to crash or, in some circumstances, an attacker may be able to cause free() to operate on controllable memory locations to modify critical program variables or execute code.
- Common Consequences
Scope: Integrity, Confidentiality, Availability
Impact: Execute Unauthorized Code or Commands, Modify Memory
Notes: There is the potential for arbitrary code execution with privileges of the vulnerable program via a "write, what where" primitive. If pointers to memory which hold user information are freed, a malicious user will be able to write 4 bytes anywhere in memory.
- Related Weaknesses
- Release Date:
- 2006-12-15
- Latest Modification Date:
- 2023-06-29
Free security scan for your website