Bug 1626193 (CVE-2018-16585) - CVE-2018-16585 ghostscript: .setdistillerkeys PostScript command is accepted even though it is not intended for use
Summary: CVE-2018-16585 ghostscript: .setdistillerkeys PostScript command is accepted ...
Alias: CVE-2018-16585
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1626194 1626195 1648993 1648994
Blocks: 1619570 1626196
TreeView+ depends on / blocked
Reported: 2018-09-06 17:34 UTC by Pedro Sampaio
Modified: 2021-02-16 23:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-12-18 10:17:36 UTC

Attachments (Terms of Use)

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.

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