The product calls free() twice on the same memory address.
N/A
Threat Mapped score: 0.0
Industry: Finiancial
Threat priority: Unclassified
CVE: CVE-2006-5051
Chain: Signal handler contains too much functionality (CWE-828), introducing a race condition (CWE-362) that leads to a double free (CWE-415).
CVE: CVE-2004-0642
Double free resultant from certain error conditions.
CVE: CVE-2004-0772
Double free resultant from certain error conditions.
CVE: CVE-2005-1689
Double free resultant from certain error conditions.
CVE: CVE-2003-0545
Double free from invalid ASN.1 encoding.
CVE: CVE-2003-1048
Double free from malformed GIF.
CVE: CVE-2005-0891
Double free from malformed GIF.
CVE: CVE-2002-0059
Double free from malformed compressed data.
N/A
N/A
Phase | Note |
---|---|
Implementation | N/A |
Intro: The following code shows a simple example of a double free vulnerability.
Body: Double free vulnerabilities have two common (and sometimes overlapping) causes:
char* ptr = (char*)malloc (SIZE); ... if (abrt) { free(ptr); } ... free(ptr);
Intro: While contrived, this code should be exploitable on Linux distributions that do not ship with heap-chunk check summing turned on.
#include <stdio.h> #include <unistd.h> #define BUFSIZE1 512 #define BUFSIZE2 ((BUFSIZE1/2) - 8) int main(int argc, char **argv) { char *buf1R1; char *buf2R1; char *buf1R2; buf1R1 = (char *) malloc(BUFSIZE2); buf2R1 = (char *) malloc(BUFSIZE2); free(buf1R1); free(buf2R1); buf1R2 = (char *) malloc(BUFSIZE1); strncpy(buf1R2, argv[1], BUFSIZE1-1); free(buf2R1); free(buf1R2); }