PHP NTWDBLIB.DLL dbopen() buffer overflow

php-ntwdblib-bo (32885) The risk level is classified as HighHigh Risk

Description:

PHP is vulnerable to a stack-based buffer overflow, caused by improper bounds checking by dbopen() function in NTWDBLIB.DLL. If the MSSQL extension is installed, a local attacker could send an overly long string of more than 260 bytes to the mssql_connect() or mssql_pconnect() function to overflow a buffer and execute arbitrary code on the system with privileges of the Web server.

Platforms Affected:

  • PHP, PHP 4.0 RC1
  • PHP, PHP 4.0 Beta4
  • PHP, PHP 4.0 Beta3
  • PHP, PHP 4.0 Beta2
  • PHP, PHP 4.0 Beta1
  • PHP, PHP 4.0 Beta 4 Patch1
  • PHP, PHP 4.0 RC2
  • PHP, PHP 4.0
  • PHP, PHP 4.0.1
  • PHP, PHP 4.0.2
  • PHP, PHP 4.0.3
  • PHP, PHP 4.0.4
  • PHP, PHP 4.0.5
  • PHP, PHP 4.0.6
  • PHP, PHP 4.0.7
  • PHP, PHP 4.1.0
  • PHP, PHP 4.1.1
  • PHP, PHP 4.1.2
  • PHP, PHP 4.1.3
  • PHP, PHP 4.2.0
  • PHP, PHP 4.2.1
  • PHP, PHP 4.2.2
  • PHP, PHP 4.2.3
  • PHP, PHP 4.2.4
  • PHP, PHP 4.3.0
  • PHP, PHP 4.3.1
  • PHP, PHP 4.3.10
  • PHP, PHP 4.3.11
  • PHP, PHP 4.3.2
  • PHP, PHP 4.3.3
  • PHP, PHP 4.3.4
  • PHP, PHP 4.3.5
  • PHP, PHP 4.3.6
  • PHP, PHP 4.3.7
  • PHP, PHP 4.3.8
  • PHP, PHP 4.3.9
  • PHP, PHP 4.4.0
  • PHP, PHP 4.4.1
  • PHP, PHP 4.4.2
  • PHP, PHP 4.4.3
  • PHP, PHP 4.4.4
  • PHP, PHP 4.4.5
  • PHP, PHP 4.4.6

Remedy:

No remedy available as of July 4, 2009.

Consequences:

Gain Privileges

References:

  • BugTraq Mailing List, Mon Mar 05 2007 - 18:57:48 CST, PHP <= 4.4.6 mssql_connect() & mssql_pconnect() local buffer overflow and safe_mode bypass at http://archives.neohapsis.com/archives/bugtraq/2007-03/0009.html.
  • PHP Web site, PHP: Hypertext Preprocessor at http://www.php.net/.
  • BID-22832: PHP MSSQL_Connect Local Buffer Overflow Vulnerability
  • CVE-2007-1411: Buffer overflow in PHP 4.4.6 and earlier, and unspecified PHP 5 versions, allows local and possibly remote attackers to execute arbitrary code via long server name arguments to the (1) mssql_connect and (2) mssql_pconnect functions.
  • SA24353: PHP MSSQL Extension NTWDBLIB.DLL "dbopen" Buffer Overflow
  • VUPEN/ADV-2007-0867: PHP MSSQL Extension mssql_connect() and mssql_pconnect() Buffer Overflow Issue

Reported:

Mar 05, 2007

The information within this database may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the author/distributor (IBM Internet Security Systems X-Force) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.

For corrections or additions please email xforce@iss.net

Return to the main page