Bug 1052460 - (CVE-2017-12563) VUL-1: CVE-2017-12563: GraphicsMagick, ImageMagick: Memory exhaustion in ReadPSDImage in coders/psd.c, which allows attackers to cause DoS
(CVE-2017-12563)
VUL-1: CVE-2017-12563: GraphicsMagick, ImageMagick: Memory exhaustion in Read...
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P4 - Low : Normal
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/189646/
CVSSv2:SUSE:CVE-2017-12563:5.0:(AV:N/...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-07 06:27 UTC by Johannes Segitz
Modified: 2018-02-09 15:24 UTC (History)
1 user (show)

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


Attachments
Reproducer (37 bytes, image/x-psd)
2017-08-07 06:27 UTC, Johannes Segitz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Segitz 2017-08-07 06:27:33 UTC
Created attachment 735426 [details]
Reproducer

CVE-2017-12563

In ImageMagick 7.0.6-2, a memory exhaustion vulnerability was found in the
function ReadPSDImage in coders/psd.c, which allows attackers to cause a denial
of service.

valgrind --leak-check=full identify memory_exhaustion_in_ReadPSDImage
Reproducer doesn't trigger for me, but we're missing the free

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-12563
https://github.com/ImageMagick/ImageMagick/issues/599
Comment 1 Petr Gajdos 2017-12-12 12:10:42 UTC
42.2/GraphicsMagick and above does not have PSD decoder enabled.
Comment 2 Petr Gajdos 2017-12-12 16:16:13 UTC
I think the bug does not involve any memory leak. I do not see relevant valgrind errors, too.

BEFORE

12/ImageMagick

$ valgrind -q --leak-check=full identify -verbose memory_exhaustion_in_ReadPSDImage 
identify: improper image header `memory_exhaustion_in_ReadPSDImage' @ 
$

11/ImageMagick

$ identify -verbose memory_exhaustion_in_ReadPSDImage 
identify: Improper image header `memory_exhaustion_in_ReadPSDImage'.
$

11/GraphicsMagick

$ valgrind -q --leak-check=full gm identify -verbose memory_exhaustion_in_ReadPSDImage 
gm identify: Improper image header (memory_exhaustion_in_ReadPSDImage).
$

PATCH

https://github.com/ImageMagick/ImageMagick/commit/7d3af83d8b946f952bfd028451e6dfb1f7ace07a

AFTER

12/ImageMagick

$ identify memory_exhaustion_in_ReadPSDImage 
identify: insufficient image data in file `memory_exhaustion_in_ReadPSDImage' @ error/psd.c/ReadPSDImage/1762.
$

11/ImageMagick

$ identify -verbose memory_exhaustion_in_ReadPSDImage                               
identify: Insufficient image data in file `memory_exhaustion_in_ReadPSDImage'.
$

11/GraphicsMagick

$ gm identify memory_exhaustion_in_ReadPSDImage            
gm identify: Insufficient image data in file (memory_exhaustion_in_ReadPSDImage).
$

Will submit for: 12/ImageMagick, 11/ImageMagick and 11/GraphicsMagick.
Comment 3 Petr Gajdos 2017-12-14 10:54:06 UTC
I believe all fixed.
Comment 5 Swamp Workflow Management 2018-01-04 14:10:00 UTC
SUSE-SU-2018:0017-1: An update that fixes 9 vulnerabilities is now available.

Category: security (important)
Bug References: 1052460,1055053,1055063,1056550,1057723,1058422,1063049,1063050
CVE References: CVE-2017-12563,CVE-2017-12691,CVE-2017-13061,CVE-2017-13062,CVE-2017-14042,CVE-2017-14174,CVE-2017-14343,CVE-2017-15277,CVE-2017-15281
Sources used:
SUSE Linux Enterprise Workstation Extension 12-SP3 (src):    ImageMagick-6.8.8.1-71.20.1
SUSE Linux Enterprise Workstation Extension 12-SP2 (src):    ImageMagick-6.8.8.1-71.20.1
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    ImageMagick-6.8.8.1-71.20.1
SUSE Linux Enterprise Software Development Kit 12-SP2 (src):    ImageMagick-6.8.8.1-71.20.1
SUSE Linux Enterprise Server for Raspberry Pi 12-SP2 (src):    ImageMagick-6.8.8.1-71.20.1
SUSE Linux Enterprise Server 12-SP3 (src):    ImageMagick-6.8.8.1-71.20.1
SUSE Linux Enterprise Server 12-SP2 (src):    ImageMagick-6.8.8.1-71.20.1
SUSE Linux Enterprise Desktop 12-SP3 (src):    ImageMagick-6.8.8.1-71.20.1
SUSE Linux Enterprise Desktop 12-SP2 (src):    ImageMagick-6.8.8.1-71.20.1
Comment 6 Swamp Workflow Management 2018-01-05 17:08:24 UTC
openSUSE-SU-2018:0025-1: An update that fixes 9 vulnerabilities is now available.

Category: security (important)
Bug References: 1052460,1055053,1055063,1056550,1057723,1058422,1063049,1063050
CVE References: CVE-2017-12563,CVE-2017-12691,CVE-2017-13061,CVE-2017-13062,CVE-2017-14042,CVE-2017-14174,CVE-2017-14343,CVE-2017-15277,CVE-2017-15281
Sources used:
openSUSE Leap 42.3 (src):    ImageMagick-6.8.8.1-43.1
openSUSE Leap 42.2 (src):    ImageMagick-6.8.8.1-30.15.1
Comment 7 Swamp Workflow Management 2018-01-09 11:13:59 UTC
SUSE-SU-2018:0043-1: An update that fixes 9 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1052460,1055053,1055063,1056550,1057723,1058422,1063049,1063050
CVE References: CVE-2017-12563,CVE-2017-12691,CVE-2017-13061,CVE-2017-13062,CVE-2017-14042,CVE-2017-14174,CVE-2017-14343,CVE-2017-15277,CVE-2017-15281
Sources used:
SUSE Linux Enterprise Software Development Kit 11-SP4 (src):    ImageMagick-6.4.3.6-7.78.17.1
SUSE Linux Enterprise Server 11-SP4 (src):    ImageMagick-6.4.3.6-7.78.17.1
SUSE Linux Enterprise Debuginfo 11-SP4 (src):    ImageMagick-6.4.3.6-7.78.17.1
Comment 8 Swamp Workflow Management 2018-01-24 20:12:54 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 9 Marcus Meissner 2018-02-09 15:24:53 UTC
released