Vulnerabilities > CVE-2019-5052 - Integer Overflow or Wraparound vulnerability in multiple products
Attack vector
NETWORK Attack complexity
LOW Privileges required
NONE Confidentiality impact
HIGH Integrity impact
HIGH Availability impact
HIGH 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.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 1 | |
Application | 2 | |
OS | 1 | |
OS | 2 | |
OS | 2 |
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 family Ubuntu Local Security Checks NASL id UBUNTU_USN-4238-1.NASL description It 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 seen 2020-06-01 modified 2020-06-02 plugin id 132933 published 2020-01-15 reporter Ubuntu Security Notice (C) 2020 Canonical, Inc. / NASL script (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/132933 title Ubuntu 16.04 LTS / 18.04 LTS : sdl-image1.2 vulnerabilities (USN-4238-1) NASL family FreeBSD Local Security Checks NASL id FREEBSD_PKG_3394BC2B9DA411E9951E14DAE9D5A9D2.NASL description SDL_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 seen 2020-06-01 modified 2020-06-02 plugin id 126484 published 2019-07-05 reporter This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/126484 title FreeBSD : SDL2_image -- multiple vulnerabilities (3394bc2b-9da4-11e9-951e-14dae9d5a9d2) NASL family SuSE Local Security Checks NASL id OPENSUSE-2019-2070.NASL description This 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 seen 2020-06-01 modified 2020-06-02 plugin id 128539 published 2019-09-06 reporter This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/128539 title openSUSE Security Update : SDL2_image (openSUSE-2019-2070) NASL family SuSE Local Security Checks NASL id OPENSUSE-2019-2071.NASL description This 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 seen 2020-06-01 modified 2020-06-02 plugin id 128540 published 2019-09-06 reporter This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/128540 title openSUSE Security Update : SDL_image (openSUSE-2019-2071) NASL family Debian Local Security Checks NASL id DEBIAN_DLA-1861.NASL description The 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 seen 2020-06-01 modified 2020-06-02 plugin id 126927 published 2019-07-23 reporter This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/126927 title Debian DLA-1861-1 : libsdl2-image security update NASL family Debian Local Security Checks NASL id DEBIAN_DLA-1865.NASL description The 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 seen 2020-06-01 modified 2020-06-02 plugin id 127101 published 2019-07-29 reporter This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/127101 title Debian DLA-1865-1 : sdl-image1.2 security update
Talos
id | TALOS-2019-0821 |
last seen | 2019-07-29 |
published | 2019-07-02 |
reporter | Talos Intelligence |
source | http://www.talosintelligence.com/vulnerability_reports/TALOS-2019-0821 |
title | Simple DirectMedia Layer SDL2_image IMG_LoadPCX_RW signed comparison code execution vulnerability |
References
- https://talosintelligence.com/vulnerability_reports/TALOS-2019-0821
- https://lists.debian.org/debian-lts-announce/2019/07/msg00021.html
- https://lists.debian.org/debian-lts-announce/2019/07/msg00026.html
- http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00014.html
- http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00012.html
- http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00029.html
- http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00030.html
- https://usn.ubuntu.com/4238-1/