Katalog CWE

CWE-690 · Słabość

Unchecked Return Value to NULL Pointer Dereference

Abstrakcja
Złożona
Status
Szkic
Dodano
11 kwietnia 2008
Ostatnia zmiana
11 grudnia 2025

Podatności CVE z tą słabościąPełny wpis na cwe.mitre.org ↗

Opis

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.

Skutki

  • Availability

    DoS: Crash, Exit, or Restart

  • Integrity, Confidentiality, Availability

    Execute Unauthorized Code or Commands; Read Memory; Modify Memory

    In rare circumstances, when NULL is equivalent to the 0x0 memory address and privileged code can access it, then writing or reading memory is possible, which may lead to code execution.

Przykłady podatności

Zaczyna się od

Słabość nadrzędna

Kiedy powstaje

Dotyczy

Memory-Unsafe, C, C++

Źródła

  1. AddressSanitizer

Wpis z katalogu CWE 4.20.