Use-after-free in GhostPDL - CVE-2021-45944

 

Use-after-free in GhostPDL - CVE-2021-45944

Published: January 8, 2022


Vulnerability identifier: #VU59316
CSH Severity: High
CVSS v4: 8.6 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2021-45944
CWE-ID: CWE-416
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to compromise vulnerable system.

The vulnerability exists due to a use-after-free error within the sampled_data_sample() function, called from sampled_data_continue and interp. A remote attacker can create a specially crafted file, trick the victim into opening it, trigger a use-after-free error and execute arbitrary code on the system.

Successful exploitation of the vulnerability may allow an attacker to compromise vulnerable system.


Affected software

GhostPDL
ghostscript (Debian package)
libgs9 (Ubuntu package)
ghostscript (Ubuntu package)
ghostscript-help
ghostscript-debuginfo
ghostscript-debugsource
ghostscript-tools-dvipdf
ghostscript-devel
ghostscript
ghostscript-x11-debuginfo
ghostscript-x11
SUSE Linux Enterprise Software Development Kit
SUSE Linux Enterprise Server
SUSE Linux Enterprise Realtime Extension
SUSE Linux Enterprise Module for Basesystem
Ubuntu
openEuler

How to mitigate CVE-2021-45944

Install updates from vendor's website.

GhostPDL - update to 9.54.0
ghostscript (Debian package) - addressed in versions 9.27~dfsg-2+deb10u5, 9.53.3~dfsg-7+deb11u2
libgs9 (Ubuntu package) - addressed in versions 9.26~dfsg+00ubuntu0.16.04.14+esm1, 9.26~dfsg+0-0ubuntu0.18.04.15, 9.50~dfsg-5ubuntu4.5, 9.53.3~dfsg-7ubuntu0.2, 9.54.0~dfsg1-0ubuntu2.1
ghostscript (Ubuntu package) - addressed in versions 9.26~dfsg+00ubuntu0.16.04.14+esm1, 9.26~dfsg+0-0ubuntu0.18.04.15, 9.50~dfsg-5ubuntu4.5, 9.53.3~dfsg-7ubuntu0.2, 9.54.0~dfsg1-0ubuntu2.1
ghostscript-help - update to 9.52-5
ghostscript-debuginfo - update to 9.52-5
ghostscript-debugsource - update to 9.52-5
ghostscript-tools-dvipdf - update to 9.52-5
ghostscript-devel - update to 9.52-5
ghostscript - update to 9.52-5
ghostscript-x11-debuginfo - addressed in versions 9.52-23.48.1, 9.52-161.1
ghostscript-debugsource - addressed in versions 9.52-23.48.1, 9.52-161.1
ghostscript-devel - addressed in versions 9.52-23.48.1, 9.52-161.1
ghostscript - addressed in versions 9.52-23.48.1, 9.52-161.1
ghostscript-x11 - addressed in versions 9.52-23.48.1, 9.52-161.1
ghostscript-debuginfo - addressed in versions 9.52-23.48.1, 9.52-161.1

External References

Related Security Bulletins