CWE-690: Unchecked Return Value to NULL Pointer Dereference

CompoundDraft

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.

View on MITRE
Back to CWE Lookup

Extended Description

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.

Technical Details

Structure
Chain

Applicable To

Languages
CC++
Platforms

Frequently Asked Questions

What is CWE-690: Unchecked Return Value to NULL Pointer Dereference?+

CWE-690: Unchecked Return Value to NULL Pointer Dereference is a Common Weakness Enumeration (CWE) entry maintained by MITRE. 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.

What are the security consequences of Unchecked Return Value to NULL Pointer Dereference?+

If exploited, CWE-690 (Unchecked Return Value to NULL Pointer Dereference) it can compromise Availability, Integrity and Confidentiality, leading to outcomes such as DoS: Crash, Exit, or Restart, Execute Unauthorized Code or Commands, Read Memory and Modify Memory.

How is Unchecked Return Value to NULL Pointer Dereference detected?+

CWE-690 can be detected using Black Box and White Box. Combining automated tooling with manual review typically yields the best coverage.

Which programming languages are affected by Unchecked Return Value to NULL Pointer Dereference?+

CWE-690 commonly affects C and C++. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What are real-world examples of Unchecked Return Value to NULL Pointer Dereference?+

MITRE documents real CVEs mapped to CWE-690, including CVE-2008-1052, CVE-2006-6227, CVE-2006-2555, CVE-2003-1054 and CVE-2008-5183. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-690 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More