Bug 1383940 (CVE-2016-8602)

Summary: CVE-2016-8602 ghostscript: check for sufficient params in .sethalftone5
Product: [Other] Security Response Reporter: Cedric Buissart <cbuissar>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abhgupta, anemec, deekej, dmcphers, jialiu, jokerman, kseifried, lmeyer, mmccomas, sardella, tiwillia, twaugh, zdohnal
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
It was found that ghostscript did not sufficiently check the validity of parameters given to the .sethalftone5 function. A specially crafted postscript document could cause a crash, or execute arbitrary code in the context of the gs process.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-04 11:11:17 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: 1383941, 1390299, 1390300, 1390301, 1390302    
Bug Blocks: 1380329    

Description Cedric Buissart 2016-10-12 08:18:13 UTC
If you call .sethalftone5 with an empty operand stack, ghostscript crashes. This flaw could be exploitable

Upstream bug :
 - Bug 697203 - NULL dereference in .sethalftone5
http://bugs.ghostscript.com/show_bug.cgi?id=697203

Upstream patch :
 - Bug 697203: check for sufficient params in .sethalftone5
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=f5c7555c303

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

Comment 1 Cedric Buissart 2016-10-12 08:19:06 UTC
Created ghostscript tracking bugs for this issue:

Affects: fedora-all [bug 1383941]

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

  Red Hat Enterprise Linux 6

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

Comment 8 errata-xmlrpc 2017-01-04 10:11:57 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