Bug 1626193 (CVE-2018-16585)

Summary: CVE-2018-16585 ghostscript: .setdistillerkeys PostScript command is accepted even though it is not intended for use
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: mosvald, twaugh, zdohnal
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-18 10:17:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1626194, 1626195, 1648993, 1648994    
Bug Blocks: 1619570, 1626196    

Description Pedro Sampaio 2018-09-06 17:34:31 UTC
An issue was discovered in Artifex Ghostscript before 9.24. The .setdistillerkeys PostScript command is accepted even though it is not intended for use during document processing (e.g., after the startup phase). This leads to memory corruption, allowing remote attackers able to supply crafted PostScript to crash the interpreter or possibly have unspecified other impact.



Comment 1 Pedro Sampaio 2018-09-06 17:35:03 UTC
Created ghostscript tracking bugs for this issue:

Affects: fedora-all [bug 1626194]

Comment 3 David Kaspar // Dee'Kej 2018-09-07 09:23:32 UTC
So, looking at the commits... The issue was discovered prior to 9.24, which means that for 9.24 (F28+) it is already fixed.

Comment 7 Cedric Buissart 2018-11-16 11:30:20 UTC
It appears that this CVE description might not be correct :

* ghostscript does not have a `.setdistillerkeys` command. This was probably a typo, the command targeted might probably be .setdistillerparams
* the commits pointed by the CVE as a fix (971472c83a & 1497d650) are dated from gs-9.22 (2017), do not seem to seem to undefine any *distill* parameter, and .setdistillerparams appears to still be accessible after these commits.

* From the above, I believe that the fix for this vulnerability might actually be http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=b0a385475

Comment 8 Cedric Buissart 2018-12-18 10:17:36 UTC
The accessibility of .setdistillerparams does not really represent a security defect.

This CVE is mostly a duplicate of CVE-2018-15910 (fixed via RHSA-2018:3834)

Comment 11 Cedric Buissart 2019-10-03 12:43:24 UTC

There are no .setdistillerkeys operator in ghostscript. It is suspected it might be a typo from .distillerparamkeys or .setdistillerparams. It was found that .distillerparamkeys and .setdistillerparams methods can be called although they are not intended to be used. However, the only known security threat they cause has been fixed via CVE-2018-15910.