-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

===========================================================================
             AUSCERT External Security Bulletin Redistribution

           ESB-2005.0336 -- iDEFENSE Security Advisory 04.25.05
            Multiple MySQL MaxDB Webtool Remote Vulnerabilities
                               26 April 2005

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:           MySQL MaxDB
Publisher:         iDEFENSE
Operating System:  Linux variants
                   UNIX variants
                   Windows
Impact:            Administrator Compromise
Access:            Remote/Unauthenticated
CVE Names:         CAN-2005-0684

Original Bulletin:
  http://www.idefense.com/application/poi/display?id=234&type=vulnerabilities
  http://www.idefense.com/application/poi/display?id=235&type=vulnerabilities

Comment: This ESB contains two iDEFENSE advisories relating to stack
         overflow vulnerabilities in the web administration service of MaxDB.
         Both vulnerabilities have been fixed in MaxDB v7.5.00.26

- --------------------------BEGIN INCLUDED TEXT--------------------

MySQL MaxDB Webtool Remote Stack Overflow Vulnerability

iDEFENSE Security Advisory 04.25.05
http://www.idefense.com/application/poi/display?id=234&type=vulnerabilities
April 25, 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.

II. DESCRIPTION

Remote exploitation of a stack-based buffer overflow vulnerability in 
MySQL MaxDB could allow attackers to execute arbitrary code. 

The vulnerability specifically exists due to improper handling of HTTP 
GET queries containing a percent sign (%). When an attacker issues an 
HTTP GET request specifying a percent sign followed by a long string as 
the file parameter, a stack-based overflow occurs. Although exceptions 
within the process can be raised with smaller strings, it is necessary 
to provide a string of approximately 4,000 bytes in length to overwrite 
the process Structured Exception Handler (SEH). Using this method, is 
possible to gain control of execution flow and execute arbitrary code. 

It is also possible to simply overwrite the program's saved instruction 
pointer. However, it would be necessary to provide several valid 
pointers in the buffer along the way in order to avoid premature 
exceptions.

III. ANALYSIS

Successful exploitation of the vulnerability can allow remote attackers 
to execute code with SYSTEM privileges. Note that the vulnerability is 
in the web administration service, which should be configured not to 
allow connections from untrusted hosts or listen on public-facing 
network interfaces.

IV. DETECTION

iDEFENSE has confirmed the existence of this vulnerability in MySQL 
MaxDB 7.5.00.23.

V. WORKAROUND

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

VI. VENDOR RESPONSE

This vulnerability is addressed in MySQL MaxDB 7.5.00.26 available for
download at:

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

VII. CVE INFORMATION

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

VIII. DISCLOSURE TIMELINE

03/08/2005  Initial vendor notification
03/11/2005  Initial vendor response
04/25/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

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.

- ---------------------------------------------------------------------------

MySQL MaxDB Webtool Remote Lock-Token Stack Overflow Vulnerability 

iDEFENSE Security Advisory 04.25.05
http://www.idefense.com/application/poi/display?id=235&type=vulnerabilities
April 25, 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.

II. DESCRIPTION

Remote exploitation of a stack-based buffer overflow vulnerability in 
MySQL MaxDB could allow attackers to execute arbitrary code. 

The vulnerability specifically exists due to a lack of bounds checking 
in the WebDAV functionality of the web tool. When an attacker issues an 
HTTP request with the unlock method, along with a long Lock-Token 
string, a stack-based overflow occurs. The offending code follows: 

MaxDB_ORG/sys/src/SAPDB/WebDAV/Handler/WDVHandler_CommonUtils.c:

WDVH_Bool getLockTokenHeader(sapdbwa_HttpRequestP request,
                             WDVH_Char *sLockToken,
                             WDVH_Char *errormsg) 
{
WDVH_Char       *temp1, *temp2, *temp4, *temp5;
WDVH_UInt4      length;
WDVH_Char       temp3[WDVH_MAX_IF_HEADER_LEN];

if (request==NULL || sLockToken==NULL || errormsg==NULL)
    return WDVH_False;

temp4 = (char*)sapdbwa_GetHeader(request,"Lock-Token");
if (temp4 != NULL) {
    strcpy(temp3,temp4);
[...] 

The variable temp3 is a fixed-length stack buffer. The function 
sapdbwa_GetHeader() returns the user supplied value for Lock-Token. This

user-supplied value is then copied into the fixed-size buffer using a 
strcpy() call. Due to no boundary checking, it is possible to overflow 
the stack buffer and overwrite stack memory, ultimately leading to 
control of execution flow and execution of arbitrary code.

III. ANALYSIS

Successful exploitation of the vulnerability can allow remote attackers 
to execute code with SYSTEM privileges. Note that the vulnerability is 
in the web administration service, which should be configured to not 
allow connections from untrusted hosts or listening on public-facing 
network interfaces.

IV. DETECTION

iDEFENSE has confirmed the existence of this vulnerability in MySQL 
MaxDB 7.5.00.23.

V. WORKAROUND

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

VI. VENDOR RESPONSE

This vulnerability is addressed in MySQL MaxDB 7.5.00.26 available for
download at:

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

VII. CVE INFORMATION

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

VIII. DISCLOSURE TIMELINE

03/08/2005  Initial vendor notification
03/11/2005  Initial vendor response
04/25/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

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.

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        http://www.auscert.org.au/render.html?cid=1980

If you believe that your computer system has been compromised or attacked in 
any way, we encourage you to let us know by completing the secure National IT 
Incident Reporting Form at:

        http://www.auscert.org.au/render.html?it=3192

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
===========================================================================

-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQCVAwUBQm3PASh9+71yA2DNAQKI+wP/VQamCc4xb9yPFN7LQii95H5DReOLT8fb
mZGW3we8IhwW+b9joeuWtDDywPDfXbajACSF1mXNm3NLqOeEsOC1c4J+aEd7/suE
Q7EL1uUVVrFD8GuIyXBlIlqjGctVhULC942LsCmL1w8rRHHqxSBaBhQozAjjVwFP
XhEm6jD1Qps=
=BHbt
-----END PGP SIGNATURE-----