J-Security Center

Latest Attack Object Updates
  • IDP Daily Update #1545
    posted: 11/19/09
  • NSM Daily Update #1545
    posted: 11/19/09
  • Deep Inspection 5.3r5 and above, 5.4, 6.0 #1545
    posted: 11/19/09
  • Deep Inspection 5.1 and 5.2 #1435
    posted: 11/19/09
  • Deep Inspection 5.0, 5.3r4 and below #1132
    posted: 03/28/08 (04/01/08 for 5.0)
  • Antivirus
    posted: 11/19/09

Title: Microsoft SQL-Server Buffer Overflow Vulnerability

Severity: HIGH

Description:

Microsoft SQL Server contains buffer overflows in several built-in text formatting and printing functions.

Two of the affected functions are 'raiserror()' and 'xp_sprintf()', both vulnerable to overflows due to inadequate bounds checking of externally supplied data prior to memory copy operations. If the amount of data supplied exceeds the size of the buffer where it is to be copied, the excessive data will overwrite neighbouring memory. If critical data such as the function return address on the stack is overwritten, the flow of program execution can be altered.

If an attacker can invoke the affected procedures with custom arguments, or insert/modify arguments for legitimate invocations, arbitrary code can be executed. This can be accomplished by replacing the affected function return address with a pointer to supplied shellcode.

To exploit these conditions, special malicious queries must be constructed and sent to the server for execution by an attacker. Any database user with the ability to execute queries can attempt this. It may be possible for attackers who are not database users to exploit this vulnerability through input to applications that interact with the database, such as CGI scripts or Java programs. Public domain CGI scripts are notoriously ridden with input validation vulnerabilities that may allow for attacker insertion of exploit code into SQL queries.

This vulnerability makes it possible for an attacker to execute arbitrary code in the security context of the server process. An attacker can also exploit this vulnerability to crash the server.

Affected Products:

  • Microsoft SQL Server 2000
  • Microsoft SQL Server 2000 SP1
  • Microsoft SQL Server 7.0
  • Microsoft SQL Server 7.0 SP1
  • Microsoft SQL Server 7.0 SP1 alpha
  • Microsoft SQL Server 7.0 SP2
  • Microsoft SQL Server 7.0 SP2 alpha
  • Microsoft SQL Server 7.0 SP3
  • Microsoft SQL Server 7.0 SP3 alpha
  • Microsoft SQL Server 7.0 alpha

References:

Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.