Bug 1619750 (CVE-2018-16513)

Summary: CVE-2018-16513 ghostscript: setcolor missing type check (699655)
Product: [Other] Security Response Reporter: Stefan Cornelius <scorneli>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: abhgupta, ahardin, bleanhar, ccoleman, dbaker, dedgar, deekej, jgoulding, jokerman, mchappel, sthangav, trankin, twaugh, yozone, zdohnal
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ghostscript 9.24 Doc Type: If docs needed, set a value
Doc Text:
It was discovered that the ghostscript did not properly validate the operands passed to the setcolor function. An attacker could possibly exploit this to bypass the -dSAFER protection and crash ghostscript or, possibly, execute arbitrary code in the ghostscript context via a specially crafted PostScript document.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-19 09:38:48 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:    
Bug Blocks: 1619570    

Description Stefan Cornelius 2018-08-21 16:07:51 UTC
It was discovered that the ghostscript did not properly validate the operands passed to the setcolor function. A specially crafted PostScript document could possibly exploit this to crash ghostscript or, possibly, execute arbitrary code in the context of the ghostscript process.

Comment 1 Stefan Cornelius 2018-08-21 16:25:34 UTC
External References:

http://seclists.org/oss-sec/2018/q3/142

Comment 2 Stefan Cornelius 2018-08-22 10:19:46 UTC
Mitigation:

Please see https://bugzilla.redhat.com/show_bug.cgi?id=1619748#c3

Comment 3 Stefan Cornelius 2018-08-23 14:25:58 UTC
Patch:
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=b326a716

Comment 4 Stefan Cornelius 2018-08-23 15:36:40 UTC
Acknowledgments:

Name: Tavis Ormandy (Google Project Zero)

Comment 6 Stefan Cornelius 2018-09-19 09:39:03 UTC
Statement:

This issue did not affect the versions of ghostscript as shipped with Red Hat Enterprise Linux 5, 6, and 7.