REDHAT-BUG-526911: 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.
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-526911?
The severity of REDHAT-BUG-526911 has not been explicitly stated, but it involves memory allocation flaws which could lead to potential security issues.
How do I fix REDHAT-BUG-526911?
To fix REDHAT-BUG-526911, update to the latest version of xpdf that addresses the memory allocation flaws.
Which versions of xpdf are affected by REDHAT-BUG-526911?
xpdf versions earlier than 2.0 are affected by REDHAT-BUG-526911.
What is the impact of REDHAT-BUG-526911?
The impact of REDHAT-BUG-526911 can include potential crashes or memory corruption due to improper handling of buffer allocations.
Who reported REDHAT-BUG-526911?
REDHAT-BUG-526911 was reported by Adam Zabrocki.