Float Overflow
Float Overflow (Numeric Imprecision) happen when a program perform floating-point arithmetic and does not handle the rounding imprecision or approximate representation. This can result into unexpected arithmetic result, non-deterministic program behaviour, data leak, security check bypass or denial of service.
Remediation
- Make sure arithmetic result does not go beyond
floatordoublerange (see the remediation for Integer Overflow). - Perform rounding before using the result.
- Read more about Float Overflow on SecDim Learn
Metadata
- Severity: low
- Slug: float-overflow
CWEs
- 190: Integer Overflow or Wraparound
- 128: Wrap-around Error
- 191: Integer Underflow (Wrap or Wraparound)