Segv on unknown address in gs_gc_reclaim in ghostscript
Summary
OSV-2024-677: Segv on unknown address in gs_gc_reclaim. Affects ghostscript versions >= bf0048d271aa6a4d9898997ada84cf89c197e791. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Ghostscript is an open-source interpreter for the PostScript language and the PDF file format. It is widely used for rendering and converting documents. The gs_gc_reclaim function is responsible for garbage collection in Ghostscript, reclaiming memory that is no longer in use. However, a vulnerability has been discovered in this function that can lead to a segmentation fault (segv) on an unknown address. This vulnerability was reported through the OSS-Fuzz project.
Vulnerability Detail
The vulnerability occurs in the gs_gc_reclaim function of Ghostscript. When triggered, it results in a segmentation fault, causing the program to crash. The exact cause of the segv is unknown, as it occurs on an unknown address. This vulnerability can potentially be exploited by an attacker to execute arbitrary code or cause a denial of service. The impact of this vulnerability depends on the context in which Ghostscript is used and the privileges of the user running the software.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
At the moment, there is no known workaround for this vulnerability. It is advised to apply the official fix provided by the Ghostscript development team.
Conclusion
The gs_gc_reclaim function in Ghostscript is vulnerable to a segv on an unknown address. This can result in a program crash and potentially allow an attacker to execute arbitrary code or cause a denial of service. It is crucial to update Ghostscript to a version that includes the necessary patches to mitigate this vulnerability.
See every vulnerability recorded for ghostscript →
FAQ
Ghostscript is an open-source interpreter for the PostScript language and the PDF file format. It is commonly used for rendering and converting documents.
The vulnerability can lead to a segmentation fault, causing the program to crash. Depending on the context and user privileges, it could potentially be exploited to execute arbitrary code or cause a denial of service.
To fix this vulnerability, it is recommended to update Ghostscript to a version that includes the necessary patches. The Ghostscript development team has addressed this issue and provided fixes in subsequent releases.
Currently, there is no known workaround for this vulnerability. It is advised to apply the official fix provided by the Ghostscript development team.
You can find more information about this vulnerability in the OSS-Fuzz report: [link to the report]
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.