Bug 1135796 - (CVE-2019-12221) VUL-1: CVE-2019-12221: SDL_image, SDL2_image: a SEGV is caused by SDL_image in SDL function SDL_free_REAL in stdlib/SDL_malloc.c
(CVE-2019-12221)
VUL-1: CVE-2019-12221: SDL_image, SDL2_image: a SEGV is caused by SDL_image i...
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: Security
Leap 15.0
Other Other
: P4 - Low : Minor (vote)
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/233340/
CVSSv2:NVD:CVE-2019-12221:4.3:(AV:N/A...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-21 15:15 UTC by Alexandros Toptsoglou
Modified: 2020-01-16 13:51 UTC (History)
1 user (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
xx.c (87 bytes, text/x-csrc)
2019-05-21 15:20 UTC, Marcus Meissner
Details
foo.pcx (486 bytes, image/vnd.zbrush.pcx)
2019-05-21 15:21 UTC, Marcus Meissner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandros Toptsoglou 2019-05-21 15:15:56 UTC
CVE-2019-12221

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.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-12221
http://www.cvedetails.com/cve/CVE-2019-12221/
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12221
https://bugzilla.libsdl.org/show_bug.cgi?id=4628
Comment 1 Marcus Meissner 2019-05-21 15:20:59 UTC
Created attachment 805623 [details]
xx.c

QA REPRODUCER:

gcc -o xx xx.c -lSDL2_image
./xx
Comment 2 Marcus Meissner 2019-05-21 15:21:29 UTC
Created attachment 805624 [details]
foo.pcx

QA REPRODUCER:

foo.pcx 

to be used with the preivous attached code
Comment 3 Marcus Meissner 2019-05-21 15:22:13 UTC
==1522== Invalid write of size 8
==1522==    at 0x4C2F0A3: __GI_memcpy (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==1522==    by 0x50DB9A2: _IO_file_xsgetn (in /lib64/libc-2.22.so)
==1522==    by 0x50D157C: fread (in /lib64/libc-2.22.so)
==1522==    by 0x5DB942A: fread (stdio2.h:295)
==1522==    by 0x5DB942A: stdio_read (SDL_rwops.c:385)
==1522==    by 0x4E3E27D: IMG_LoadPCX_RW (IMG_pcx.c:158)
==1522==    by 0x4E3A15B: IMG_LoadTyped_RW (IMG.c:195)
==1522==    by 0x40054D: main (xx.c:4)
==1522==  Address 0x7315918 is 0 bytes after a block of size 24 alloc'd
==1522==    at 0x4C2A080: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==1522==    by 0x5DE9492: SDL_malloc_REAL (SDL_malloc.c:5328)
==1522==    by 0x5E1E5E5: SDL_CreateRGBSurfaceWithFormat_REAL (SDL_surface.c:122)
==1522==    by 0x4E3DF8E: IMG_LoadPCX_RW (IMG_pcx.c:141)
==1522==    by 0x4E3A15B: IMG_LoadTyped_RW (IMG.c:195)
==1522==    by 0x40054D: main (xx.c:4)
==1522== 


actually this error condition triggers:

    if (bpl > surface->pitch) {
        error = "bytes per line is too large (corrupt?)";
    }

and corrupts memory.
Comment 4 Tomáš Chvátal 2019-07-11 11:42:28 UTC
This is automated batch bugzilla cleanup.

The openSUSE 42.3 changed to end-of-life (EOL [1]) status. As such
it is no longer maintained, which means that it will not receive any
further security or bug fix updates.
As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
openSUSE (At this moment openSUSE Leap 15.1, 15.0 and Tumbleweed) please
feel free to reopen this bug against that version (!you must update the
"Version" component in the bug fields, do not just reopen please), or
alternatively create a new ticket.

Thank you for reporting this bug and we are sorry it could not be fixed
during the lifetime of the release.

[1] https://en.opensuse.org/Lifetime
Comment 5 Marcus Meissner 2019-07-11 13:51:44 UTC
unfixed for 15.0 and 15.1
Comment 6 Swamp Workflow Management 2019-08-23 11:00:14 UTC
This is an autogenerated message for OBS integration:
This bug (1135796) was mentioned in
https://build.opensuse.org/request/show/725541 15.0 / SDL2_image
https://build.opensuse.org/request/show/725542 15.1 / SDL2_image
Comment 7 Swamp Workflow Management 2019-08-23 15:50:14 UTC
This is an autogenerated message for OBS integration:
This bug (1135796) was mentioned in
https://build.opensuse.org/request/show/725636 Factory / SDL2_image
https://build.opensuse.org/request/show/725637 15.0 / SDL2_image
https://build.opensuse.org/request/show/725638 15.1 / SDL2_image
Comment 8 Swamp Workflow Management 2019-09-05 13:13:18 UTC
openSUSE-SU-2019:2070-1: An update that fixes 12 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1135787,1135789,1135796,1135806,1136101,1140419,1140421,1141844,1143763,1143764,1143766,1143768
CVE References: CVE-2019-12217,CVE-2019-12218,CVE-2019-12220,CVE-2019-12221,CVE-2019-12222,CVE-2019-13616,CVE-2019-5051,CVE-2019-5052,CVE-2019-5057,CVE-2019-5058,CVE-2019-5059,CVE-2019-5060
Sources used:
openSUSE Leap 15.1 (src):    SDL2_image-2.0.5-lp151.2.5.1
openSUSE Leap 15.0 (src):    SDL2_image-2.0.5-lp150.9.1
Comment 9 Swamp Workflow Management 2019-09-10 19:12:35 UTC
openSUSE-SU-2019:2108-1: An update that fixes 12 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1135787,1135789,1135796,1135806,1136101,1140419,1140421,1141844,1143763,1143764,1143766,1143768
CVE References: CVE-2019-12217,CVE-2019-12218,CVE-2019-12220,CVE-2019-12221,CVE-2019-12222,CVE-2019-13616,CVE-2019-5051,CVE-2019-5052,CVE-2019-5057,CVE-2019-5058,CVE-2019-5059,CVE-2019-5060
Sources used:
openSUSE Backports SLE-15-SP1 (src):    SDL2_image-2.0.5-bp151.4.3.1
openSUSE Backports SLE-15 (src):    SDL2_image-2.0.5-bp150.3.6.1
Comment 10 Alexandros Toptsoglou 2020-01-16 13:51:37 UTC
all done. Closing