Bug 526893 (CVE-2009-3609) - CVE-2009-3609 xpdf/poppler: ImageStream::ImageStream integer overflow
Summary: CVE-2009-3609 xpdf/poppler: ImageStream::ImageStream integer overflow
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2009-3609
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 527399 527400 527403 527404 527413 527414 527454 527455 527456 527457 527468 527469 527470 530890 577309 577322 577323 577328 577329 639837 639838 833916
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-02 12:02 UTC by Tomas Hoger
Modified: 2019-09-29 12:32 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-07 17:57:08 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:1500 normal SHIPPED_LIVE Important: xpdf security update 2009-10-15 08:37:08 UTC
Red Hat Product Errata RHSA-2009:1501 normal SHIPPED_LIVE Important: xpdf security update 2009-10-15 08:34:24 UTC
Red Hat Product Errata RHSA-2009:1502 normal SHIPPED_LIVE Important: kdegraphics security update 2009-10-15 08:26:05 UTC
Red Hat Product Errata RHSA-2009:1503 normal SHIPPED_LIVE Important: gpdf security update 2009-10-15 08:48:32 UTC
Red Hat Product Errata RHSA-2009:1504 normal SHIPPED_LIVE Important: poppler security and bug fix update 2009-10-15 08:51:17 UTC
Red Hat Product Errata RHSA-2009:1512 normal SHIPPED_LIVE Important: kdegraphics security update 2009-10-15 09:05:55 UTC
Red Hat Product Errata RHSA-2009:1513 normal SHIPPED_LIVE Moderate: cups security update 2009-10-15 09:00:56 UTC
Red Hat Product Errata RHSA-2010:0399 normal SHIPPED_LIVE Moderate: tetex security update 2010-05-06 18:53:52 UTC
Red Hat Product Errata RHSA-2010:0400 normal SHIPPED_LIVE Moderate: tetex security update 2010-05-06 19:09:35 UTC
Red Hat Product Errata RHSA-2010:0401 normal SHIPPED_LIVE Moderate: tetex security update 2010-05-06 19:10:40 UTC
Red Hat Product Errata RHSA-2010:0755 normal SHIPPED_LIVE Important: cups security update 2010-10-07 17:48:32 UTC

Description Tomas Hoger 2009-10-02 12:02:07 UTC
An integer overflow flaw exists in xpdf's ImageStream::ImageStream (Stream.cc) when calculating size of the imgLine buffer:

 320   nVals = width * nComps;
 321   if (nBits == 1) {
 322     imgLineSize = (nVals + 7) & ~7;
 323   } else {
 324     imgLineSize = nVals;
 325   }
 326   imgLine = (Guchar *)gmallocn(imgLineSize, sizeof(Guchar));

width and nComps used go compute nVals value come from the input PDF file.  Their multiplication may overflow / wrap, resulting in smaller imgLine buffer allocation than expected.

ImageStream always uses nVals as an upper bound when writing data into imgLine.  Therefore, no buffer overflow occurs in ImageStream, but NULL pointer dereference may occur (gmallocn returns NULL when called with imgLineSize 0).

Pointer to imgLine is also returned out of ImageStream class instance from ImageStream::getLine() method.  Callers of the method may later over-read allocated buffer, but no caller over-writing it was identified.

This code was introduced in xpdf in some early versions (exists in 0.9x), so is likely to appear in all applications embedding / forking xpdf.

Comment 1 Tomas Hoger 2009-10-06 08:23:29 UTC
Upstream patch for this is attached here as part of pl4 patch:
  https://bugzilla.redhat.com/show_bug.cgi?id=526637#c6

Comment 18 errata-xmlrpc 2009-10-15 08:26:24 UTC
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 08:34:38 UTC
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 08:37:36 UTC
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 08:48:43 UTC
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 08:51:49 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2009:1504 https://rhn.redhat.com/errata/RHSA-2009-1504.html

Comment 23 errata-xmlrpc 2009-10-15 09:01:02 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2009:1513 https://rhn.redhat.com/errata/RHSA-2009-1513.html

Comment 24 errata-xmlrpc 2009-10-15 09:06:36 UTC
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 25 Fedora Update System 2009-10-21 00:47:58 UTC
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 26 Fedora Update System 2009-10-21 00:54:43 UTC
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 28 Fedora Update System 2009-10-26 12:19:12 UTC
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 29 Fedora Update System 2009-10-26 12:20:37 UTC
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 30 Fedora Update System 2009-10-27 07:05:22 UTC
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 31 Fedora Update System 2009-10-27 07:15:31 UTC
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 32 Fedora Update System 2009-11-06 18:32:10 UTC
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 33 Fedora Update System 2010-02-20 00:11:40 UTC
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 34 Fedora Update System 2010-02-20 00:23:56 UTC
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 35 Fedora Update System 2010-02-20 00:25:35 UTC
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.

Comment 41 errata-xmlrpc 2010-05-06 18:54:05 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4

Via RHSA-2010:0399 https://rhn.redhat.com/errata/RHSA-2010-0399.html

Comment 42 errata-xmlrpc 2010-05-06 19:09:45 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2010:0400 https://rhn.redhat.com/errata/RHSA-2010-0400.html

Comment 43 errata-xmlrpc 2010-05-06 19:10:47 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 3

Via RHSA-2010:0401 https://rhn.redhat.com/errata/RHSA-2010-0401.html

Comment 45 errata-xmlrpc 2010-10-07 17:48:42 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4

Via RHSA-2010:0755 https://rhn.redhat.com/errata/RHSA-2010-0755.html


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