what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

iDEFENSE Security Advisory 2005-12-05.2

iDEFENSE Security Advisory 2005-12-05.2
Posted Dec 9, 2005
Authored by iDefense Labs, infamous41md | Site idefense.com

iDEFENSE Security Advisory 12.05.05 - Local exploitation of a heap-based buffer overflow vulnerability in xpdf, as included in various vendors' operating system distributions, could allow attackers to cause a denial of service condition, potentially resulting in arbitrary code execution. The vulnerability specifically exists due to insufficient input validation in the DCT stream parsing code. The DCTStream::readProgressiveSOF function from xpdf/Stream.cc takes the value of numComps from user-controllable data from within the PDF file. The numComps value is used in a loop to copy data from the file into a pre-allocated buffer in the heap. iDefense has confirmed the existence of this vulnerability in xpdf 3.01. All earlier versions of xpdf are suspected vulnerable.

tags | advisory, denial of service, overflow, arbitrary, local, code execution
advisories | CVE-2005-3191
SHA-256 | 1f21cf2f6e75e6932a8bc024b1576bb7b23fa3741017033cc4d840230b9e6e54

iDEFENSE Security Advisory 2005-12-05.2

Change Mirror Download
Multiple Vendor xpdf DCTStream Baseline Heap Overflow Vulnerability

iDefense Security Advisory 12.05.05
www.idefense.com/application/poi/display?id=342&type=vulnerabilities
December 5, 2005

I. BACKGROUND

Xpdf is an open-source viewer for Portable Document Format (PDF) files.

II. DESCRIPTION

Local exploitation of a heap-based buffer overflow vulnerability in
xpdf, as included in various vendors' operating system distributions,
could allow attackers to cause a denial of service condition,
potentially resulting in arbitrary code execution.

The vulnerability specifically exists due to insufficient input
validation in the DCT stream parsing code. The
DCTStream::readBaselineSOF function from xpdf/Stream.cc takes the value
of numComps from user-controllable data from within the PDF file. The
numComps value is used in a loop to copy data from the file into a pre-
allocated buffer in the heap, shown as follows:

GBool DCTStream::readBaselineSOF() {
...
numComps = str->getChar();
...
for (i = 0; i < numComps; ++i) {
compInfo[i].id = str->getChar();
c = str->getChar();
compInfo[i].hSample = (c >> 4) & 0x0f;
compInfo[i].vSample = c & 0x0f;
compInfo[i].quantTable = str->getChar();
}
...

Overly large values supplied to numComps will result in corruption of
heap memory resulting in a DoS condition, potentially resulting in
arbitrary code execution.

III. ANALYSIS

Successful exploitation of this vulnerability can result in arbitrary
code execution with privileges of the xpdf process. Currently,
exploitation resulting in code execution is theoretical and dependant
on the process memory layout. A typical exploitation attempt would
require an attacker to supply a malicious .pdf to the victim. The
victim would need to open the corrupt .pdf file in xpdf, triggering the
vulnerability.

IV. DETECTION

iDefense has confirmed the existence of this vulnerability in xpdf
3.01. All earlier versions of xpdf are suspected vulnerable.

The following vendors include susceptible xpdf packages within their
operating system distributions:

. The Debian Project: Linux 3.0 and 3.1

V. WORKAROUND

iDefense is currently unaware of any effective workarounds for this
vulnerability.

VI. VENDOR RESPONSE

A patch for this vulnerability is available at:

ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.01pl1.patch

Updated binaries (version 3.01pl1) are available at:

http://www.foolabs.com/xpdf/download.html

VII. CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the
name CAN-2005-3191 to this issue. This is a candidate for inclusion in
the CVE list (http://cve.mitre.org), which standardizes names for
security problems.

VIII. DISCLOSURE TIMELINE

10/13/2005 Initial vendor notification
10/19/2005 Initial vendor response
12/05/2005 Coordinated public disclosure

IX. CREDIT

iDefense credits infamous41md@hotpop.com with the discovery of this
vulnerability.

Get paid for vulnerability research
http://www.iDefense.com/poi/teams/vcp.jsp

Free tools, research and upcoming events
http://labs.iDefense.com

X. LEGAL NOTICES

Copyright C 2005 iDefense, Inc.

Permission is granted for the redistribution of this alert
electronically. It may not be edited in any way without the express
written consent of iDefense. If you wish to reprint the whole or any
part of this alert in any other medium other than electronically, please
email customerservice@iDefense.com for permission.

Disclaimer: The information in the advisory is believed to be accurate
at the time of publishing based on currently available information. Use
of the information constitutes acceptance for use in an AS IS condition.
There are no warranties with regard to this information. Neither the
author nor the publisher accepts any liability for any direct, indirect,
or consequential loss or damage arising from use of, or reliance on,
this information.

Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close