CVE-2009-3604: Buffer Overflow
Adam Zabrocki reported flaws in xpdf's Splash::drawImage function related to buffer memory allocations:
2220 // allocate pixel buffers 2221 colorBuf = (SplashColorPtr)gmalloc((yp + 1) w nComps); 2222 if (srcAlpha) { 2223 alphaBuf = (Guchar )gmalloc((yp + 1) w); 2224 } else { 2225 alphaBuf = NULL; 2226 }
Values used to compute argument passed to gmalloc come from input PDF file. Properly chosen values will cause gmalloc to return NULL or buffer of insufficient size, leading to NULL pointer dereference or heap buffer overflow later.
Affected Splash output device is not available in xpdf 2.x versions and earlier. It is also not used in xpdf embedded in CUPS or tetex.
This was already fixed in poppler as part of preventive gmalloc -> gmallocn changes: http://cgit.freedesktop.org/poppler/poppler/commit/?id=9cf2325fb2
This fix is also present in the EL5 poppler packages.
Acknowledgements:
Red Hat would like to thank Adam Zabrocki for reporting this issue.
Other sources
The Splash::drawImage function in Splash.cc in Xpdf 2.x and 3.x before 3.02pl4, and Poppler 0.x, as used in GPdf and kdegraphics KPDF, does not properly allocate memory, which allows remote attackers to cause a denial of service (application crash) or possibly execute arbitrary code via a crafted PDF document that triggers a NULL pointer dereference or a heap-based buffer overflow.
Affected Software
Remediation
Patch Available
Patch Available
Patch Available
Patch Available
Patch Available
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2009-3604?
CVE-2009-3604 is classified as a moderate severity vulnerability due to its potential to cause denial of service and possibly execute arbitrary code.
How do I fix CVE-2009-3604?
To fix CVE-2009-3604, update to the latest version of affected packages such as Xpdf and Poppler as specified in vendor advisories.
What software is affected by CVE-2009-3604?
CVE-2009-3604 affects Xpdf versions prior to 3.02pl4, and Poppler versions prior to 0.x, along with some applications like GPdf and KPDF.
Can CVE-2009-3604 lead to remote exploitation?
Yes, CVE-2009-3604 allows remote attackers to exploit the vulnerability through crafted PDF files, leading to a denial of service or arbitrary code execution.
Is there a specific version of Xpdf that is not vulnerable to CVE-2009-3604?
Yes, Xpdf version 3.02pl4 and later are not vulnerable to CVE-2009-3604.