Katalog CWE

CWE-253 · Słabość

Incorrect Check of Function Return Value

Abstrakcja
Bazowa
Status
Niekompletny
Ryzyko wykorzystania
niskie
Dodano
19 lipca 2006
Ostatnia zmiana
11 grudnia 2025

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

Opis

The product incorrectly checks a return value from a function, which prevents it from detecting errors or exceptional conditions.

Important and common functions will return some value about the success of its actions. This will alert the program whether or not to handle any errors caused by that function.

Skutki

  • Availability, Integrity

    Unexpected State; DoS: Crash, Exit, or Restart

    An unexpected return value could place the system in a state that could lead to a crash or other unintended behaviors.

Zapobieganie

  • Architecture and Design · Language Selection

    Use a language or compiler that uses exceptions and requires the catching of those exceptions.

  • Implementation

    Properly check all functions which return a value.

  • Implementation

    When designing any function make sure you return a value or throw an exception in case of an error.

Przykłady podatności

Słabość nadrzędna

Kiedy powstaje

Dotyczy

Not Language-Specific, Not Technology-Specific

Źródła

  1. The Art of Software Security Assessment — Mark Dowd, John McDonald, Justin Schuh, Chapter 7, "Return Value Testing and Interpretation", Page 340, Addison Wesley, 2006
  2. The CLASP Application Security Process — Secure Software, Inc., 2005

Wpis z katalogu CWE 4.20.