// back

IBM DB2 UidKey::getHashCode Integer Signedness Vulnerability

06.03.12

BACKGROUND

IBM Corp.'s DB2 Database product is a large database server product commonly used for high-end databases. For more information, visit the product website at the following URL.

http://ibm.com/db2/

DESCRIPTION

Remote exploitation of an integer signedness vulnerability in IBM Corp.'s DB2 could allow an attacker to execute arbitrary code with the privileges of the affected service.

The vulnerability occurs when processing a login request, before the credentials are verified. The vulnerable code is responsible for creating a hash value from the username provided, and does so by summing the values of the characters in the name. The hash value is later used to index into an array of function pointers. If the hash value result is a negative 8bit value, it will be sign extended into a 32bit signed integer. This value is then used as the table index. By providing a negative value, it is possible to index outside of the table, and treat arbitrary heap memory as a function pointer. This can lead to the execution of arbitrary code if an attacker can control heap data at this location.

ANALYSIS

Exploitation of this vulnerability results in the execution of arbitrary code with the privileges of the affected service, usually the privileges of the 'das' user. Since this vulnerability occurs during the processing of an authentication request, but before the credentials are authenticated, no authentication is required to exploit this vulnerability. All an attacker needs to exploit this vulnerability is the ability to connect to the target server over TCP port 524.

DETECTION

iDefense has confirmed the existence of this vulnerability in DB2 version 9.7 FP4. DB2 versions 9.5 GA to 9.5 FP8 are also vulnerable.

WORKAROUND

It is possible to disable the DB2 administrative server by issuing the following command: "db2admin stop." The DB2 database server will continue to function without problems, but remote administration will be disabled.

VENDOR RESPONSE

IBM Corp. has addressed this vulnerability with the release of DB2 Version 9.5 Fix Pack 9. More information can be found at the following URL:

http://www-01.ibm.com/support/docview.wss?uid=swg1IC80728

CVE INFORMATION

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

DISCLOSURE TIMELINE

12/14/2011 Initial Vendor Notification
12/19/2011 Initial Vendor Reply
03/06/2012 Coordinated Public Disclosure

CREDIT

The discoverer of this vulnerability wishes to remain anonymous.

Get paid for vulnerability research
http://labs.idefense.com/methodology/vulnerability/vcp.php

Free tools, research and upcoming events
http://labs.idefense.com/

LEGAL NOTICES

Copyright © 2012 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 e-mail customer service 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.