Bug 1058082 - (CVE-2017-14249) VUL-2: CVE-2017-14249: ImageMagick: Problems with EOF check in ReadMPCImage leads to division by zero
(CVE-2017-14249)
VUL-2: CVE-2017-14249: ImageMagick: Problems with EOF check in ReadMPCImage l...
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Minor
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/191721/
CVSSv3:SUSE:CVE-2017-14249:5.3:(AV:N/...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-11 11:55 UTC by Victor Pereira
Modified: 2018-02-12 08:35 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Pereira 2017-09-11 11:55:32 UTC
CVE-2017-14249

ImageMagick 7.0.6-8 Q16 mishandles EOF checks in ReadMPCImage in coders/mpc.c,
leading to division by zero in GetPixelCacheTileSize in MagickCore/cache.c,
allowing remote attackers to cause a denial of service via a crafted file.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-14249
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14249
https://github.com/ImageMagick/ImageMagick/issues/708
Comment 1 Marcus Meissner 2017-09-29 09:44:37 UTC
floaitng point exception controlled abort. deferable.
Comment 2 Petr Gajdos 2018-01-05 09:12:59 UTC
BEFORE PATCH

12/ImageMagick

$ valgrind -q --leak-check=full convert 2-im2pcd out.pcd
convert: unexpected end-of-file `2-im2pcd': No such file or directory @ error/mpc.c/ReadMPCImage/947.
$

11/ImageMagick

$ valgrind -q --leak-check=full convert 2-im2pcd out.pcd
convert: Insufficient image data in file `2-im2pcd'.
convert: missing an image filename `out.pcd'.
$

11/GraphicsMagick

$ valgrind -q --leak-check=full gm convert 2-im2pcd out.pcd
gm convert: Unexpected end-of-file (2-im2pcd).
$

HG,42.x/GraphicsMagick

$ valgrind -q --leak-check=full gm convert 2-im2pcd out.pcd
gm convert: Memory allocation failed (2-im2pcd).
$

PATCH

https://github.com/ImageMagick/ImageMagick/commit/66112b7a7b64f688efe6fec53a829874a74dea04

Patch seem to fit everywhere, but I will not assume newer GraphicsMagick is affected as the test case does not show it really is, I think FPE should be visible.

AFTER PATCH

12/ImageMagick

$ valgrind -q --leak-check=full convert 2-im2pcd out.pcd
convert: unable to open pixel cache `2-im2pcd': No such file or directory @ error/cache.c/OpenPixelCache/3645.
convert: unable to persist pixel cache `2-im2pcd' @ error/mpc.c/ReadMPCImage/952.
convert: no images defined `out.pcd' @ error/convert.c/ConvertImageCommand/3149.
$

11/ImageMagick

$ valgrind -q --leak-check=full convert 2-im2pcd out.pcd
convert: Insufficient image data in file `2-im2pcd'.
convert: missing an image filename `out.pcd'.
$
[no change]

11/GraphicsMagick

$ valgrind -q --leak-check=full gm convert 2-im2pcd out.pcd
gm convert: Unable to persist pixel cache (2-im2pcd) [No such file or directory].
$
Comment 3 Petr Gajdos 2018-01-05 09:13:31 UTC
Will submit for: 12/ImageMagick, 11/ImageMagick and 11/GraphicsMagick
Comment 4 Petr Gajdos 2018-01-05 09:21:23 UTC
(In reply to Petr Gajdos from comment #2)
> BEFORE PATCH

In other words: could not reproduce FPE.
Comment 5 Petr Gajdos 2018-01-05 13:35:32 UTC
I believe all fixed.
Comment 9 Swamp Workflow Management 2018-01-09 20:23:11 UTC
SUSE-SU-2018:0055-1: An update that fixes 10 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1042948,1049373,1051412,1052252,1052771,1058082,1072902,1074122,1074425,1074610
CVE References: CVE-2017-1000445,CVE-2017-1000476,CVE-2017-11449,CVE-2017-11751,CVE-2017-12430,CVE-2017-12642,CVE-2017-14249,CVE-2017-17680,CVE-2017-17882,CVE-2017-9409
Sources used:
SUSE Linux Enterprise Workstation Extension 12-SP3 (src):    ImageMagick-6.8.8.1-71.23.1
SUSE Linux Enterprise Workstation Extension 12-SP2 (src):    ImageMagick-6.8.8.1-71.23.1
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    ImageMagick-6.8.8.1-71.23.1
SUSE Linux Enterprise Software Development Kit 12-SP2 (src):    ImageMagick-6.8.8.1-71.23.1
SUSE Linux Enterprise Server for Raspberry Pi 12-SP2 (src):    ImageMagick-6.8.8.1-71.23.1
SUSE Linux Enterprise Server 12-SP3 (src):    ImageMagick-6.8.8.1-71.23.1
SUSE Linux Enterprise Server 12-SP2 (src):    ImageMagick-6.8.8.1-71.23.1
SUSE Linux Enterprise Desktop 12-SP3 (src):    ImageMagick-6.8.8.1-71.23.1
SUSE Linux Enterprise Desktop 12-SP2 (src):    ImageMagick-6.8.8.1-71.23.1
Comment 10 Swamp Workflow Management 2018-01-15 14:13:58 UTC
openSUSE-SU-2018:0092-1: An update that fixes 10 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1042948,1049373,1051412,1052252,1052771,1058082,1072902,1074122,1074425,1074610
CVE References: CVE-2017-1000445,CVE-2017-1000476,CVE-2017-11449,CVE-2017-11751,CVE-2017-12430,CVE-2017-12642,CVE-2017-14249,CVE-2017-17680,CVE-2017-17882,CVE-2017-9409
Sources used:
openSUSE Leap 42.3 (src):    ImageMagick-6.8.8.1-46.1
openSUSE Leap 42.2 (src):    ImageMagick-6.8.8.1-30.18.1
Comment 11 Swamp Workflow Management 2018-01-18 14:14:55 UTC
SUSE-SU-2018:0132-1: An update that fixes 31 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1042948,1047044,1047898,1049373,1050120,1050606,1051412,1051446,1052252,1052468,1052550,1052710,1052720,1052731,1052732,1052771,1055065,1055323,1055434,1055855,1058082,1058640,1059751,1072902,1074122,1074123,1074425,1074610,1074969,1074973,1074975
CVE References: CVE-2017-1000445,CVE-2017-1000476,CVE-2017-10800,CVE-2017-11141,CVE-2017-11449,CVE-2017-11529,CVE-2017-11644,CVE-2017-11724,CVE-2017-11751,CVE-2017-12430,CVE-2017-12434,CVE-2017-12564,CVE-2017-12642,CVE-2017-12667,CVE-2017-12670,CVE-2017-12672,CVE-2017-12675,CVE-2017-13060,CVE-2017-13146,CVE-2017-13648,CVE-2017-13658,CVE-2017-14249,CVE-2017-14326,CVE-2017-14533,CVE-2017-17680,CVE-2017-17881,CVE-2017-17882,CVE-2017-18022,CVE-2017-9409,CVE-2018-5246,CVE-2018-5247
Sources used:
SUSE Linux Enterprise Software Development Kit 11-SP4 (src):    ImageMagick-6.4.3.6-7.78.22.1
SUSE Linux Enterprise Server 11-SP4 (src):    ImageMagick-6.4.3.6-7.78.22.1
SUSE Linux Enterprise Debuginfo 11-SP4 (src):    ImageMagick-6.4.3.6-7.78.22.1
Comment 12 Swamp Workflow Management 2018-01-24 20:13:53 UTC
SUSE-SU-2018:0197-1: An update that fixes 23 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1047044,1047054,1048457,1049373,1050129,1051412,1051847,1052252,1052460,1052758,1052764,1052771,1055063,1056550,1057723,1058082,1058422,1060577,1061587,1063050,1067177,1074969,1074975
CVE References: CVE-2017-10799,CVE-2017-10800,CVE-2017-11188,CVE-2017-11449,CVE-2017-11532,CVE-2017-12140,CVE-2017-12430,CVE-2017-12563,CVE-2017-12642,CVE-2017-12644,CVE-2017-12662,CVE-2017-12691,CVE-2017-13061,CVE-2017-14042,CVE-2017-14174,CVE-2017-14249,CVE-2017-14343,CVE-2017-14733,CVE-2017-14994,CVE-2017-15277,CVE-2017-16547,CVE-2017-18022,CVE-2018-5247
Sources used:
SUSE Studio Onsite 1.3 (src):    GraphicsMagick-1.2.5-4.78.28.2
SUSE Linux Enterprise Software Development Kit 11-SP4 (src):    GraphicsMagick-1.2.5-4.78.28.2
SUSE Linux Enterprise Debuginfo 11-SP4 (src):    GraphicsMagick-1.2.5-4.78.28.2
Comment 13 Marcus Meissner 2018-02-12 08:35:23 UTC
released