CVE-2024-29510: Medium severity ghostscript vulnerability
Artifex Ghostscript before 10.03.1 allows memory corruption, and SAFER sandbox bypass, via format string injection with a uniprint device.
Other sources
The uniprint device allows the user to provide various string fragments as device options, which are later appended to the output file. Two of these parameters, upWriteComponentCommands and upYMoveCommand, are actually treated as format strings, specifically for gpfprintf and gssnprintf. For these, the intention is for the user to include just one format specifier in the string, but there is no logic preventing arbitrary format strings (with multiple specifiers) from being used.
With full control over the format string (by setting a page device with the respective options), and read access to the device output (by setting it to a temporary file path), an attacker can abuse this to leak data from the stack and perform memory corruption. This is specifically impactful in the cases of gssnprintf (as opposed to gpfprintf), as its format-string parsing logic is not hardened by compiler measures like DFORTIFYSOURCE, while it still supports the %n modifier.
References: https://ghostscript.readthedocs.io/en/gs10.03.1/News.html https://bugs.ghostscript.com/showbug.cgi?id=707662
Upstream commit: https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=3b1735085ecef20b29e8db3416ab36de93e86d1f
— Red Hat
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-29510?
CVE-2024-29510 is classified as a high severity vulnerability due to its potential for memory corruption and exploitation.
How do I fix CVE-2024-29510?
To remediate CVE-2024-29510, update Ghostscript to version 10.03.1 or later.
What is the impact of CVE-2024-29510?
CVE-2024-29510 can lead to memory corruption and allow attackers to bypass the SAFER sandbox.
Which versions of Ghostscript are affected by CVE-2024-29510?
CVE-2024-29510 affects Ghostscript versions prior to 10.03.1.
Is CVE-2024-29510 easily exploitable?
CVE-2024-29510 can be exploited through format string injection via the uniprint device, making it a serious security concern.