REDHAT-BUG-526637: Integer Overflow
oCERT reported an integer overflow flaw during the C++ object allocation leading to a heap overflow discovered by Chris Rohlf, affecting xpdf's / poppler's ObjectStream::ObjectStream (XRef.cc).
objs = new Object[nObjects];
As new[] as implemented in gcc / libstdc++ does not perform integer overflow check [1], sufficiently large nObjects value (read from the input PDF file) can cause integer overflow / wrap when multiplied by sizeof(Object) resulting in insufficient memory allocation.
Affected code was introduced in Xpdf 3.00, packages including / based on this version are affected by this flaw. In Red Hat Enterprise Linux, that means: - xpdf - el4 - gpdf - el4 - poppler - el5 - kdegraphics - el4, el5 - cups - el5 - tetex - el5
Patch attempting to address this was previously added to poppler, but it incorrectly used sizeof(int) instead of sizeof(Object) [2] and hence was insufficient.
[1] http://gcc.gnu.org/bugzilla/showbug.cgi?id=19351 [2] http://cgit.freedesktop.org/poppler/poppler/commit/?id=c36d8afc http://cgit.freedesktop.org/poppler/poppler/commit/?id=f41fa9ee
Acknowledgements:
Red Hat would like to thank Chris Rohlf for reporting this issue.
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-526637?
The severity of REDHAT-BUG-526637 is considered high due to the potential for heap overflow leading to arbitrary code execution.
How do I fix REDHAT-BUG-526637?
To fix REDHAT-BUG-526637, update to the latest version of affected software including Xpdf, Poppler, or any other vulnerable package.
Which software is affected by REDHAT-BUG-526637?
Affected software includes Xpdf version 3.00 and later, Poppler version 5 and later, along with several versions of Red Hat Enterprise Linux and other associated packages.
What type of vulnerability is REDHAT-BUG-526637?
REDHAT-BUG-526637 is an integer overflow vulnerability that can lead to a heap overflow during memory allocation.
Who discovered REDHAT-BUG-526637?
REDHAT-BUG-526637 was discovered by researcher Chris Rohlf.