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

iDEFENSE Security Advisory 2005-01-18.t

iDEFENSE Security Advisory 2005-01-18.t
Posted Jan 19, 2005
Authored by iDefense Labs | Site idefense.com

iDEFENSE Security Advisory 01.18.05 - Remote exploitation of a buffer overflow vulnerability in the xpdf PDF viewer included in multiple Unix and Linux distributions could allow for arbitrary code execution as the user viewing a PDF file. Version 3.00 is affected, possibly earlier revs as well.

tags | advisory, remote, overflow, arbitrary, code execution
systems | linux, unix
advisories | CVE-2005-0064
SHA-256 | 89d6ddb5e54bacb2a94fd4f4dfbc53d26e9568506eecc1b65a89eb4db718dc90

iDEFENSE Security Advisory 2005-01-18.t

Change Mirror Download
Multiple Unix/Linux Vendor Xpdf makeFileKey2 Stack Overflow 

iDEFENSE Security Advisory 01.18.05
www.idefense.com/application/poi/display?id=186&type=vulnerabilities
January 18, 2005

I. BACKGROUND

Xpdf is an open-source viewer for PDF files. More information is
available at the following site:

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

II. DESCRIPTION

Remote exploitation of a buffer overflow vulnerability in the xpdf PDF
viewer included in multiple Unix and Linux distributions could allow for

arbitrary code execution as the user viewing a PDF file.

The vulnerability specifically exists due to insufficient bounds
checking while processing a PDF file that provides malicious values in
the /Encrypt /Length tag. The offending code can be found in the
Decrypt::makeFileKey2 function in the source file xpdf/Decrypt.cc.

GBool Decrypt::makeFileKey2(int encVersion, int encRevision,
int keyLength, GString *ownerKey,
GString *userKey, int permissions,
GString *fileID, String *userPassword,
Guchar *fileKey) {
Guchar *buf;
Guchar test[32];
Guchar fState[256];
Guchar tmpKey[16];
Guchar fx, fy;
int len, i, j;
GBool ok;
...

memcpy(test, userKey->getCString(), 32);
for (i = 19; i >= 0; --i) {
for (j = 0; j < keyLength; ++j) {
[overflow] tmpKey[j] = fileKey[j] ^ i;
}
...
}
...
}

In this piece of code, the keyLength value is ultimately supplied by the

PDF file. This allows an attacker to specify an arbitrarily large value
and overwrite portions of stack memory. As a consequence, arbitrary code

execution is possible.

III. ANALYSIS

Successful exploitation of this vulnerability leads to arbitrary code
execution as the user who opened the malicious file. An attacker would
have to convince a target to open the provided file in order to exploit
this vulnerability, thus lessening the impact.

Exploitation can be performed reliably, especially with knowledge of the

target system.

IV. DETECTION

iDEFENSE has confirmed the existence of this vulnerability in version
3.00 of xpdf. It is suspected previous versions are vulnerable.

The following Linux vendors may be affected by this vulnerability:

Novell Inc. (SUSE)
Red Hat Inc.
The Fedora Project
Debian Project
Gentoo Foundation Inc.
The FreeBSD Project
OpenBSD

V. WORKAROUND

Only open PDF files from trusted individuals.

VI. VENDOR RESPONSE

A patch to address this issue is available at:

ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.00pl3.patch

Updated binaries (ver. 3.00pl3) to address this issue are available at:

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

VII. CVE INFORMATION

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

VIII. DISCLOSURE TIMELINE

01/06/2005 Initial vendor notification
01/12/2005 Initial vendor response
01/18/2005 Coordinated public disclosure

IX. CREDIT

The discoverer of this vulnerability wishes to remain anonymous.

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

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:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    22 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    17 Files
  • 21
    May 21st
    18 Files
  • 22
    May 22nd
    7 Files
  • 23
    May 23rd
    111 Files
  • 24
    May 24th
    27 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    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