CVE Vulnerabilities

CVE-2020-14344

Integer Overflow or Wraparound

Published: Aug 05, 2020 | Modified: Nov 21, 2024
CVSS 3.x
6.7
MEDIUM
Source:
NVD
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
4.6 MEDIUM
AV:L/AC:L/Au:N/C:P/I:P/A:P
RedHat/V2
RedHat/V3
6.7 MODERATE
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

An integer overflow leading to a heap-buffer overflow was found in The X Input Method (XIM) client was implemented in libX11 before version 1.6.10. As per upstream this is security relevant when setuid programs call XIM client functions while running with elevated privileges. No such programs are shipped with Red Hat Enterprise Linux.

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 occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.

Affected Software

NameVendorStart VersionEnd Version
Libx11X.org*1.6.10 (excluding)
Red Hat Enterprise Linux 8RedHategl-wayland-0:1.1.5-3.el8*
Red Hat Enterprise Linux 8RedHatlibdrm-0:2.4.103-1.el8*
Red Hat Enterprise Linux 8RedHatlibglvnd-1:1.3.2-1.el8*
Red Hat Enterprise Linux 8RedHatlibinput-0:1.16.3-1.el8*
Red Hat Enterprise Linux 8RedHatlibwacom-0:1.6-2.el8*
Red Hat Enterprise Linux 8RedHatlibX11-0:1.6.8-4.el8*
Red Hat Enterprise Linux 8RedHatmesa-0:20.3.3-2.el8*
Red Hat Enterprise Linux 8RedHatxorg-x11-drivers-0:7.7-30.el8*
Red Hat Enterprise Linux 8RedHatxorg-x11-server-0:1.20.10-1.el8*
Libx11Ubuntubionic*
Libx11Ubuntuesm-infra-legacy/trusty*
Libx11Ubuntuesm-infra/bionic*
Libx11Ubuntuesm-infra/focal*
Libx11Ubuntuesm-infra/xenial*
Libx11Ubuntufocal*
Libx11Ubuntutrusty*
Libx11Ubuntutrusty/esm*
Libx11Ubuntuupstream*
Libx11Ubuntuxenial*

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 [REF-1482].
  • 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