Bug 526911 - (CVE-2009-3604) CVE-2009-3604 xpdf/poppler: Splash::drawImage integer overflow and missing allocation return value check
CVE-2009-3604 xpdf/poppler: Splash::drawImage integer overflow and missing al...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
high Severity high
: ---
: ---
Assigned To: Red Hat Product Security
impact=important,source=vendorsec,rep...
: Security
Depends On: 527413 527414 527454 527455 527456 527457 527468 527469 530890 833916
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-02 09:30 EDT by Tomas Hoger
Modified: 2016-03-04 07:37 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-08 12:27:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
xpdf upstream patch from Derek B. Noonburg (1.91 KB, patch)
2009-10-02 09:48 EDT, Tomas Hoger
no flags Details | Diff

  None (edit)
Description Tomas Hoger 2009-10-02 09:30:23 EDT
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.
Comment 4 Tomas Hoger 2009-10-02 09:48:19 EDT
Created attachment 363485 [details]
xpdf upstream patch from Derek B. Noonburg
Comment 9 Tomas Hoger 2009-10-12 12:55:19 EDT
Splash outupt device used in newer Xpdf versions (or at least some parts of it) is derived from XOutputDev used in older Xpdf versions.  This flaw also exists in XOutputDev in Xpdf 2.x versions
Comment 17 Tomas Hoger 2009-10-15 03:15:51 EDT
(In reply to comment #0)
> This was already fixed in poppler as part of preventive gmalloc -> gmallocn
> changes:
> http://cgit.freedesktop.org/poppler/poppler/commit/?id=9cf2325fb2

poppler commits adding mentioned gmalloc -> gmallocn changes:
0131f0a01c 7b2d314a61 c399b2d512 9cf2325fb2 284a928996
(note: two of those commits revert mistakes from previous ones)

Full patch:
http://cgit.freedesktop.org/poppler/poppler/diff/?id=284a928996&id2=75c3466ba2
Comment 18 errata-xmlrpc 2009-10-15 04:26:16 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2009:1502 https://rhn.redhat.com/errata/RHSA-2009-1502.html
Comment 19 errata-xmlrpc 2009-10-15 04:34:32 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4

Via RHSA-2009:1501 https://rhn.redhat.com/errata/RHSA-2009-1501.html
Comment 20 errata-xmlrpc 2009-10-15 04:37:26 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 3

Via RHSA-2009:1500 https://rhn.redhat.com/errata/RHSA-2009-1500.html
Comment 21 errata-xmlrpc 2009-10-15 04:48:40 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4

Via RHSA-2009:1503 https://rhn.redhat.com/errata/RHSA-2009-1503.html
Comment 22 errata-xmlrpc 2009-10-15 05:06:33 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4

Via RHSA-2009:1512 https://rhn.redhat.com/errata/RHSA-2009-1512.html
Comment 23 Fedora Update System 2009-10-20 20:47:33 EDT
xpdf-3.02-15.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 24 Fedora Update System 2009-10-20 20:54:18 EDT
xpdf-3.02-15.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 26 Fedora Update System 2009-10-26 08:18:48 EDT
poppler-0.8.7-7.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/poppler-0.8.7-7.fc10
Comment 27 Fedora Update System 2009-10-26 08:20:15 EDT
poppler-0.10.7-3.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/poppler-0.10.7-3.fc11
Comment 28 Fedora Update System 2009-10-27 03:04:48 EDT
poppler-0.8.7-7.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 29 Fedora Update System 2009-10-27 03:14:50 EDT
poppler-0.10.7-3.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 30 Fedora Update System 2009-11-06 13:31:47 EST
xpdf-3.02-15.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 31 Fedora Update System 2010-02-19 19:11:23 EST
pdfedit-0.4.3-4.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 32 Fedora Update System 2010-02-19 19:23:41 EST
pdfedit-0.4.3-4.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 33 Fedora Update System 2010-02-19 19:25:20 EST
pdfedit-0.4.3-4.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.