CWE Database
/

CWE-690

Back to CWE list

CWE-690

Unchecked Return Value to NULL Pointer Dereference

Compound
Draft

Description

The product does not check for an error after calling a function that can return with a NULL pointer if the function fails, which leads to a resultant NULL pointer dereference.

While unchecked return value weaknesses are not limited to returns of NULL pointers (see the examples in CWE-252), functions often return NULL to indicate an error status. When this error condition is not checked, a NULL pointer dereference can occur.

Parent Weaknesses (ChildOf)

Related Weaknesses

Common Consequences

Scope

Availability

Impact

DoS: Crash, Exit, or Restart

Scope

Integrity
Confidentiality
Availability

Impact

Execute Unauthorized Code or Commands, Read Memory, Modify Memory

CVE-2008-1052

Large Content-Length value leads to NULL pointer dereference when malloc fails.

CVE-2006-6227

Large message length field leads to NULL pointer dereference when malloc fails.

CVE-2006-2555

Parsing routine encounters NULL dereference when input is missing a colon separator.

CVE-2003-1054

URI parsing API sets argument to NULL when a parsing failure occurs, such as when the Referer header is missing a hostname, leading to NULL dereference.

CVE-2008-5183

chain: unchecked return value can lead to NULL dereference

Applicable Platforms

Memory-Unsafe
C
C++

Security Training

Train your team to recognize and prevent security threats with our comprehensive security awareness program.

Start Training

Vulnerability Scanning

Discover vulnerabilities in your applications and infrastructure before attackers do.

Scan Now