CWE一覧に戻る
CWE-670

常に不正確な制御フローの実装

Always-Incorrect Control Flow Implementation
脆弱性 レビュー中
JA

このコードには、そのパスが実装しようとするアルゴリズムを反映しない制御フロー・パスが含まれており、このパスがナビゲートされるたびに不正な動作が発生する。

この弱点は、特定のコードセグメントが実装しているアルゴリズムに関して常に不正確であるケースを捉えます。例えば、C言語のプログラマが1つのブロックに複数のステートメントを含めようとしたときに、中括弧を含めなかった場合(CWE-483)、そのロジックは常に不正確です。この問題は、コードが外部から悪意ある方法で操作された場合を除き、通常は正しく動作するほとんどの弱点とは対照的です。

EN

The code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated.

This weakness captures cases in which a particular code segment is always incorrect with respect to the algorithm that it is implementing. For example, if a C programmer intends to include multiple statements in a single block but does not include the enclosing braces (CWE-483), then the logic is always incorrect. This issue is in contrast to most weaknesses in which the code usually behaves correctly, except when it is externally manipulated in malicious ways.

Scope: Other / Impact: Other; Alter Execution Logic
MITRE公式ページ — CWE-670