Bugzilla – Bug 1040025
VUL-0: CVE-2017-9098: GraphicsMagick,ImageMagick: coders/rle.c. uninitialized memory usage in the ReadRLEImage RLE decoder function
Last modified: 2017-08-25 12:43:56 UTC
CVE-2017-9098 ImageMagick before 7.0.5-2 uses uninitialized memory in the RLE decoder, allowing an attacker to leak sensitive information from process memory space, as demonstrated by remote attacks against ImageMagick code in a long-running server process that converts image data on behalf of multiple users. This is caused by a missing initialization step in the ReadRLEImage function in coders/rle.c. References: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-9098 http://people.canonical.com/~ubuntu-security/cve/2017/CVE-2017-9098.html http://www.cvedetails.com/cve/CVE-2017-9098/ https://scarybeastsecurity.blogspot.com/2017/05/bleed-continues-18-byte-file-14k-bounty.html https://github.com/ImageMagick/ImageMagick/commit/1c358ffe0049f768dd49a8a889c1cbf99ac9849b
Created attachment 725789 [details] CVE-2017-9098.rle QA REPRODUCER: valgrind convert CVE-2017-9098.rle foo.jpg shjould not report uninitialized memory reads
affects SLE11 and SLE12 GM/IM Factory GraphicsMagick might be fixed already, also ImageMagick in factory seems not to trigger valgrind
Tested with 12/ImageMagick: $ valgrind convert CVE-2017-9098.rle foo.jpg [..] ==9425== Thread 6: ==9425== Conditional jump or move depends on uninitialised value(s) ==9425== at 0x4F46C90: PushColormapIndex (image.c:3397) ==9425== by 0x4F46C90: SyncImage._omp_fn.4 (image.c:3457) ==9425== by 0x716ABE9: ??? (in /usr/lib64/libgomp.so.1.0.0) ==9425== by 0x55FC0A3: start_thread (in /lib64/libpthread-2.19.so) ==9425== by 0x58F602C: clone (in /lib64/libc-2.19.so) ==9425== ==9425== Use of uninitialised value of size 8 ==9425== at 0x4F46C68: SyncImage._omp_fn.4 (image.c:3460) ==9425== by 0x716ABE9: ??? (in /usr/lib64/libgomp.so.1.0.0) ==9425== by 0x55FC0A3: start_thread (in /lib64/libpthread-2.19.so) ==9425== by 0x58F602C: clone (in /lib64/libc-2.19.so) ==9425== ==9425== Thread 1: ==9425== Conditional jump or move depends on uninitialised value(s) ==9425== at 0x4F46C90: PushColormapIndex (image.c:3397) ==9425== by 0x4F46C90: SyncImage._omp_fn.4 (image.c:3457) ==9425== by 0x4F4B088: SyncImage (image.c:3429) ==9425== by 0x8418B2A: ReadRLEImage (rle.c:564) ==9425== by 0x4EBF2BA: ReadImage (constitute.c:601) ==9425== by 0x4EC037A: ReadImages (constitute.c:907) ==9425== by 0x5319BAE: ConvertImageCommand (convert.c:617) ==9425== by 0x5385C72: MagickCommandGenesis (mogrify.c:166) ==9425== by 0x400906: ConvertMain (convert.c:81) ==9425== by 0x400906: main (convert.c:92) ==9425== ==9425== Use of uninitialised value of size 8 ==9425== at 0x4F46C68: SyncImage._omp_fn.4 (image.c:3460) ==9425== by 0x4F4B088: SyncImage (image.c:3429) ==9425== by 0x8418B2A: ReadRLEImage (rle.c:564) ==9425== by 0x4EBF2BA: ReadImage (constitute.c:601) ==9425== by 0x4EC037A: ReadImages (constitute.c:907) ==9425== by 0x5319BAE: ConvertImageCommand (convert.c:617) ==9425== by 0x5385C72: MagickCommandGenesis (mogrify.c:166) ==9425== by 0x400906: ConvertMain (convert.c:81) ==9425== by 0x400906: main (convert.c:92) ==9425== ==9425== [..] ==9425== ERROR SUMMARY: 2097152 errors from 4 contexts (suppressed: 0 from 0) $ AFTER $ valgrind convert CVE-2017-9098.rle foo.jpg [..] ==22584== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) $ Similarly for 11/ImageMagick, even exactly same number of errors. I do not get any such valgrind error for 11/ImageMagick and 42.2/GraphicsMagick. 42.2/GraphicsMagick contains memset() added by http://hg.code.sf.net/p/graphicsmagick/code/diff/0a5b75e019b6/coders/rle.c though, so considering 11/GraphicsMagick affected, too. Summary, basically see comment 2.
Packages submitted.
SUSE-SU-2017:1489-1: An update that fixes 27 vulnerabilities is now available. Category: security (moderate) Bug References: 1028075,1033091,1034870,1034872,1034876,1036976,1036977,1036978,1036980,1036981,1036982,1036983,1036984,1036985,1036986,1036987,1036988,1036989,1036990,1036991,1037527,1038000,1040025,1040303,1040304,1040306,1040332 CVE References: CVE-2017-6502,CVE-2017-7606,CVE-2017-7941,CVE-2017-7942,CVE-2017-7943,CVE-2017-8343,CVE-2017-8344,CVE-2017-8345,CVE-2017-8346,CVE-2017-8347,CVE-2017-8348,CVE-2017-8349,CVE-2017-8350,CVE-2017-8351,CVE-2017-8352,CVE-2017-8353,CVE-2017-8354,CVE-2017-8355,CVE-2017-8356,CVE-2017-8357,CVE-2017-8765,CVE-2017-8830,CVE-2017-9098,CVE-2017-9141,CVE-2017-9142,CVE-2017-9143,CVE-2017-9144 Sources used: SUSE Linux Enterprise Workstation Extension 12-SP2 (src): ImageMagick-6.8.8.1-70.1 SUSE Linux Enterprise Software Development Kit 12-SP2 (src): ImageMagick-6.8.8.1-70.1 SUSE Linux Enterprise Server for Raspberry Pi 12-SP2 (src): ImageMagick-6.8.8.1-70.1 SUSE Linux Enterprise Server 12-SP2 (src): ImageMagick-6.8.8.1-70.1 SUSE Linux Enterprise Desktop 12-SP2 (src): ImageMagick-6.8.8.1-70.1
openSUSE-SU-2017:1560-1: An update that fixes 27 vulnerabilities is now available. Category: security (moderate) Bug References: 1028075,1033091,1034870,1034872,1034876,1036976,1036977,1036978,1036980,1036981,1036982,1036983,1036984,1036985,1036986,1036987,1036988,1036989,1036990,1036991,1037527,1038000,1040025,1040303,1040304,1040306,1040332 CVE References: CVE-2017-6502,CVE-2017-7606,CVE-2017-7941,CVE-2017-7942,CVE-2017-7943,CVE-2017-8343,CVE-2017-8344,CVE-2017-8345,CVE-2017-8346,CVE-2017-8347,CVE-2017-8348,CVE-2017-8349,CVE-2017-8350,CVE-2017-8351,CVE-2017-8352,CVE-2017-8353,CVE-2017-8354,CVE-2017-8355,CVE-2017-8356,CVE-2017-8357,CVE-2017-8765,CVE-2017-8830,CVE-2017-9098,CVE-2017-9141,CVE-2017-9142,CVE-2017-9143,CVE-2017-9144 Sources used: openSUSE Leap 42.2 (src): ImageMagick-6.8.8.1-30.3.1
SUSE-SU-2017:1599-1: An update that fixes 25 vulnerabilities is now available. Category: security (moderate) Bug References: 1033091,1034870,1034872,1034876,1036976,1036978,1036980,1036981,1036983,1036984,1036985,1036986,1036987,1036988,1036989,1036990,1037527,1038000,1040025,1040303,1040304,1040306,1040332 CVE References: CVE-2014-9846,CVE-2016-10050,CVE-2017-7606,CVE-2017-7941,CVE-2017-7942,CVE-2017-7943,CVE-2017-8344,CVE-2017-8345,CVE-2017-8346,CVE-2017-8348,CVE-2017-8349,CVE-2017-8350,CVE-2017-8351,CVE-2017-8352,CVE-2017-8353,CVE-2017-8354,CVE-2017-8355,CVE-2017-8357,CVE-2017-8765,CVE-2017-8830,CVE-2017-9098,CVE-2017-9141,CVE-2017-9142,CVE-2017-9143,CVE-2017-9144 Sources used: SUSE Linux Enterprise Software Development Kit 11-SP4 (src): ImageMagick-6.4.3.6-7.77.1 SUSE Linux Enterprise Server 11-SP4 (src): ImageMagick-6.4.3.6-7.77.1 SUSE Linux Enterprise Debuginfo 11-SP4 (src): ImageMagick-6.4.3.6-7.77.1
SUSE-SU-2017:1600-1: An update that fixes 17 vulnerabilities is now available. Category: security (moderate) Bug References: 1033091,1034876,1036978,1036980,1036981,1036984,1036985,1036986,1036987,1036988,1036990,1037527,1038000,1040025,1040304,1040332,984144 CVE References: CVE-2014-9847,CVE-2017-7606,CVE-2017-7941,CVE-2017-8344,CVE-2017-8345,CVE-2017-8346,CVE-2017-8349,CVE-2017-8350,CVE-2017-8351,CVE-2017-8352,CVE-2017-8353,CVE-2017-8355,CVE-2017-8765,CVE-2017-8830,CVE-2017-9098,CVE-2017-9142,CVE-2017-9144 Sources used: SUSE Studio Onsite 1.3 (src): GraphicsMagick-1.2.5-4.77.1 SUSE Linux Enterprise Software Development Kit 11-SP4 (src): GraphicsMagick-1.2.5-4.77.1 SUSE Linux Enterprise Debuginfo 11-SP4 (src): GraphicsMagick-1.2.5-4.77.1
released