CWE一覧に戻る
CWE-194

予期せぬサイン延長

Unexpected Sign Extension
脆弱性 作成中
JA

この製品は、数値がより大きなデータ型に変換される際に符号拡張されるような演算を行う。元の数値が負の場合、これは予期しない値を生成し、結果として弱点につながる可能性がある。

EN

The product performs an operation on a number that causes it to be sign extended when it is transformed into a larger data type. When the original number is negative, this can produce unexpected values that lead to resultant weaknesses.

Scope: Integrity, Confidentiality, Availability, Other / Impact: Read Memory; Modify Memory; Other
Avoid using signed variables if you don't need to represent negative values. When negative values are needed, perform validation after you save those values to larger data types, or before passing them to functions that are expecting unsigned values.
MITRE公式ページ — CWE-194