Bug 1333410 (CVE-2016-5241)

Summary: CVE-2016-5241 GraphicsMagick: SVG converting issues
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: andreas, makowski.fedora, rdieter
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 02:51:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1333411, 1333412    
Bug Blocks:    

Description Andrej Nemec 2016-05-05 12:41:16 UTC
Two vulnerabilities were found in GraphicsMagick, both resulting in DoS.

* Infinite loop caused by converting a circularly defined svg file.

Upstream patch:

http://hg.code.sf.net/p/graphicsmagick/code/rev/ddc999ec896c


* Arithmetic exception converting a svg file caused by a X%0 operation in
magick/render.c:3800

    (long) (y-fill_pattern->tile_info.y) % fill_pattern->rows,

Upstream patch:

http://hg.code.sf.net/p/graphicsmagick/code/rev/8d175c4edfe7

References (containing reproducers):

http://seclists.org/oss-sec/2016/q2/180

Comment 1 Andrej Nemec 2016-05-05 12:41:43 UTC
Created GraphicsMagick tracking bugs for this issue:

Affects: fedora-all [bug 1333411]
Affects: epel-all [bug 1333412]

Comment 2 Andrej Nemec 2016-06-03 09:18:32 UTC
CVE assignment:

http://seclists.org/oss-sec/2016/q2/460

CVE-2016-5240 for infinite loop caused by circularly defined svg file
CVE-2016-5241 for arithmetic exception converting a svg file

Comment 3 Fedora Update System 2016-06-17 18:17:01 UTC
GraphicsMagick-1.3.24-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 4 Fedora Update System 2016-06-17 22:46:53 UTC
GraphicsMagick-1.3.24-1.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2016-06-18 15:47:39 UTC
GraphicsMagick-1.3.24-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2016-06-18 18:53:23 UTC
GraphicsMagick-1.3.24-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2016-06-19 07:18:58 UTC
GraphicsMagick-1.3.24-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2016-06-19 07:26:45 UTC
GraphicsMagick-1.3.24-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Philippe Makowski 2016-06-26 15:58:17 UTC
Advisory:
========================

Updated graphicsmagick package fixes security vulnerability:

- A read out-of-bound in the parsing of gif files using
GraphicsMagick (CVE-2015-8808).

- Infinite loop caused by converting a circularly defined svg file (CVE-2016-5240).
Fix another case of CVE-2016-2317 (heap buffer overflow) in
the MVG rendering code (also impacts SVG).

- arithmetic exception converting a svg file (CVE-2016-5241)

- Arithmetic exception converting a svg file caused by a X%0 operation in
magick/render.c (CVE-2016-2318)

- A shell exploit (CVE-2016-5118) was discovered associated with a filename syntax where file names starting with '|' are intepreted as shell commands executed via popen(). Insufficient sanitization in the SVG and MVG renderers allows such filenames to be passed through from potentially untrusted files. There might be other ways for untrusted inputs to produce such filenames. Due to this issue, support for the feature is removed entirely.

gnudl, octave, pdf2djvu, and photoqt packages have been rebuilt to use
the updated GraphicsMagick++ library.

References:
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2317
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2318
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-8808
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5118
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5241
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5240
- http://openwall.com/lists/oss-security/2016/05/01/6
- http://openwall.com/lists/oss-security/2016/02/06/3
- http://lwn.net/Vulnerabilities/677107/
- http://openwall.com/lists/oss-security/2016/05/30/1
- http://www.graphicsmagick.org/NEWS.html

Comment 10 Philippe Makowski 2016-06-26 15:59:22 UTC
(In reply to Philippe Makowski from comment #9)
Sorry
wrong bugtracker
can it be deleted ?

Comment 11 Product Security DevOps Team 2019-06-08 02:51:12 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.