What it is
Integer coercion refers to a set of flaws pertaining to the type casting, extension, or truncation of primitive data types.
Impact on systems
| Scope | Impact |
|---|---|
| Availability | DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory), DoS: Crash, Exit, or Restart Integer coercion often leads to undefined states of execution resulting in infinite loops or crashes. |
| Integrity, Confidentiality, Availability | Execute Unauthorized Code or Commands In some cases, integer coercion errors can lead to exploitable buffer overflow conditions, resulting in the execution of arbitrary code. |
| Integrity, Other | Other Integer coercion errors result in an incorrect value being stored for the variable in question, or possible violating integrity of the data. |
How to prevent it
Source: MITRE CWE catalog · Official entry on the MITRE website