Bugzilla – Bug 1111480
VUL-0: CVE-2018-18073: ghostscript,ghostscript-library: saved execution stacks can leak operator arrays
Last modified: 2020-06-16 22:09:30 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
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
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
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
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
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.
released