Bug 1058640 - (CVE-2017-14326) VUL-1: CVE-2017-14326: ImageMagick: Memory leak in the ReadMATImage function
(CVE-2017-14326)
VUL-1: CVE-2017-14326: ImageMagick: Memory leak in the ReadMATImage function
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P4 - Low : Minor
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/191825/
CVSSv2:NVD:CVE-2017-14326:4.3:(AV:N/A...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-14 07:13 UTC by Victor Pereira
Modified: 2018-01-31 20:27 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-14 07:13:08 UTC
In ImageMagick 7.0.7-1 Q16, a memory leak vulnerability was found in the
function ReadMATImage in coders/mat.c, which allows attackers to cause a denial
of service via a crafted file.

References:
https://bugzilla.redhat.com/show_bug.cgi?id=1491347
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-14326
http://people.canonical.com/~ubuntu-security/cve/2017/CVE-2017-14326.html
https://github.com/ImageMagick/ImageMagick/issues/740
Comment 2 Petr Gajdos 2018-01-08 08:45:34 UTC
12/ImageMagick

BEFORE

$ valgrind -q --leak-check=full convert im_poc_1504844768.mat /dev/null
convert: multi-dimensional matrices are not supported `im_poc_1504844768.mat' @ error/mat.c/ReadMATImage/735.
convert: no images defined `/dev/null' @ error/convert.c/ConvertImageCommand/3149.
==18129== 17,007 (16,792 direct, 215 indirect) bytes in 1 blocks are definitely lost in loss record 15 of 15
==18129==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==18129==    by 0x4F48E1F: AcquireImageInfo (image.c:334)
==18129==    by 0x4F4AB3D: CloneImageInfo (image.c:936)
==18129==    by 0x8418267: ???
==18129==    by 0x4EBFE1A: ReadImage (constitute.c:601)
==18129==    by 0x4EC0EDA: ReadImages (constitute.c:907)
==18129==    by 0x5319B8E: ConvertImageCommand (convert.c:617)
==18129==    by 0x5385C52: MagickCommandGenesis (mogrify.c:166)
==18129==    by 0x400836: ConvertMain (convert.c:81)
==18129==    by 0x400836: main (convert.c:92)
==18129== 
$

AFTER

$ valgrind -q --leak-check=full convert im_poc_1504844768.mat /dev/null
convert: multi-dimensional matrices are not supported `im_poc_1504844768.mat' @ error/mat.c/ReadMATImage/1016.
convert: no images defined `/dev/null' @ error/convert.c/ConvertImageCommand/3149.
$
Comment 4 Petr Gajdos 2018-01-08 11:06:01 UTC
11/ImageMagick

BEFORE

$ valgrind -q --leak-check=full convert im_poc_1504844768.mat /dev/null
convert: Multi-dimensional matrices are not supported `im_poc_1504844768.mat'.
convert: missing an image filename `/dev/null'.
==11097== 
==11097== 16,784 bytes in 1 blocks are definitely lost in loss record 2 of 2
==11097==    at 0x4C256AE: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
==11097==    by 0x4F0AF9E: AcquireImageInfo (image.c:368)
==11097==    by 0x4F0B05D: CloneImageInfo (image.c:1223)
==11097==    by 0x9F09180: ???
==11097==    by 0x4E94D87: ReadImage (constitute.c:441)
==11097==    by 0x5292BC3: ConvertImageCommand (convert.c:565)
==11097==    by 0x400F73: main (convert.c:122)
$

AFTER

$ valgrind -q --leak-check=full convert im_poc_1504844768.mat /dev/null
convert: Multi-dimensional matrices are not supported `im_poc_1504844768.mat'.
convert: missing an image filename `/dev/null'.
$
Comment 6 Petr Gajdos 2018-01-08 14:34:38 UTC
HG/GraphicsMagick

$ valgrind -q --leak-check=full gm convert im_poc_1504844768.mat /dev/null
gm convert: Multi-dimensional matrices are not supported (im_poc_1504844768.mat).
$

42.x/GraphicsMagick

$ valgrind -q --leak-check=full gm convert im_poc_1504844768.mat /dev/null
gm convert: Multi-dimensional matrices are not supported (im_poc_1504844768.mat).
$

11/GraphicsMagick

$ valgrind -q --leak-check=full gm convert im_poc_1504844768.mat /dev/null
gm convert: Multi-dimensional matrices are not supported (im_poc_1504844768.mat).
$

Does not reproduce.

11/GraphicsMagick: no image2 and clone_info variables
42.x/GraphicsMagick: affected, will use ThrowImg2MATReaderException() instead of ThrowMATReaderException()
HG/GraphicsMagick: seem to be hardened enough
Comment 7 Petr Gajdos 2018-01-08 14:35:09 UTC
Will submit for: 12/ImageMagick, 11/ImageMagick and 42.x/GraphicsMagick.
Comment 8 Petr Gajdos 2018-01-08 15:26:49 UTC
I believe all fixed.
Comment 9 Swamp Workflow Management 2018-01-08 15:50:42 UTC
This is an autogenerated message for OBS integration:
This bug (1058640) was mentioned in
https://build.opensuse.org/request/show/562562 42.3 / GraphicsMagick
https://build.opensuse.org/request/show/562563 42.2 / GraphicsMagick
Comment 10 Swamp Workflow Management 2018-01-09 13:10:39 UTC
This is an autogenerated message for OBS integration:
This bug (1058640) was mentioned in
https://build.opensuse.org/request/show/562871 42.3 / GraphicsMagick
https://build.opensuse.org/request/show/562872 42.2 / GraphicsMagick
Comment 12 Swamp Workflow Management 2018-01-15 14:09:20 UTC
openSUSE-SU-2018:0087-1: An update that solves 13 vulnerabilities and has one errata is now available.

Category: security (moderate)
Bug References: 1047044,1049373,1050129,1051412,1052468,1052710,1052720,1052731,1055065,1055434,1058640,1067177,1074123,1074975
CVE References: CVE-2017-10800,CVE-2017-11449,CVE-2017-11532,CVE-2017-12564,CVE-2017-12670,CVE-2017-12672,CVE-2017-12675,CVE-2017-13060,CVE-2017-13648,CVE-2017-14326,CVE-2017-16547,CVE-2017-17881,CVE-2017-18022
Sources used:
openSUSE Leap 42.3 (src):    GraphicsMagick-1.3.25-57.1
openSUSE Leap 42.2 (src):    GraphicsMagick-1.3.25-11.60.1
Comment 13 Swamp Workflow Management 2018-01-18 14:09:57 UTC
SUSE-SU-2018:0130-1: An update that fixes 21 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1047044,1047898,1050120,1050606,1051446,1052468,1052550,1052710,1052720,1052731,1052732,1055065,1055323,1055434,1055855,1058640,1059751,1074123,1074969,1074973,1074975
CVE References: CVE-2017-10800,CVE-2017-11141,CVE-2017-11529,CVE-2017-11644,CVE-2017-11724,CVE-2017-12434,CVE-2017-12564,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-14326,CVE-2017-14533,CVE-2017-17881,CVE-2017-18022,CVE-2018-5246,CVE-2018-5247
Sources used:
SUSE Linux Enterprise Workstation Extension 12-SP3 (src):    ImageMagick-6.8.8.1-71.26.1
SUSE Linux Enterprise Workstation Extension 12-SP2 (src):    ImageMagick-6.8.8.1-71.26.1
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    ImageMagick-6.8.8.1-71.26.1
SUSE Linux Enterprise Software Development Kit 12-SP2 (src):    ImageMagick-6.8.8.1-71.26.1
SUSE Linux Enterprise Server for Raspberry Pi 12-SP2 (src):    ImageMagick-6.8.8.1-71.26.1
SUSE Linux Enterprise Server 12-SP3 (src):    ImageMagick-6.8.8.1-71.26.1
SUSE Linux Enterprise Server 12-SP2 (src):    ImageMagick-6.8.8.1-71.26.1
SUSE Linux Enterprise Desktop 12-SP3 (src):    ImageMagick-6.8.8.1-71.26.1
SUSE Linux Enterprise Desktop 12-SP2 (src):    ImageMagick-6.8.8.1-71.26.1
Comment 14 Swamp Workflow Management 2018-01-18 14:15:04 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 15 Swamp Workflow Management 2018-01-20 17:14:11 UTC
openSUSE-SU-2018:0155-1: An update that fixes 21 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1047044,1047898,1050120,1050606,1051446,1052468,1052550,1052710,1052720,1052731,1052732,1055065,1055323,1055434,1055855,1058640,1059751,1074123,1074969,1074973,1074975
CVE References: CVE-2017-10800,CVE-2017-11141,CVE-2017-11529,CVE-2017-11644,CVE-2017-11724,CVE-2017-12434,CVE-2017-12564,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-14326,CVE-2017-14533,CVE-2017-17881,CVE-2017-18022,CVE-2018-5246,CVE-2018-5247
Sources used:
openSUSE Leap 42.3 (src):    ImageMagick-6.8.8.1-49.1
openSUSE Leap 42.2 (src):    ImageMagick-6.8.8.1-30.21.1
Comment 16 Andreas Stieger 2018-01-31 20:27:50 UTC
releasing for Leap,done