CWE-590: Free of Memory not on the Heap

VariantIncomplete

The product calls free() on a pointer to memory that was not allocated using associated heap allocation functions such as malloc(), calloc(), or realloc().

View on MITRE
Back to CWE Lookup

Extended Description

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.

Technical Details

Structure
Simple

Applicable To

Languages
Platforms

Learn More