CVE Vulnerabilities

CVE-2014-5044

Integer Overflow or Wraparound

Published: Mar 07, 2018 | Modified: Mar 27, 2018
CVSS 3.x
9.8
CRITICAL
Source:
NVD
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
7.5 HIGH
AV:N/AC:L/Au:N/C:P/I:P/A:P
RedHat/V2
4.6 MODERATE
AV:L/AC:L/Au:N/C:P/I:P/A:P
RedHat/V3
Ubuntu
LOW

Multiple integer overflows in libgfortran might allow remote attackers to execute arbitrary code or cause a denial of service (Fortran application crash) via vectors related to array allocation.

Weakness

The product performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.

Affected Software

Name Vendor Start Version End Version
Libgfortran Gnu * 4.8 (excluding)
Gcc-3.3 Ubuntu upstream *
Gcc-4.1 Ubuntu lucid *
Gcc-4.1 Ubuntu upstream *
Gcc-4.3 Ubuntu lucid *
Gcc-4.3 Ubuntu upstream *
Gcc-4.4 Ubuntu lucid *
Gcc-4.4 Ubuntu precise *
Gcc-4.4 Ubuntu trusty *
Gcc-4.4 Ubuntu upstream *
Gcc-4.4 Ubuntu utopic *
Gcc-4.4 Ubuntu vivid *
Gcc-4.4-armel-cross Ubuntu precise *
Gcc-4.4-armel-cross Ubuntu upstream *
Gcc-4.4-armhf-cross Ubuntu precise *
Gcc-4.4-armhf-cross Ubuntu upstream *
Gcc-4.5 Ubuntu precise *
Gcc-4.5 Ubuntu upstream *
Gcc-4.5-armel-cross Ubuntu precise *
Gcc-4.5-armel-cross Ubuntu upstream *
Gcc-4.5-armhf-cross Ubuntu precise *
Gcc-4.5-armhf-cross Ubuntu upstream *
Gcc-4.6 Ubuntu precise *
Gcc-4.6 Ubuntu precise/esm *
Gcc-4.6 Ubuntu trusty *
Gcc-4.6 Ubuntu upstream *
Gcc-4.6 Ubuntu utopic *
Gcc-4.6 Ubuntu vivid *
Gcc-4.6-armel-cross Ubuntu precise *
Gcc-4.6-armel-cross Ubuntu upstream *
Gcc-4.6-armhf-cross Ubuntu precise *
Gcc-4.6-armhf-cross Ubuntu upstream *
Gcc-4.7 Ubuntu esm-apps/xenial *
Gcc-4.7 Ubuntu esm-infra-legacy/trusty *
Gcc-4.7 Ubuntu trusty *
Gcc-4.7 Ubuntu trusty/esm *
Gcc-4.7 Ubuntu upstream *
Gcc-4.7 Ubuntu utopic *
Gcc-4.7 Ubuntu vivid *
Gcc-4.7 Ubuntu wily *
Gcc-4.7 Ubuntu xenial *
Gcc-4.7 Ubuntu yakkety *
Gcc-4.7 Ubuntu zesty *
Gcc-4.7-arm64-cross Ubuntu upstream *
Gcc-4.7-armel-cross Ubuntu esm-apps/xenial *
Gcc-4.7-armel-cross Ubuntu trusty *
Gcc-4.7-armel-cross Ubuntu upstream *
Gcc-4.7-armel-cross Ubuntu utopic *
Gcc-4.7-armel-cross Ubuntu vivid *
Gcc-4.7-armel-cross Ubuntu wily *
Gcc-4.7-armel-cross Ubuntu xenial *
Gcc-4.7-armel-cross Ubuntu yakkety *
Gcc-4.7-armel-cross Ubuntu zesty *
Gcc-4.7-armhf-cross Ubuntu esm-apps/xenial *
Gcc-4.7-armhf-cross Ubuntu trusty *
Gcc-4.7-armhf-cross Ubuntu upstream *
Gcc-4.7-armhf-cross Ubuntu utopic *
Gcc-4.7-armhf-cross Ubuntu vivid *
Gcc-4.7-armhf-cross Ubuntu wily *
Gcc-4.7-armhf-cross Ubuntu xenial *
Gcc-4.7-armhf-cross Ubuntu yakkety *
Gcc-4.7-armhf-cross Ubuntu zesty *
Gcc-4.7-powerpc-cross Ubuntu upstream *
Gcc-4.8 Ubuntu artful *
Gcc-4.8 Ubuntu trusty *
Gcc-4.8 Ubuntu upstream *
Gcc-4.8 Ubuntu utopic *
Gcc-4.8 Ubuntu vivid *
Gcc-4.8 Ubuntu wily *
Gcc-4.8 Ubuntu yakkety *
Gcc-4.8 Ubuntu zesty *
Gcc-4.8-arm64-cross Ubuntu trusty *
Gcc-4.8-arm64-cross Ubuntu upstream *
Gcc-4.8-arm64-cross Ubuntu utopic *
Gcc-4.8-arm64-cross Ubuntu vivid *
Gcc-4.8-arm64-cross Ubuntu wily *
Gcc-4.8-armhf-cross Ubuntu trusty *
Gcc-4.8-armhf-cross Ubuntu upstream *
Gcc-4.8-armhf-cross Ubuntu utopic *
Gcc-4.8-armhf-cross Ubuntu vivid *
Gcc-4.8-armhf-cross Ubuntu wily *
Gcc-4.8-powerpc-cross Ubuntu trusty *
Gcc-4.8-powerpc-cross Ubuntu upstream *
Gcc-4.8-powerpc-cross Ubuntu utopic *
Gcc-4.8-powerpc-cross Ubuntu vivid *
Gcc-4.8-powerpc-cross Ubuntu wily *
Gcc-4.8-ppc64el-cross Ubuntu trusty *
Gcc-4.8-ppc64el-cross Ubuntu upstream *
Gcc-4.8-ppc64el-cross Ubuntu utopic *
Gcc-4.8-ppc64el-cross Ubuntu vivid *
Gcc-4.8-ppc64el-cross Ubuntu wily *
Gcc-4.9 Ubuntu upstream *
Gcc-4.9 Ubuntu utopic *
Gcc-4.9 Ubuntu vivid *
Gcc-4.9 Ubuntu vivid/stable-phone-overlay *
Gcc-4.9 Ubuntu vivid/ubuntu-core *
Gcc-4.9 Ubuntu wily *
Gcc-4.9 Ubuntu xenial *
Gcc-4.9 Ubuntu yakkety *
Gcc-4.9 Ubuntu zesty *
Gcc-4.9-arm64-cross Ubuntu upstream *
Gcc-4.9-arm64-cross Ubuntu utopic *
Gcc-4.9-arm64-cross Ubuntu vivid *
Gcc-4.9-armhf-cross Ubuntu upstream *
Gcc-4.9-armhf-cross Ubuntu utopic *
Gcc-4.9-armhf-cross Ubuntu vivid *
Gcc-4.9-powerpc-cross Ubuntu upstream *
Gcc-4.9-powerpc-cross Ubuntu utopic *
Gcc-4.9-powerpc-cross Ubuntu vivid *
Gcc-4.9-ppc64el-cross Ubuntu upstream *
Gcc-4.9-ppc64el-cross Ubuntu utopic *
Gcc-4.9-ppc64el-cross Ubuntu vivid *
Gcc-arm-linux-androideabi Ubuntu esm-apps/xenial *
Gcc-arm-linux-androideabi Ubuntu trusty *
Gcc-arm-linux-androideabi Ubuntu upstream *
Gcc-arm-linux-androideabi Ubuntu utopic *
Gcc-arm-linux-androideabi Ubuntu vivid *
Gcc-arm-linux-androideabi Ubuntu wily *
Gcc-arm-linux-androideabi Ubuntu xenial *
Gcc-arm-linux-androideabi Ubuntu yakkety *
Gcc-arm-linux-androideabi Ubuntu zesty *
Gcc-arm-none-eabi Ubuntu artful *
Gcc-arm-none-eabi Ubuntu bionic *
Gcc-arm-none-eabi Ubuntu cosmic *
Gcc-arm-none-eabi Ubuntu disco *
Gcc-arm-none-eabi Ubuntu eoan *
Gcc-arm-none-eabi Ubuntu esm-apps/xenial *
Gcc-arm-none-eabi Ubuntu groovy *
Gcc-arm-none-eabi Ubuntu hirsute *
Gcc-arm-none-eabi Ubuntu impish *
Gcc-arm-none-eabi Ubuntu kinetic *
Gcc-arm-none-eabi Ubuntu trusty *
Gcc-arm-none-eabi Ubuntu upstream *
Gcc-arm-none-eabi Ubuntu utopic *
Gcc-arm-none-eabi Ubuntu vivid *
Gcc-arm-none-eabi Ubuntu wily *
Gcc-arm-none-eabi Ubuntu xenial *
Gcc-arm-none-eabi Ubuntu yakkety *
Gcc-arm-none-eabi Ubuntu zesty *
Gcc-h8300-hms Ubuntu upstream *
Gcc-i686-linux-android Ubuntu upstream *
Gcc-m68hc1x Ubuntu upstream *
Gcc-mingw-w64 Ubuntu artful *
Gcc-mingw-w64 Ubuntu esm-infra-legacy/trusty *
Gcc-mingw-w64 Ubuntu precise *
Gcc-mingw-w64 Ubuntu trusty *
Gcc-mingw-w64 Ubuntu trusty/esm *
Gcc-mingw-w64 Ubuntu upstream *
Gcc-mingw-w64 Ubuntu utopic *
Gcc-mingw-w64 Ubuntu vivid *
Gcc-mingw-w64 Ubuntu wily *
Gcc-mingw-w64 Ubuntu yakkety *
Gcc-mingw-w64 Ubuntu zesty *
Gcc-mingw32 Ubuntu lucid *
Gcc-mingw32 Ubuntu upstream *
Gcc-msp430 Ubuntu upstream *
Gcc-snapshot Ubuntu lucid *
Gcc-snapshot Ubuntu precise *
Gcc-snapshot Ubuntu trusty *
Gcc-snapshot Ubuntu upstream *

Potential Mitigations

  • Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • If possible, choose a language or compiler that performs automatic bounds checking.
  • Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • Use libraries or frameworks that make it easier to handle numbers without unexpected consequences.
  • Examples include safe integer handling packages such as SafeInt (C++) or IntegerLib (C or C++). [REF-106]
  • Perform input validation on any numeric input by ensuring that it is within the expected range. Enforce that the input meets both the minimum and maximum requirements for the expected range.
  • Use unsigned integers where possible. This makes it easier to perform validation for integer overflows. When signed integers are required, ensure that the range check includes minimum values as well as maximum values.
  • Understand the programming language’s underlying representation and how it interacts with numeric calculation (CWE-681). Pay close attention to byte size discrepancies, precision, signed/unsigned distinctions, truncation, conversion and casting between types, “not-a-number” calculations, and how the language handles numbers that are too large or too small for its underlying representation. [REF-7]
  • Also be careful to account for 32-bit, 64-bit, and other potential differences that may affect the numeric representation.

References