Bug 1061587 - (CVE-2017-14994) VUL-0: CVE-2017-14994: GraphicsMagick: denial of service (NULL pointer) in ReadDCMImage in coders/dcm.c
(CVE-2017-14994)
VUL-0: CVE-2017-14994: GraphicsMagick: denial of service (NULL pointer) in Re...
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Normal
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/192778/
CVSSv2:SUSE:CVE-2017-14994:5.0:(AV:N/...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-04 12:46 UTC by Alexander Bergmann
Modified: 2018-02-12 08:40 UTC (History)
2 users (show)

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


Attachments
QA Reproducer (631 bytes, application/dicom)
2017-10-04 13:48 UTC, Alexander Bergmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Bergmann 2017-10-04 12:46:56 UTC
CVE-2017-14994

ReadDCMImage in coders/dcm.c in GraphicsMagick 1.3.26 allows remote attackers to
cause a denial of service (NULL pointer dereference) via a crafted DICOM image,
related to the ability of DCM_ReadNonNativeImages to yield an image list with
zero frames.

Upstream bug:
https://sourceforge.net/p/graphicsmagick/bugs/512/

Upstream fix:
http://hg.graphicsmagick.org/hg/GraphicsMagick?cmd=changeset;node=b3eca3eaa264

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-14994
http://seclists.org/oss-sec/2017/q4/8
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14994
http://hg.graphicsmagick.org/hg/GraphicsMagick?cmd=changeset;node=0683f8724200
https://nandynarwhals.org/CVE-2017-14994/
Comment 1 Alexander Bergmann 2017-10-04 13:48:26 UTC
Created attachment 743027 [details]
QA Reproducer

#> gm identify crash.dcm 
Segmentation fault (core dumped)
Comment 2 Petr Gajdos 2017-12-04 16:54:27 UTC
BEFORE

See comment 1, I can reproduce with GraphicsMagick (11, 42.3), but for 11, the crash have another reason in source file. I can not reproduce with ImageMagick. For both 11 and 12 I get:

$ identify crash.dcm
count=545 quantum=1 length=12336 group=12336
061587: insufficient image data in file `crash.dcm' @ error/dcm.c/ReadDCMImage/3088.
$

Also I do not get any valgrind errors for ImageMagick; code there looks different, considering unaffected.

PATCH

see comment 0

AFTER

42.3/GraphicsMagick

$ gm identify crash.dcm
gm identify: Image file or blob does not contain any image data (crash.dcm).
gm identify: Request did not return an image.
$

11/GraphicsMagick

$ gm identify crash.dcm             
gm identify: Insufficient image data in file (crash.dcm).
$
Comment 3 Petr Gajdos 2017-12-04 16:54:59 UTC
Will submit for 42.3/GraphicsMagick, 42.2/GraphicsMagick and 11/GraphicsMagick.
Comment 4 Petr Gajdos 2017-12-06 09:51:02 UTC
I believe all fixed.
Comment 6 Bernhard Wiedemann 2017-12-06 11:50:22 UTC
This is an autogenerated message for OBS integration:
This bug (1061587) was mentioned in
https://build.opensuse.org/request/show/554772 42.3 / GraphicsMagick
https://build.opensuse.org/request/show/554773 42.2 / GraphicsMagick
Comment 7 Swamp Workflow Management 2017-12-12 17:10:35 UTC
openSUSE-SU-2017:3270-1: An update that fixes 6 vulnerabilities is now available.

Category: security (important)
Bug References: 1047054,1051847,1052758,1052764,1060577,1061587
CVE References: CVE-2017-10799,CVE-2017-12140,CVE-2017-12644,CVE-2017-12662,CVE-2017-14733,CVE-2017-14994
Sources used:
openSUSE Leap 42.3 (src):    GraphicsMagick-1.3.25-47.1
openSUSE Leap 42.2 (src):    GraphicsMagick-1.3.25-11.48.1
Comment 9 Swamp Workflow Management 2018-01-24 20:14:20 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 10 Marcus Meissner 2018-02-12 08:40:13 UTC
released