CVE Vulnerabilities

CVE-2021-29338

Integer Overflow or Wraparound

Published: Apr 14, 2021 | Modified: Nov 21, 2024
CVSS 3.x
5.5
MEDIUM
Source:
NVD
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
CVSS 2.x
4.3 MEDIUM
AV:N/AC:M/Au:N/C:N/I:N/A:P
RedHat/V2
RedHat/V3
6.2 LOW
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H
Ubuntu
LOW

Integer Overflow in OpenJPEG v2.4.0 allows remote attackers to crash the application, causing a Denial of Service (DoS). This occurs when the attacker uses the command line option -ImgDir on a directory that contains 1048576 files.

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
Openjpeg Uclouvain 2.4.0 (including) 2.4.0 (including)
Red Hat Enterprise Linux 8 RedHat openjpeg2-0:2.4.0-4.el8 *
Blender Ubuntu bionic *
Blender Ubuntu devel *
Blender Ubuntu esm-apps/bionic *
Blender Ubuntu esm-apps/focal *
Blender Ubuntu esm-apps/jammy *
Blender Ubuntu esm-apps/noble *
Blender Ubuntu focal *
Blender Ubuntu groovy *
Blender Ubuntu hirsute *
Blender Ubuntu impish *
Blender Ubuntu jammy *
Blender Ubuntu kinetic *
Blender Ubuntu lunar *
Blender Ubuntu mantic *
Blender Ubuntu noble *
Blender Ubuntu oracular *
Blender Ubuntu trusty *
Blender Ubuntu xenial *
Ghostscript Ubuntu trusty *
Ghostscript Ubuntu xenial *
Insighttoolkit4 Ubuntu bionic *
Insighttoolkit4 Ubuntu esm-apps/bionic *
Insighttoolkit4 Ubuntu esm-apps/focal *
Insighttoolkit4 Ubuntu esm-apps/jammy *
Insighttoolkit4 Ubuntu focal *
Insighttoolkit4 Ubuntu groovy *
Insighttoolkit4 Ubuntu hirsute *
Insighttoolkit4 Ubuntu impish *
Insighttoolkit4 Ubuntu jammy *
Insighttoolkit4 Ubuntu kinetic *
Insighttoolkit4 Ubuntu lunar *
Insighttoolkit4 Ubuntu trusty *
Insighttoolkit4 Ubuntu xenial *
Openjpeg2 Ubuntu bionic *
Openjpeg2 Ubuntu esm-apps/bionic *
Openjpeg2 Ubuntu esm-apps/xenial *
Openjpeg2 Ubuntu focal *
Openjpeg2 Ubuntu groovy *
Openjpeg2 Ubuntu hirsute *
Openjpeg2 Ubuntu impish *
Openjpeg2 Ubuntu jammy *
Openjpeg2 Ubuntu kinetic *
Openjpeg2 Ubuntu lunar *
Openjpeg2 Ubuntu upstream *
Openjpeg2 Ubuntu xenial *
Qtwebengine-opensource-src Ubuntu bionic *
Qtwebengine-opensource-src Ubuntu devel *
Qtwebengine-opensource-src Ubuntu esm-apps/bionic *
Qtwebengine-opensource-src Ubuntu esm-apps/focal *
Qtwebengine-opensource-src Ubuntu esm-apps/jammy *
Qtwebengine-opensource-src Ubuntu esm-apps/noble *
Qtwebengine-opensource-src Ubuntu focal *
Qtwebengine-opensource-src Ubuntu groovy *
Qtwebengine-opensource-src Ubuntu hirsute *
Qtwebengine-opensource-src Ubuntu impish *
Qtwebengine-opensource-src Ubuntu jammy *
Qtwebengine-opensource-src Ubuntu kinetic *
Qtwebengine-opensource-src Ubuntu lunar *
Qtwebengine-opensource-src Ubuntu mantic *
Qtwebengine-opensource-src Ubuntu noble *
Qtwebengine-opensource-src Ubuntu oracular *
Texmaker Ubuntu bionic *
Texmaker Ubuntu devel *
Texmaker Ubuntu esm-apps/bionic *
Texmaker Ubuntu esm-apps/focal *
Texmaker Ubuntu esm-apps/jammy *
Texmaker Ubuntu esm-apps/noble *
Texmaker Ubuntu focal *
Texmaker Ubuntu groovy *
Texmaker Ubuntu hirsute *
Texmaker Ubuntu impish *
Texmaker Ubuntu jammy *
Texmaker Ubuntu kinetic *
Texmaker Ubuntu lunar *
Texmaker Ubuntu mantic *
Texmaker Ubuntu noble *
Texmaker Ubuntu oracular *
Texmaker Ubuntu trusty *
Texmaker Ubuntu xenial *

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