15 vulnerabilities classified as CWE-590 (释放并不在堆上的内存). AI Chinese analysis included.
CWE-590 represents a critical memory management weakness where software attempts to deallocate memory using free() on pointers that were not originally allocated via heap functions like malloc(), calloc(), or realloc(). This error typically arises when developers mistakenly free stack-allocated variables, static data, or already-freed memory blocks. Exploitation often leads to immediate application crashes due to heap metadata corruption, but sophisticated attackers may leverage this instability to trigger arbitrary code execution by manipulating the corrupted memory structures. To prevent this vulnerability, developers must rigorously track memory allocation sources, ensuring that every call to free() corresponds strictly to a prior heap allocation. Implementing static analysis tools and adhering to strict memory lifecycle management practices helps identify mismatched allocation and deallocation pairs, thereby preserving heap integrity and preventing potential security breaches.
void foo(){ record_t bar[MAX_SIZE]; /* do something interesting with bar */ ... free(bar); }record_t bar[MAX_SIZE]; //Global var void foo(){ /* do something interesting with bar */ ... free(bar); }Vulnerabilities classified as CWE-590 (释放并不在堆上的内存) represent 15 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.