CWE-690

Unchecked Return Value to NULL Pointer Dereference
AI Translation Available

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.

Status
draft
Abstraction
compound
C C++ Memory-Unsafe

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.

Common Consequences

availability integrity confidentiality
Impacts
dos: crash, exit, or restart execute unauthorized code or commands read memory modify memory

Detection Methods

black box white box automated dynamic analysis

Potential Mitigations