Stack-based buffer overflow in Ghostscript - CVE-2018-16802

 

Stack-based buffer overflow in Ghostscript - CVE-2018-16802

Published: December 17, 2018 / Updated: December 18, 2018


Vulnerability identifier: #VU16576
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2018-16802
CWE-ID: CWE-121
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to incorrect "restoration of privilege" checking when running out of stack during exception handling. A remote unauthenticated attacker can supply specially crafted PostScript, trigger memory corruption and execute code using the "pipe" instruction.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.

Note: the vulnerability exists due to an incomplete fix for CVE-2018-16509.


Affected software

Ghostscript
Red Hat Enterprise Linux Workstation
Red Hat Enterprise Linux Desktop
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for Scientific Computing
Red Hat Enterprise Linux Server
Red Hat Enterprise Linux for Power
Fedora
ghostscript (Debian package)
ghostscript (Alpine package)
ghostscript

How to mitigate CVE-2018-16802

Install update from vendor's website.

ghostscript (Debian package) - update to 9.20~dfsg-3.2+deb9u5
ghostscript (Alpine package) - update to 9.25-r0
ghostscript - update to 9.24-3.fc28

External References

Related Security Bulletins