CWE一覧に戻る
CWE-253

関数の戻り値の不正確なチェック

Incorrect Check of Function Return Value
脆弱性 作成中
JA

関数からの戻り値を誤ってチェックしているため、エラーや例外的な状態を検出できない。

重要かつ一般的な関数は、そのアクションの成功について何らかの値を返す。これは、その関数によって引き起こされたエラーを処理するかどうかをプログラムに警告する。

EN

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.

Scope: Availability, Integrity / Impact: Unexpected State; DoS: Crash, Exit, or Restart
Use a language or compiler that uses exceptions and requires the catching of those exceptions.
Properly check all functions which return a value.
When designing any function make sure you return a value or throw an exception in case of an error.
MITRE公式ページ — CWE-253