Movatterモバイル変換


[0]ホーム

URL:


Home page logo
bugtraq logo

Bugtraqmailing list archives

PreviousBy DateNext
PreviousBy ThreadNext

iDEFENSE Security Advisory 01.18.05 - Multiple Unix/Linux Vendor Xpdf makeFileKey2 Stack Overflow


From: "customer service mailbox" <customerservice () idefense com>
Date: Tue, 18 Jan 2005 16:38:57 -0500

Multiple Unix/Linux Vendor Xpdf makeFileKey2 Stack Overflow iDEFENSE Security Advisory 01.18.05www.idefense.com/application/poi/display?id=186&type=vulnerabilitiesJanuary 18, 2005I. BACKGROUNDXpdf is an open-source viewer for PDF files. More information is available at the following site:http://www.foolabs.com/xpdf/II. DESCRIPTIONRemote exploitation of a buffer overflow vulnerability in the xpdf PDF viewer included in multiple Unix and Linux distributions could allow forarbitrary 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 thePDF file. This allows an attacker to specify an arbitrarily large value and overwrite portions of stack memory. As a consequence, arbitrary codeexecution is possible.III. ANALYSISSuccessful 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 thetarget system.IV. DETECTIONiDEFENSE 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. WORKAROUNDOnly open PDF files from trusted individuals.VI. VENDOR RESPONSEA patch to address this issue is available at:ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.00pl3.patchUpdated binaries (ver. 3.00pl3) to address this issue are available at:http://www.foolabs.com/xpdf/download.htmlVII. CVE INFORMATIONThe Common Vulnerabilities and Exposures (CVE) project has assigned thenames CAN-2005-0064 to these issues. This is a candidate for inclusionin the CVE list (http://cve.mitre.org), which standardizes names forsecurity problems.VIII. DISCLOSURE TIMELINE01/06/2005  Initial vendor notification01/12/2005  Initial vendor response01/18/2005  Coordinated public disclosureIX. CREDITThe discoverer of this vulnerability wishes to remain anonymous.Get paid for vulnerability researchhttp://www.idefense.com/poi/teams/vcp.jspX. LEGAL NOTICESCopyright (c) 2005 iDEFENSE, Inc.Permission is granted for the redistribution of this alertelectronically. It may not be edited in any way without the expresswritten consent of iDEFENSE. If you wish to reprint the whole or anypart of this alert in any other medium other than electronically, pleaseemail customerservice () idefense com for permission.Disclaimer: The information in the advisory is believed to be accurateat the time of publishing based on currently available information. Useof the information constitutes acceptance for use in an AS IS condition.There are no warranties with regard to this information. Neither theauthor nor the publisher accepts any liability for any direct, indirect,or consequential loss or damage arising from use of, or reliance on,this information.

PreviousBy DateNext
PreviousBy ThreadNext

Current thread:


[8]ページ先頭

©2009-2026 Movatter.jp