CWE一覧に戻る
CWE-193

オフ・バイ・ワンエラー

Off-by-one Error
脆弱性 レビュー中
JA

製品が、正しい値より1多い、または1少ない、不正確な最大値または最小値を計算または使用している。

EN

A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.

Scope: Availability / Impact: DoS: Crash, Exit, or Restart; DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory); DoS: Instability
Scope: Integrity / Impact: Modify Memory
Scope: Confidentiality, Availability, Access Control / Impact: Execute Unauthorized Code or Commands; Bypass Protection Mechanism
When copying character arrays or using character manipulation methods, the correct size parameter must be used to account for the null terminator that needs to be added at the end of the array. Some examples of functions susceptible to this weakness in C include strcpy(), strncpy(), strcat(), strncat(), printf(), sprintf(), scanf() and sscanf().
MITRE公式ページ — CWE-193