Vulnerabilities > CVE-2019-5052 - Integer Overflow or Wraparound vulnerability in multiple products

047910
CVSS 6.8 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL

Summary

An exploitable integer overflow vulnerability exists when loading a PCX file in SDL2_image 2.0.4. A specially crafted file can cause an integer overflow, resulting in too little memory being allocated, which can lead to a buffer overflow and potential code execution. An attacker can provide a specially crafted image file to trigger this vulnerability.

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Forced Integer Overflow
    This attack forces an integer variable to go out of range. The integer variable is often used as an offset such as size of memory allocation or similarly. The attacker would typically control the value of such variable and try to get it out of range. For instance the integer in question is incremented past the maximum possible value, it may wrap to become a very small, or negative number, therefore providing a very incorrect value which can lead to unexpected behavior. At worst the attacker can execute arbitrary code.

Nessus

  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-4238-1.NASL
    descriptionIt was discovered that SDL_image incorrectly handled certain image files. An attacker could possibly use this issue to cause a denial of service or other unspecified impact. Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id132933
    published2020-01-15
    reporterUbuntu Security Notice (C) 2020 Canonical, Inc. / NASL script (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/132933
    titleUbuntu 16.04 LTS / 18.04 LTS : sdl-image1.2 vulnerabilities (USN-4238-1)
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_3394BC2B9DA411E9951E14DAE9D5A9D2.NASL
    descriptionSDL_image developers report : Fixed a number of security issues : - TALOS-2019-0820 - TALOS-2019-0821 - TALOS-2019-0841 - TALOS-2019-0842 - TALOS-2019-0843 - TALOS-2019-0844
    last seen2020-06-01
    modified2020-06-02
    plugin id126484
    published2019-07-05
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/126484
    titleFreeBSD : SDL2_image -- multiple vulnerabilities (3394bc2b-9da4-11e9-951e-14dae9d5a9d2)
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2019-2070.NASL
    descriptionThis update for SDL2_image fixes the following issues : Update to new upstream release 2.0.5. Security issues fixed : - TALOS-2019-0820 CVE-2019-5051: exploitable heap-based buffer overflow vulnerability when loading a PCX file (boo#1140419) - TALOS-2019-0821 CVE-2019-5052: exploitable integer overflow vulnerability when loading a PCX file (boo#1140421) - TALOS-2019-0841 CVE-2019-5057: code execution vulnerability in the PCX image-rendering functionality of SDL2_image (boo#1143763) - TALOS-2019-0842 CVE-2019-5058: heap overflow in XCF image rendering can lead to code execution (boo#1143764) - TALOS-2019-0843 CVE-2019-5059: heap overflow in XPM image (boo#1143766) - TALOS-2019-0844 CVE-2019-5060: integer overflow in the XPM image (boo#1143768) Not mentioned by upstream, but issues seemingly further fixed : - CVE-2019-12218: NULL pointer dereference in the SDL2_image function IMG_LoadPCX_RW (boo#1135789) - CVE-2019-12217: NULL pointer dereference in the SDL stdio_read function (boo#1135787) - CVE-2019-12220: SDL_image triggers an out-of-bounds read in the SDL function SDL_FreePalette_REAL (boo#1135806) - CVE-2019-12221: a SEGV caused by SDL_image in SDL function SDL_free_REAL in stdlib/SDL_malloc.c (boo#1135796) - CVE-2019-12222: out-of-bounds read triggered by SDL_image in the function SDL_InvalidateMap at video/SDL_pixels.c (boo#1136101) - CVE-2019-13616: fix heap buffer overflow when reading a crafted bmp file (boo#1141844).
    last seen2020-06-01
    modified2020-06-02
    plugin id128539
    published2019-09-06
    reporterThis script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/128539
    titleopenSUSE Security Update : SDL2_image (openSUSE-2019-2070)
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2019-2071.NASL
    descriptionThis update for SDL_image fixes the following issues : Update SDL_Image to new snapshot 1.2.12+hg695. Security issues fixed : - TALOS-2019-0821 CVE-2019-5052: exploitable integer overflow vulnerability when loading a PCX file (boo#1140421) - TALOS-2019-0841 CVE-2019-5057: code execution vulnerability in the PCX image-rendering functionality of SDL2_image (boo#1143763) - TALOS-2019-0842 CVE-2019-5058: heap overflow in XCF image rendering can lead to code execution (boo#1143764) - TALOS-2019-0843 CVE-2019-5059: heap overflow in XPM image handling (boo#1143766) - TALOS-2019-0844 CVE-2019-5060: integer overflow in the XPM image (boo#1143768) - CVE-2019-7635: heap-based buffer over-read in Blit1to4 in video/SDL_blit_1.c (boo#1124827) - CVE-2019-13616: fix heap buffer overflow when reading a crafted bmp file (boo#1141844).
    last seen2020-06-01
    modified2020-06-02
    plugin id128540
    published2019-09-06
    reporterThis script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/128540
    titleopenSUSE Security Update : SDL_image (openSUSE-2019-2071)
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DLA-1861.NASL
    descriptionThe following issues have been found in libsdl2-image, the image file loading library. CVE-2018-3977 Heap buffer overflow in IMG_xcf.c. This vulnerability might be leveraged by remote attackers to cause remote code execution or denial of service via a crafted XCF file. CVE-2019-5052 Integer overflow and subsequent buffer overflow in IMG_pcx.c. This vulnerability might be leveraged by remote attackers to cause remote code execution or denial of service via a crafted PCX file. CVE-2019-7635 Heap buffer overflow affecting Blit1to4, in IMG_bmp.c. This vulnerability might be leveraged by remote attackers to cause denial of service or any other unspecified impact via a crafted BMP file. CVE-2019-12216, CVE-2019-12217, CVE-2019-12218, CVE-2019-12219, CVE-2019-12220, CVE-2019-12221, CVE-2019-12222 Multiple out-of-bound read and write accesses affecting IMG_LoadPCX_RW, in IMG_pcx.c. These vulnerabilities might be leveraged by remote attackers to cause denial of service or any other unspecified impact via a crafted PCX file. For Debian 8
    last seen2020-06-01
    modified2020-06-02
    plugin id126927
    published2019-07-23
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/126927
    titleDebian DLA-1861-1 : libsdl2-image security update
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DLA-1865.NASL
    descriptionThe following issues have been found in sdl-image1.2, the 1.x version of the image file loading library. CVE-2018-3977 Heap buffer overflow in IMG_xcf.c. This vulnerability might be leveraged by remote attackers to cause remote code execution or denial of service via a crafted XCF file. CVE-2019-5051 Heap based buffer overflow in IMG_LoadPCX_RW, in IMG_pcx.c. This vulnerability might be leveraged by remote attackers to cause remote code execution or denial of service via a crafted PCX file. CVE-2019-5052 Integer overflow and subsequent buffer overflow in IMG_pcx.c. This vulnerability might be leveraged by remote attackers to cause remote code execution or denial of service via a crafted PCX file. CVE-2019-7635 Heap buffer overflow affecting Blit1to4, in IMG_bmp.c. This vulnerability might be leveraged by remote attackers to cause denial of service or any other unspecified impact via a crafted BMP file. CVE-2019-12216, CVE-2019-12217, CVE-2019-12218, CVE-2019-12219, CVE-2019-12220, CVE-2019-12221, CVE-2019-12222 Multiple out-of-bound read and write accesses affecting IMG_LoadPCX_RW, in IMG_pcx.c. These vulnerabilities might be leveraged by remote attackers to cause denial of service or any other unspecified impact via a crafted PCX file. For Debian 8
    last seen2020-06-01
    modified2020-06-02
    plugin id127101
    published2019-07-29
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/127101
    titleDebian DLA-1865-1 : sdl-image1.2 security update

Talos

idTALOS-2019-0821
last seen2019-07-29
published2019-07-02
reporterTalos Intelligence
sourcehttp://www.talosintelligence.com/vulnerability_reports/TALOS-2019-0821
titleSimple DirectMedia Layer SDL2_image IMG_LoadPCX_RW signed comparison code execution vulnerability