Bug 1111480 - (CVE-2018-18073) VUL-0: CVE-2018-18073: ghostscript,ghostscript-library: saved execution stacks can leak operator arrays
(CVE-2018-18073)
VUL-0: CVE-2018-18073: ghostscript,ghostscript-library: saved execution stack...
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Normal
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/216518/
CVSSv3:SUSE:CVE-2018-18073:5.3:(AV:N/...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-11 07:08 UTC by Alexander Bergmann
Modified: 2020-06-16 22:09 UTC (History)
4 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Bergmann 2018-10-11 07:08:24 UTC
https://seclists.org/oss-sec/2018/q4/48 - CVE-2018-18073

Hello, this <https://bugs.chromium.org/p/project-zero/issues/detail?id=1690>
is another (different from CVE-2018-17961) -dSAFER sandbox escape.

There are a whole bunch of different stacks in postscript, there's the
operand stack, the dict stack, the execution stack, and so on.

When the error handler is invoked in postscript, part of the execution
context is passed to the handler so that it can examine what went wrong.
That context is called `$error`, and could have included parts of
executeonly routines, and therefore could leak references to system
operators.

$ gs -dSAFER -sDEVICE=ppmraw
GS>{ null .setglobal } stopped clear
GS>$error /estack get ==
[...  {-dict- /FontDirectory --.currentglobal-- {-dict-}
{/LocalFontDirectory --.systemvar--} --ifelse-- --.forceput-- --pop--}]

Notice the .forceput in there...

GS>$error /estack get 29 get ==
{-dict- /FontDirectory --.currentglobal-- {-dict-} {/LocalFontDirectory
--.systemvar--} --ifelse-- --.forceput-- --pop--}
GS>$error /estack get 29 get 6 get ==
--.forceput--
GS>

Once you have a reference to forceput, you can do anything you like, see
the exploit for CVE-2018-18073 as an example of abusing forceput to get
arbitrary filesystem access.

The fix is public now, this is the commit to fix it:

http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=34cc326eb2c5695833361887fe0b32e8d987741c

This was ghostscript bug 699927.

Thanks, Tavis.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-18073
http://seclists.org/oss-sec/2018/q4/48
http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=34cc326eb2c5695833361887fe0b32e8d987741c
Comment 5 Swamp Workflow Management 2018-12-12 17:09:55 UTC
SUSE-SU-2018:4087-1: An update that solves 8 vulnerabilities and has one errata is now available.

Category: security (important)
Bug References: 1109105,1111479,1111480,1112229,1117022,1117274,1117313,1117327,1117331
CVE References: CVE-2018-17183,CVE-2018-17961,CVE-2018-18073,CVE-2018-18284,CVE-2018-19409,CVE-2018-19475,CVE-2018-19476,CVE-2018-19477
Sources used:
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15 (src):    ghostscript-mini-9.26-3.9.3
SUSE Linux Enterprise Module for Desktop Applications 15 (src):    libspectre-0.2.8-3.4.3
SUSE Linux Enterprise Module for Basesystem 15 (src):    ghostscript-9.26-3.9.4
Comment 6 Swamp Workflow Management 2018-12-12 20:11:25 UTC
SUSE-SU-2018:4090-1: An update that solves 8 vulnerabilities and has one errata is now available.

Category: security (important)
Bug References: 1109105,1111479,1111480,1112229,1117022,1117274,1117313,1117327,1117331
CVE References: CVE-2018-17183,CVE-2018-17961,CVE-2018-18073,CVE-2018-18284,CVE-2018-19409,CVE-2018-19475,CVE-2018-19476,CVE-2018-19477
Sources used:
SUSE OpenStack Cloud 7 (src):    ghostscript-9.26-23.16.1, libspectre-0.2.7-12.4.1
SUSE Linux Enterprise Software Development Kit 12-SP4 (src):    ghostscript-9.26-23.16.1, libspectre-0.2.7-12.4.1
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    ghostscript-9.26-23.16.1, libspectre-0.2.7-12.4.1
SUSE Linux Enterprise Server for SAP 12-SP2 (src):    ghostscript-9.26-23.16.1, libspectre-0.2.7-12.4.1
SUSE Linux Enterprise Server 12-SP4 (src):    ghostscript-9.26-23.16.1, libspectre-0.2.7-12.4.1
SUSE Linux Enterprise Server 12-SP3 (src):    ghostscript-9.26-23.16.1, libspectre-0.2.7-12.4.1
SUSE Linux Enterprise Server 12-SP2-LTSS (src):    ghostscript-9.26-23.16.1, libspectre-0.2.7-12.4.1
SUSE Linux Enterprise Server 12-SP2-BCL (src):    ghostscript-9.26-23.16.1, libspectre-0.2.7-12.4.1
SUSE Linux Enterprise Server 12-SP1-LTSS (src):    ghostscript-9.26-23.16.1, libspectre-0.2.7-12.4.1
SUSE Linux Enterprise Server 12-LTSS (src):    ghostscript-9.26-23.16.1, libspectre-0.2.7-12.4.1
SUSE Linux Enterprise Desktop 12-SP4 (src):    ghostscript-9.26-23.16.1, libspectre-0.2.7-12.4.1
SUSE Linux Enterprise Desktop 12-SP3 (src):    ghostscript-9.26-23.16.1, libspectre-0.2.7-12.4.1
SUSE Enterprise Storage 4 (src):    ghostscript-9.26-23.16.1, libspectre-0.2.7-12.4.1
Comment 7 Swamp Workflow Management 2018-12-15 11:11:23 UTC
openSUSE-SU-2018:4138-1: An update that solves 8 vulnerabilities and has one errata is now available.

Category: security (important)
Bug References: 1109105,1111479,1111480,1112229,1117022,1117274,1117313,1117327,1117331
CVE References: CVE-2018-17183,CVE-2018-17961,CVE-2018-18073,CVE-2018-18284,CVE-2018-19409,CVE-2018-19475,CVE-2018-19476,CVE-2018-19477
Sources used:
openSUSE Leap 15.0 (src):    ghostscript-9.26-lp150.2.9.1, ghostscript-mini-9.26-lp150.2.9.1, libspectre-0.2.8-lp150.2.6.2
Comment 8 Swamp Workflow Management 2018-12-15 11:14:49 UTC
openSUSE-SU-2018:4140-1: An update that solves 8 vulnerabilities and has one errata is now available.

Category: security (important)
Bug References: 1109105,1111479,1111480,1112229,1117022,1117274,1117313,1117327,1117331
CVE References: CVE-2018-17183,CVE-2018-17961,CVE-2018-18073,CVE-2018-18284,CVE-2018-19409,CVE-2018-19475,CVE-2018-19476,CVE-2018-19477
Sources used:
openSUSE Leap 42.3 (src):    ghostscript-9.26-14.12.1, ghostscript-mini-9.26-14.12.1, libspectre-0.2.7-17.4.2
Comment 9 Swamp Workflow Management 2019-04-27 22:38:32 UTC
SUSE-SU-2018:4090-2: An update that solves 8 vulnerabilities and has one errata is now available.

Category: security (important)
Bug References: 1109105,1111479,1111480,1112229,1117022,1117274,1117313,1117327,1117331
CVE References: CVE-2018-17183,CVE-2018-17961,CVE-2018-18073,CVE-2018-18284,CVE-2018-19409,CVE-2018-19475,CVE-2018-19476,CVE-2018-19477
Sources used:
SUSE Linux Enterprise Server for SAP 12-SP1 (src):    ghostscript-9.26-23.16.1, libspectre-0.2.7-12.4.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 12 Marcus Meissner 2020-01-28 07:19:52 UTC
released