Bug 1382300 (CVE-2016-7978) - CVE-2016-7978 ghostscript: reference leak in .setdevice allows use-after-free and remote code execution
Summary: CVE-2016-7978 ghostscript: reference leak in .setdevice allows use-after-free...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2016-7978
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1390299 1390300 1390488
Blocks: 1380329
TreeView+ depends on / blocked
 
Reported: 2016-10-06 09:44 UTC by Cedric Buissart
Modified: 2019-09-29 13:57 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
It was found that the ghostscript function .setdevice suffered a use-after-free vulnerability due to an incorrect reference count. A specially crafted postscript document could trigger code execution in the context of the gs process.
Clone Of:
Environment:
Last Closed: 2017-01-04 11:10:39 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0013 0 normal SHIPPED_LIVE Moderate: ghostscript security update 2017-01-04 15:09:56 UTC

Description Cedric Buissart 2016-10-06 09:44:43 UTC
An incorrect reference count was found in .setdevice. This leads to a use-after-free, triggering a Denial of Service, or possibly, arbitrary code execution.

Upstream bug :
 - Bug 697179 - double free with .setdevice
http://bugs.ghostscript.com/show_bug.cgi?id=697179

upstream fix :
 - Bug 697179: Reference count device icc profile when copying a device
http://git.ghostscript.com/?p=user/chrisl/ghostpdl.git;a=commitdiff;h=d5ad1e02

Reference :
http://seclists.org/oss-sec/2016/q4/37

Comment 4 Cedric Buissart 2016-10-31 16:00:45 UTC
Ghostscript's ICC profile management is a feature that started with version 9.
Thus previous versions, in particular ghostscript 8.70, do not have capability to open ICC profile files for color management, and thus are not affected by this CVE.
RHEL5 and 6 are not affected by this issue.

Comment 6 Cedric Buissart 2016-11-01 08:42:38 UTC
Created ghostscript tracking bugs for this issue:

Affects: fedora-all [bug 1390488]

Comment 7 errata-xmlrpc 2017-01-04 10:11:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:0013 https://rhn.redhat.com/errata/RHSA-2017-0013.html


Note You need to log in before you can comment on or make changes to this bug.