Bug 25766 - SDL_image new security issues CVE-2018-3977, CVE-2019-505[289], CVE-2019-5060, CVE-2019-7635, CVE-2019-1221[7-9], , CVE-2019-1222[0-2], CVE-2019-13616
Summary: SDL_image new security issues CVE-2018-3977, CVE-2019-505[289], CVE-2019-5060...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact: Sec team
URL:
Whiteboard: MGA7-64-OK
Keywords: advisory, validated_update
: 26085 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-11-26 22:13 CET by David Walser
Modified: 2020-01-16 14:08 CET (History)
5 users (show)

See Also:
Source RPM: SDL_image-1.2.12-12.mga7.src.rpm
CVE:
Status comment:


Attachments

Description David Walser 2019-11-26 22:13:49 CET
openSUSE has issued an advisory on September 5:
https://lists.opensuse.org/opensuse-updates/2019-09/msg00031.html

Mageia 7 is also affected.
David Walser 2019-11-26 22:13:59 CET

Whiteboard: (none) => MGA7TOO

David Walser 2019-11-26 22:15:14 CET

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=25767

Comment 1 Lewis Smith 2019-11-27 10:01:08 CET
No current maintainer, so assigning globally.

Assignee: bugsquad => pkg-bugs

Comment 2 Nicolas Salguero 2019-11-27 11:48:38 CET
Hi,

It really seems that CVE-2019-5057 is only for sdl2_image.

By comparing with Debian, I found that there are other CVEs for sdl_image 1.2

Summary: SDL_image new security issues CVE-2019-505[2789], CVE-2019-5060, CVE-2019-13616 => SDL_image new security issues CVE-2018-3977, CVE-2019-505[289], CVE-2019-5060, CVE-2019-7635, CVE-2019-1221[7-9], , CVE-2019-1222[0-2], CVE-2019-13616
CC: (none) => nicolas.salguero

Comment 3 Nicolas Salguero 2019-11-27 12:58:19 CET
Suggested advisory:
========================

The updated packages fix security vulnerabilities:

An exploitable code execution vulnerability exists in the XCF image rendering functionality of SDL2_image-2.0.3. A specially crafted XCF image can cause a heap overflow, resulting in code execution. An attacker can display a specially crafted image to trigger this vulnerability. (CVE-2018-3977)

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. (CVE-2019-5052)

An exploitable code execution vulnerability exists in the XCF image rendering functionality of SDL2_image 2.0.4. A specially crafted XCF image can cause a heap overflow, resulting in code execution. (CVE-2019-5058)

An exploitable code execution vulnerability exists in the XPM image rendering functionality of SDL2_image 2.0.4. A specially crafted XPM image can cause an integer overflow, allocating too small of a buffer. This buffer can then be written out of bounds resulting in a heap overflow, ultimately ending in code execution. (CVE-2019-5059)

An exploitable code execution vulnerability exists in the XPM image rendering function of SDL2_image 2.0.4. A specially crafted XPM image can cause an integer overflow in the colorhash function, allocating too small of a buffer. This buffer can then be written out of bounds, resulting in a heap overflow, ultimately ending in code execution. (CVE-2019-5060)

SDL (Simple DirectMedia Layer) through 1.2.15 and 2.x through 2.0.9 has a heap-based buffer over-read in Blit1to4 in video/SDL_blit_1.c. (CVE-2019-7635)

An issue was discovered in libSDL2.a in Simple DirectMedia Layer (SDL) 2.0.9 when used in conjunction with libSDL2_image.a in SDL2_image 2.0.4. There is a NULL pointer dereference in the SDL stdio_read function in file/SDL_rwops.c. (CVE-2019-12217)

An issue was discovered in libSDL2.a in Simple DirectMedia Layer (SDL) 2.0.9 when used in conjunction with libSDL2_image.a in SDL2_image 2.0.4. There is a NULL pointer dereference in the SDL2_image function IMG_LoadPCX_RW at IMG_pcx.c. (CVE-2019-12218)

An issue was discovered in libSDL2.a in Simple DirectMedia Layer (SDL) 2.0.9 when used in conjunction with libSDL2_image.a in SDL2_image 2.0.4. There is an invalid free error in the SDL function SDL_SetError_REAL at SDL_error.c. (CVE-2019-12219)

An issue was discovered in libSDL2.a in Simple DirectMedia Layer (SDL) 2.0.9 when used in conjunction with libSDL2_image.a in SDL2_image 2.0.4. There is an out-of-bounds read in the SDL function SDL_FreePalette_REAL at video/SDL_pixels.c. (CVE-2019-12220)

An issue was discovered in libSDL2.a in Simple DirectMedia Layer (SDL) 2.0.9 when used in conjunction with libSDL2_image.a in SDL2_image 2.0.4. There is a SEGV in the SDL function SDL_free_REAL at stdlib/SDL_malloc.c. (CVE-2019-12221)

An issue was discovered in libSDL2.a in Simple DirectMedia Layer (SDL) 2.0.9. There is an out-of-bounds read in the function SDL_InvalidateMap at video/SDL_pixels.c. (CVE-2019-12222)

SDL (Simple DirectMedia Layer) through 1.2.15 and 2.x through 2.0.9 has a heap-based buffer over-read in BlitNtoN in video/SDL_blit_N.c when called from SDL_SoftBlit in video/SDL_blit.c. (CVE-2019-13616)

References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-3977
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5052
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5058
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5059
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5060
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-7635
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12217
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12218
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12219
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12220
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12221
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12222
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-13616
https://lists.opensuse.org/opensuse-updates/2019-09/msg00031.html
========================

Updated packages in core/updates_testing:
========================
lib(64)SDL_image1.2_0-1.2.12-12.1.mga7
lib(64)SDL_image-devel-1.2.12-12.1.mga7
lib(64)SDL_image1.2_0-test-1.2.12-12.1.mga7

from SRPMS:
SDL_image-1.2.12-12.1.mga7.src.rpm

Assignee: pkg-bugs => qa-bugs
Status: NEW => ASSIGNED
Version: Cauldron => 7
Whiteboard: MGA7TOO => (none)

Comment 4 Len Lawrence 2019-12-02 17:49:43 CET
Mageia7, x86_64

CVE-2018-3977 refers to SDL2 but has been linked to SDL1.2 as well.
This appears to be a common thread.  No POC found for any of them.

Played or played around with the following from the list of whatrequires lib64SDL_image1.2_0.

bumprace
chroma
frozen-bubble
tuxpaint
tong

They all work as expected.  Looks good to go.

Whiteboard: (none) => MGA7-64-OK
CC: (none) => tarazed25

Comment 5 Thomas Andrews 2019-12-04 01:14:31 CET
Validating. Advisory in Comment 3.

CC: (none) => andrewsfarm, sysadmin-bugs
Keywords: (none) => validated_update

Thomas Backlund 2019-12-06 12:57:13 CET

Keywords: (none) => advisory
CC: (none) => tmb

Comment 6 Mageia Robot 2019-12-06 15:17:25 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGASA-2019-0363.html

Resolution: (none) => FIXED
Status: ASSIGNED => RESOLVED

Comment 7 David Walser 2020-01-16 14:08:23 CET
*** Bug 26085 has been marked as a duplicate of this bug. ***
Comment 8 David Walser 2020-01-16 14:08:58 CET
This also fixed CVE-2019-5051 and CVE-2019-12216:
https://usn.ubuntu.com/4238-1/

Note You need to log in before you can comment on or make changes to this bug.