CVE-2009-3609: Integer Overflow

Published Oct 2, 2009
·
Updated

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.

Other sources

Integer overflow in the ImageStream::ImageStream function in Stream.cc in Xpdf before 3.02pl4 and Poppler before 0.12.1, as used in GPdf, kdegraphics KPDF, and CUPS pdftops, allows remote attackers to cause a denial of service (application crash) via a crafted PDF document that triggers a NULL pointer dereference or buffer over-read.

Affected Software

70 affected componentsFixes available
redhat/xpdf<1:2.02-17.el3
1:2.02-17.el3
redhat/xpdf<1:3.00-22.el4_8.1
1:3.00-22.el4_8.1
redhat/gpdf<0:2.8.2-7.7.2.el4_8.5
0:2.8.2-7.7.2.el4_8.5
redhat/kdegraphics<7:3.3.1-15.el4_8.2
7:3.3.1-15.el4_8.2
redhat/cups<1:1.1.22-0.rc1.9.32.el4_8.10
1:1.1.22-0.rc1.9.32.el4_8.10
redhat/kdegraphics<7:3.5.4-15.el5_4.2
7:3.5.4-15.el5_4.2
redhat/poppler<0:0.5.4-4.4.el5_4.11
0:0.5.4-4.4.el5_4.11
redhat/cups<1:1.3.7-11.el5_4.3
1:1.3.7-11.el5_4.3
redhat/tetex<0:3.0-33.8.el5_5.5
0:3.0-33.8.el5_5.5
Foolabs Xpdf=3.02pl1
Foolabs Xpdf=3.02pl2
Foolabs Xpdf=3.02pl3
Glyphandcog Xpdfreader=3.00
Glyphandcog Xpdfreader=3.01
Glyphandcog Xpdfreader=3.02
Poppler Poppler<=0.12.0
Poppler Poppler=0.1
Poppler Poppler=0.1.1
Poppler Poppler=0.1.2
Poppler Poppler=0.2.0
Poppler Poppler=0.3.0
Poppler Poppler=0.3.1
Poppler Poppler=0.3.2
Poppler Poppler=0.3.3
Poppler Poppler=0.4.0
Poppler Poppler=0.4.1
Poppler Poppler=0.4.2
Poppler Poppler=0.4.3
Poppler Poppler=0.4.4
Poppler Poppler=0.5.0
Poppler Poppler=0.5.1
Poppler Poppler=0.5.2
Poppler Poppler=0.5.3
Poppler Poppler=0.5.4
Poppler Poppler=0.5.9
Poppler Poppler=0.6.0
Poppler Poppler=0.6.1
Poppler Poppler=0.6.2
Poppler Poppler=0.6.3
Poppler Poppler=0.6.4
Poppler Poppler=0.7.0
Poppler Poppler=0.7.1
Poppler Poppler=0.7.2
Poppler Poppler=0.7.3
Poppler Poppler=0.8.0
Poppler Poppler=0.8.1
Poppler Poppler=0.8.2
Poppler Poppler=0.8.3
Poppler Poppler=0.8.4
Poppler Poppler=0.8.6
Poppler Poppler=0.8.7
Poppler Poppler=0.9.0
Poppler Poppler=0.9.1
Poppler Poppler=0.9.2
Poppler Poppler=0.9.3
Poppler Poppler=0.10.0
Poppler Poppler=0.10.1
Poppler Poppler=0.10.2
Poppler Poppler=0.10.3
Poppler Poppler=0.10.4
Poppler Poppler=0.10.5
Poppler Poppler=0.10.6
Poppler Poppler=0.10.7
Poppler Poppler=0.11.0
Poppler Poppler=0.11.1
Poppler Poppler=0.11.2
Poppler Poppler=0.11.3
Glyph And Cog Pdftops
Gnome Gpdf
KDE kpdf

Event History

Oct 2, 2009
Data Sourced
via Red Hat·12:02 PM
DescriptionSeverityAffected Software
Oct 14, 2009
CVE Published
via Red Hat·12:00 AM
Oct 21, 2009
CVE Published
via MITRE·05:00 PM
Data Sourced
via MITRE·05:00 PM
Description
Data Sourced
05:30 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2009-3609?

CVE-2009-3609 has been classified as a moderate severity vulnerability due to its potential to cause denial of service when processing specially crafted PDF documents.

2

How do I fix CVE-2009-3609?

To fix CVE-2009-3609, update your Xpdf to version 3.02pl4 or later, or Poppler to version 0.12.1 or later.

3

Which software is affected by CVE-2009-3609?

CVE-2009-3609 affects Xpdf versions prior to 3.02pl4, Poppler versions prior to 0.12.1, GPdf, kdegraphics KPDF, and CUPS pdftops.

4

What type of attack can exploit CVE-2009-3609?

CVE-2009-3609 can be exploited through a crafted PDF document that triggers an integer overflow, leading to an application crash.

5

What are the potential impacts of CVE-2009-3609?

The primary impact of CVE-2009-3609 is a denial of service, causing the affected application to crash when processing malicious PDF files.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203