Microsoft SQL Server / Data Engine xp_showcolv Buffer Overflow Vulnerability
BID:2038
Info
Microsoft SQL Server / Data Engine xp_showcolv Buffer Overflow Vulnerability
| Bugtraq ID: | 2038 |
| Class: | Boundary Condition Error |
| CVE: |
CVE-2000-1083 |
| Remote: | No |
| Local: | Yes |
| Published: | Dec 01 2000 12:00AM |
| Updated: | Jul 11 2009 03:56AM |
| Credit: | Discovered by David Litchfield <[email protected]> and publicized in Microsoft Security Bulletin (MS00-092) on December 1, 2000. |
| Vulnerable: |
Microsoft SQL Server 2000 Microsoft SQL Server 7.0 Microsoft Data Engine 2000 Microsoft Data Engine (MSDE) 1.0 |
| Not Vulnerable: | |
Discussion
Microsoft SQL Server / Data Engine xp_showcolv Buffer Overflow Vulnerability
The API Srv_paraminfo(), which is implemented by Extended Stored Procedures (XPs) in Microsoft SQL Server and Data Engine, is susceptible to a buffer overflow vulnerability which may cause the application to fail or arbitrary code to be executed on the target system depending on the data entered into the buffer.
XPs are DLL files that perform high level functions in SQL Server. When called, they invoke a function called Srv_paraminfo() to parse the input parameters.
A vulnerability lies in Srv_paraminfo() and the fact that it does not check the length of the parameter string that an XP passes to it. If an attacker can pass an overly long string to the XP xp_showcolv, a buffer overflow can occur due to an unsafe memory copy. This can cause SQL Server to crash.
It may also be possible for attackers to execute arbitrary code on the host running SQL Server. The attacker would need to overwrite the return address of the calling function with the address of supplied shellcode in memory. This shellcode would be executed under the context of the account that the SQL Server service was configured to run under. The minimum privilege level that the account would have to possess are SYSTEM privileges.
This vulnerability is confined to those who can successfully log onto the SQL server.
The API Srv_paraminfo(), which is implemented by Extended Stored Procedures (XPs) in Microsoft SQL Server and Data Engine, is susceptible to a buffer overflow vulnerability which may cause the application to fail or arbitrary code to be executed on the target system depending on the data entered into the buffer.
XPs are DLL files that perform high level functions in SQL Server. When called, they invoke a function called Srv_paraminfo() to parse the input parameters.
A vulnerability lies in Srv_paraminfo() and the fact that it does not check the length of the parameter string that an XP passes to it. If an attacker can pass an overly long string to the XP xp_showcolv, a buffer overflow can occur due to an unsafe memory copy. This can cause SQL Server to crash.
It may also be possible for attackers to execute arbitrary code on the host running SQL Server. The attacker would need to overwrite the return address of the calling function with the address of supplied shellcode in memory. This shellcode would be executed under the context of the account that the SQL Server service was configured to run under. The minimum privilege level that the account would have to possess are SYSTEM privileges.
This vulnerability is confined to those who can successfully log onto the SQL server.
Exploit / POC
Microsoft SQL Server / Data Engine xp_showcolv Buffer Overflow Vulnerability
@Stake <[email protected]> has released the following proof-of-concept code:
@Stake <[email protected]> has released the following proof-of-concept code:
Solution / Fix
Microsoft SQL Server / Data Engine xp_showcolv Buffer Overflow Vulnerability
Solution:
Microsoft has released the following patches which eliminate the vulnerability:
Microsoft SQL Server 2000
Microsoft SQL Server 7.0
Solution:
Microsoft has released the following patches which eliminate the vulnerability:
Microsoft SQL Server 2000
-
Microsoft Q280380
Intel
http://download.microsoft.com/download/SQLSVR2000/ss2kxp/2000/W98NT42K Me/EN-US/s80233i.exe
Microsoft SQL Server 7.0
-
Microsoft Q280380
Intel
http://download.microsoft.com/download/sql70/Patch/7.0/WIN98Me/EN-US/s 70918i.exe -
Microsoft Q280380
Alpha
http://download.microsoft.com/download/sql70/ss7pespv/7.0/ALPHA/EN-US/ s70918a.exe
References
Microsoft SQL Server / Data Engine xp_showcolv Buffer Overflow Vulnerability
References:
References: