Public Vulnerability Reports

MySQL MaxDB Webtool Remote Lock-Token Stack Overflow Vulnerability



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.


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:


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) {

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.


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.


iDEFENSE has confirmed the existence of this vulnerability in MySQL


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


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


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 (, which standardizes names for
security problems. This is one of two vulnerabilities that have been
assigned CAN-2005-0684.


03/08/2005   Initial vendor notification
03/11/2005   Initial vendor response
04/25/2005   Coordinated public disclosure


The discoverer of this vulnerability wishes to remain anonymous.

Get paid for vulnerability research

Free tools, research and upcoming events


Copyright © 2005 Verisign, 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 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.