Xpdf, GPdf: Stack overflow in Decrypt::makeFileKey2

Security Team  Contact Address

Updated January 21, 2005

1.  Gentoo Linux Security Advisory

Version Information

Advisory Reference GLSA 200501-28 / Xpdf
Release Date January 21, 2005
Latest Revision January 21, 2005: 01
Impact normal
Exploitable remote
Package Vulnerable versions Unaffected versions Architecture(s)
app-text/xpdf <= 3.00-r7 >= 3.00-r8 All supported architectures
app-text/gpdf < 2.8.2 >= 2.8.2 All supported architectures

Related bugreports: #77888, #78128

Synopsis

A stack overflow was discovered in Xpdf, potentially resulting in the execution of arbitrary code. GPdf includes Xpdf code and therefore is vulnerable to the same issue.

2.  Impact Information

Background

Xpdf is an open source viewer for Portable Document Format (PDF) files. GPdf is a Gnome-based PDF viewer that includes some Xpdf code.

Description

iDEFENSE reports that the Decrypt::makeFileKey2 function in Xpdf's Decrypt.cc insufficiently checks boundaries when processing /Encrypt /Length tags in PDF files.

Impact

An attacker could entice an user to open a specially-crafted PDF file which would trigger a stack overflow, potentially resulting in execution of arbitrary code with the rights of the user running Xpdf or GPdf.

3.  Resolution Information

Workaround

There is no known workaround at this time.

Resolution

All Xpdf users should upgrade to the latest version:

Code Listing 3.1: Resolution

# emerge --sync
# emerge --ask --oneshot --verbose ">=app-text/xpdf-3.00-r8"

All GPdf users should also upgrade to the latest version:

Code Listing 3.2: Resolution

# emerge --sync
# emerge --ask --oneshot --verbose ">=app-text/gpdf-2.8.2"

4.  References