Description
A NULL pointer dereference vulnerability was found in Ghostscript, which occurs when it tries to render a large number of bits in memory. When allocating a buffer device, it relies on an init_device_procs defined for the device that uses it as a prototype that depends upon the number of bits per pixel. For bpp > 64, mem_x_device is used and does not have an init_device_procs defined. This flaw allows an attacker to parse a large number of bits (more than 64 bits per pixel), which triggers a NULL pointer dereference flaw, causing an application to crash.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | GhostScript | Affects in Ghostscript v9.55.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | ghostscript | 9.56.0~dfsg-1 | — |
| Debian 13 | ghostscript | 9.56.0~dfsg-1 | — |
| Debian 12 | ghostscript | 9.56.0~dfsg-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | ghostscript | 9.55.0~dfsg1-0ubuntu5.1 | USN-5643-1 |
| Ubuntu 20.04 LTS | ghostscript | 9.50~dfsg-5ubuntu4.6 | USN-5643-1 |
| Ubuntu 18.04 LTS | ghostscript | 9.26~dfsg+0-0ubuntu0.18.04.17 | USN-5643-1 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | libgs +8 | 9.56.1-5.amzn2023.0.1 | ALAS2023-2023-053 |
Advisories 3
- USN-5643-1 ghostscript vulnerabilities Ubuntu Security Notices (USN) · Apr 22, 2026
- WID-SEC-2022-0383 Ghostscript: Schwachstelle ermöglicht Denial of Service BSI CERT-Bund (WID) · Sep 17, 2023
- ALAS2023-2023-053 Moderate: ghostscript security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Feb 22, 2023
References
- https://bugs.ghostscript.com/show_bug.cgi?id=704945
- https://bugzilla.redhat.com/show_bug.cgi?id=2095261
- http://git.ghostscript.com/?p=ghostpdl.git%3Bh=ae1061d948d88667bdf51d47d918c4684d0f67df
- FEDORA-2022-d287230630 vendor-advisory
- GLSA-202211-11 vendor-advisory
- https://security.gentoo.org/glsa/202309-03