Skip Navigation

  • Home
  • Contact us
  • FAQ
  • Glossary
  • Public key
  • Sitemap
  • Cymraeg
  • What's new
CPNI - Centre for the Protection of National Infastructure

Advanced search

  • About CPNI
  • The threats
  • Security planning
  • Methods of attack
  • Protecting your assets
  • Products and services
    • CSIRTUK advisories
      • Advisories archive
    • General protective security publications
    • InfoSec briefings
    • InfoSec technical notes
    • InfoSec vulnerability disclosures
    • Good practice guidelines
    • Viewpoints
    • Information exchanges
    • Risk Management Delivery Group
  • Research
Home > Products and services > CSIRTUK advisories > Advisories archive > January 2005 > Two iDEFENSE Security Advisories: 1. Multiple Unix/Linux Vendor Xpdf makeFileKey2 Stack Overflow 2. MySQL MaxDB Web Agent Multiple Denial of Service Vulnerabilities

January 2005

Two iDEFENSE Security Advisories: 1. Multiple Unix/Linux Vendor Xpdf makeFileKey2 Stack Overflow 2. MySQL MaxDB Web Agent Multiple Denial of Service Vulnerabilities

ID: 00051
Ref: 47/2005
Date: 20 January 2005:13:05:16
Version: 1

Title: Two iDEFENSE Security Advisories: 1. Multiple Unix/Linux Vendor Xpdf makeFileKey2 Stack Overflow 2. MySQL MaxDB Web Agent Multiple Denial of Service Vulnerabilities
Abstract:
Vendors affected: iDEFENSE
Operating systems affected: iDEFENSE
Applications affected: iDEFENSE

Title
=====
Two iDEFENSE Security Advisories:

1. Multiple Unix/Linux Vendor Xpdf makeFileKey2 Stack Overflow

2. MySQL MaxDB Web Agent Multiple Denial of Service Vulnerabilities


Detail
======

1. 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.

2. Two remotely exploitable denial of service conditions have been found
to exist in MySQL MaxDB and SAP DB Web Agent products.
The first vulnerability specifically exists due to a null pointer
dereference in the sapdbwa_GetUserData() function. A remote attacker
can request the webdav handler code with invalid parameters to cause
a null pointer dereference resulting in a crash of SAP DB Web Agent. The second vulnerability is due to insufficient handling of malformed
HTTP headers. A remote attacker can submit a HTTP request with invalid
headers to cause a denial of service.




1.





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

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.




2.


MySQL MaxDB Web Agent Multiple Denial of Service Vulnerabilities

iDEFENSE Security Advisory 01.19.05
www.idefense.com/application/poi/display?id=187&type=vulnerabilities
January 19, 2005

I. BACKGROUND

MaxDB by MySQL is a re-branded and enhanced version of SAP DB, SAP
AG's open source database. MaxDB is a heavy-duty, SAP-certified open
source database that offers high availability, scalability and a
comprehensive feature set. MaxDB complements the MySQL database server,
targeted for large mySAP ERP environments and other applications that
require maximum enterprise-level database functionality. Further
details are available at:

http://www.mysql.com/products/maxdb/

II. DESCRIPTION

Two remotely exploitable denial of service conditions have been found
to exist in MySQL MaxDB and SAP DB Web Agent products.

The first vulnerability specifically exists due to a null pointer
dereference in the sapdbwa_GetUserData() function. A remote attacker
can request the webdav handler code with invalid parameters to cause
a null pointer dereference resulting in a crash of SAP DB Web Agent.

The second vulnerability is due to insufficient handling of malformed
HTTP headers. A remote attacker can submit a HTTP request with invalid
headers to cause a denial of service.

III. ANALYSIS

A remote attacker can send simple HTTP requests to cause MaxDB Web Agent
to crash.

IV. DETECTION

iDEFENSE has confirmed the existence of these vulnerabilities in MySQL
MaxDB 7.5.0.0 on Linux and Windows platforms. It is believed that all
versions prior to 7.5.0.21 are affected.

V. WORKAROUND

Employ firewalls, access control lists or other TCP/UDP restriction
mechanisms to limit access to administrative systems and services.

VI. VENDOR RESPONSE

The vulnerability has been addressed in MaxDB 7.5.00.21.

Updated binaries (version 7.5.00.23) are available from:

http://dev.mysql.com/downloads/maxdb/7.5.00.html

VII. CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned
the following names to these issues:

CAN-2005-0081
MySQL MaxDB Web Agent Null HTTP Header Denial of Service Vulnerability

CAN-2005-0082
MySQL MaxDB Web Agent GetUserData Denial of Service Vulnerability

VIII. DISCLOSURE TIMELINE

08/20/2004 Initial vendor notification
08/24/2004 Initial vendor response
01/19/2005 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

VII. 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.
  • Accessibility |
  • Terms and conditions |
  • Privacy statement |
  • Data protection act |
  • Freedom of information |