Bug 1055219 - (CVE-2017-13133) VUL-1: CVE-2017-13133: ImageMagick: In ImageMagick 7.0.6-8, the load_level function in coders/xcf.c lacksoffset validation, which allows attackers to cause a denial of service(load_tile memory exhaustion) via a crafted file
(CVE-2017-13133)
VUL-1: CVE-2017-13133: ImageMagick: In ImageMagick 7.0.6-8, the load_level fu...
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Major
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/190908/
CVSSv3:SUSE:CVE-2017-13133:6.5:(AV:N/...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-23 10:12 UTC by Marcus Meissner
Modified: 2018-02-12 08:27 UTC (History)
1 user (show)

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


Attachments
memory_exhaustion_in_load_tile (215 bytes, application/octet-stream)
2017-08-23 10:13 UTC, Marcus Meissner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Meissner 2017-08-23 10:12:26 UTC
CVE-2017-13133

In ImageMagick 7.0.6-8, the load_level function in coders/xcf.c lacks
offset validation, which allows attackers to cause a denial of service
(load_tile memory exhaustion) via a crafted file.

https://github.com/ImageMagick/ImageMagick/issues/679
Comment 1 Marcus Meissner 2017-08-23 10:13:19 UTC
Created attachment 737970 [details]
memory_exhaustion_in_load_tile

QA REPRODUCER:

identify memory_exhaustion_in_load_tile

should not run the machine a bit out of memory and not report memory exhaustion
Comment 2 Marcus Meissner 2017-08-23 10:14:00 UTC
graphicsmagick does not seem to be affected by this.
Comment 3 Marcus Meissner 2017-09-29 07:44:21 UTC
attacker controlled large memory allocation
Comment 4 Petr Gajdos 2017-10-23 12:12:11 UTC
ImageMagick's commit assigned to upstream issue 679:
https://github.com/ImageMagick/ImageMagick/commit/fad03699658d2607562a8487c944c300d59a1ca5
Comment 5 Petr Gajdos 2017-10-23 12:12:47 UTC
11/GraphicsMagick does not have xcf decoder.
Comment 6 Petr Gajdos 2017-10-23 12:53:42 UTC
I cannot reproduce memory exhaustion for 42.3/GraphicsMagick, 42.2/GraphicsMagick, 12/ImageMagick or 11/ImageMagick. I get 'improper image header' and program immediately exits.

Mercurial commit -> GraphicsMagick not affected:
http://hg.code.sf.net/p/graphicsmagick/code/diff/1e667cf4cef7/coders/xcf.c

I will submit the change to 11/ImageMagick and 12/ImageMagick.
Comment 7 Petr Gajdos 2017-10-23 14:24:59 UTC
Disregard comment 6. Correct results are:

GraphicsMagick
--------------
11/GraphicsMagick have not xcf decoder. For 42.3, 42.2 I get:

$ gm identify memory_exhaustion_in_load_tile  
gm identify: Request did not return an image.
$

Mercurial commit -> GraphicsMagick not affected:
http://hg.code.sf.net/p/graphicsmagick/code/diff/1e667cf4cef7/coders/xcf.c

ImageMagick
-----------
BEFORE

11,12

$ identify memory_exhaustion_in_load_tile
055219: memory allocation failed `memory_exhaustion_in_load_tile' @ error/xcf.c/ReadXCFImage/1349.
$

AFTER

11

Same as BEFORE.

So the testcase does not work for me, but I will submit the check to 11/ImageMagick and 12/ImageMagick despite of this fact.
Comment 8 Petr Gajdos 2017-10-25 12:28:17 UTC
I believe all fixed.
Comment 11 Swamp Workflow Management 2017-11-08 11:18:54 UTC
SUSE-SU-2017:2949-1: An update that fixes 9 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1049379,1050135,1052249,1052253,1052545,1054924,1055219,1055430,1061873
CVE References: CVE-2016-7530,CVE-2017-11446,CVE-2017-11534,CVE-2017-12428,CVE-2017-12431,CVE-2017-12433,CVE-2017-13133,CVE-2017-13139,CVE-2017-15033
Sources used:
SUSE Linux Enterprise Workstation Extension 12-SP3 (src):    ImageMagick-6.8.8.1-71.12.1
SUSE Linux Enterprise Workstation Extension 12-SP2 (src):    ImageMagick-6.8.8.1-71.12.1
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    ImageMagick-6.8.8.1-71.12.1
SUSE Linux Enterprise Software Development Kit 12-SP2 (src):    ImageMagick-6.8.8.1-71.12.1
SUSE Linux Enterprise Server for Raspberry Pi 12-SP2 (src):    ImageMagick-6.8.8.1-71.12.1
SUSE Linux Enterprise Server 12-SP3 (src):    ImageMagick-6.8.8.1-71.12.1
SUSE Linux Enterprise Server 12-SP2 (src):    ImageMagick-6.8.8.1-71.12.1
SUSE Linux Enterprise Desktop 12-SP3 (src):    ImageMagick-6.8.8.1-71.12.1
SUSE Linux Enterprise Desktop 12-SP2 (src):    ImageMagick-6.8.8.1-71.12.1
Comment 12 Swamp Workflow Management 2017-11-12 17:12:39 UTC
openSUSE-SU-2017:2999-1: An update that fixes 9 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1049379,1050135,1052249,1052253,1052545,1054924,1055219,1055430,1061873
CVE References: CVE-2016-7530,CVE-2017-11446,CVE-2017-11534,CVE-2017-12428,CVE-2017-12431,CVE-2017-12433,CVE-2017-13133,CVE-2017-13139,CVE-2017-15033
Sources used:
openSUSE Leap 42.3 (src):    ImageMagick-6.8.8.1-37.1
openSUSE Leap 42.2 (src):    ImageMagick-6.8.8.1-30.9.1
Comment 13 Swamp Workflow Management 2017-12-01 02:07:31 UTC
SUSE-SU-2017:3168-1: An update that fixes four vulnerabilities is now available.

Category: security (moderate)
Bug References: 1050135,1055219,1055430,1061873
CVE References: CVE-2017-11534,CVE-2017-13133,CVE-2017-13139,CVE-2017-15033
Sources used:
SUSE Linux Enterprise Software Development Kit 11-SP4 (src):    ImageMagick-6.4.3.6-7.78.8.1
SUSE Linux Enterprise Server 11-SP4 (src):    ImageMagick-6.4.3.6-7.78.8.1
SUSE Linux Enterprise Debuginfo 11-SP4 (src):    ImageMagick-6.4.3.6-7.78.8.1
Comment 14 Marcus Meissner 2018-02-12 08:27:35 UTC
released