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

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

           ESB-2005.0039 -- iDEFENSE Security Advisory 01.13.05
      MySQL MaxDB WebAgent websql logon Buffer Overflow Vulnerability
                              14 January 2005

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

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

Product:           MySQL MaxDB
Publisher:         iDEFENSE
Operating System:  Linux variants
                   UNIX variants
                   Windows
Impact:            Execute Arbitrary Code/Commands
Access:            Remote/Unauthenticated

Original Bulletin: http://www.idefense.com/application/poi/display?id=181

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

MySQL MaxDB WebAgent websql logon Buffer Overflow Vulnerability

iDEFENSE Security Advisory 01.13.05
www.idefense.com/application/poi/display?id=181&type=vulnerabilities
January 13, 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.

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

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 websql CGI application. In this case, the value of the password 
parameter is converted to unicode and then copied to the stack. The 
resulting overflow can overwrite the saved values for eip and ebp if 
supplied with a 294 byte value. The stored register values are 
overwritten with portions of the unicode copy of the string which may be

leveraged to execute arbitrary code with SYSTEM privileges. A simple 
overwrite with a long password value will result in the following 
debugger output:

Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 328.0xc80]
0x00410041 in ?? ()
(gdb) bt
#0  0x00410041 in ?? ()
#1  0x00410041 in ?? ()
#2  0x00420042 in ?? ()
#3  0x00430043 in ?? ()
#4  0x00440044 in ?? ()
(gdb) i r
eax            0x0      0
ecx            0x440044 4456516
edx            0x440044 4456516
ebx            0x1a789e0        27757024
esp            0x1559490        0x1559490
ebp            0x410041 0x410041
esi            0x1a72190        27730320
edi            0x1a3d2d4        27513556
eip            0x410041 0x410041

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 listen on public facing 
network interfaces.

IV. DETECTION

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

V. WORKAROUND

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

VI. VENDOR RESPONSE

The vulnerability has been addressed in MaxDB 7.5.00.18.

Further details are available at:
http://www.sapdb.org/webpts?wptsdetail=yes&ErrorType=0&ErrorID=1131190

VII. CVE INFORMATION

A Mitre Corp. Common Vulnerabilities and Exposures (CVE) number has not
been assigned yet.

VIII. DISCLOSURE TIMELINE

12/22/2004  Initial vendor notification
12/27/2004  Initial vendor response
01/13/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

X. LEGAL NOTICES

Copyright (c) 2004 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

iQCVAwUBQec2gyh9+71yA2DNAQKAUAP/TiVUhWeMOdZGyVxm/R6lPAib83u0qX7y
K2yDGBMP7xHQV+7d0ixlT1AGEV0bKobyiVDd0ujZuL6smiadtYrmNrU7BbzkzvU4
SYwfAcncrAd55xXU98WlDA0Qn1I7QYQ5Z2v6E+ywUnev6/ARWLA7Lx+WaKm1/XfY
IjiGIYyB6kA=
=6bwK
-----END PGP SIGNATURE-----