[NT] Sybase DROP DATABASE Buffer Overflow

From: support@securiteam.com
Date: 11/28/02

  • Next message: support@securiteam.com: "[NT] Sybase xp_freedll Buffer Overflow"
    From: support@securiteam.com
    To: list@securiteam.com
    Date: 28 Nov 2002 18:04:45 +0200
    
    

    The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
    - - promotion

    Beyond Security would like to welcome Tiscali World Online
    to our service provider team.
    For more info on their service offering IP-Secure,
    please visit http://www.worldonline.co.za/services/work_ip.asp
    - - - - - - - - -

      Sybase DROP DATABASE Buffer Overflow
    ------------------------------------------------------------------------

    SUMMARY

    The built-in function DROP DATABASE contains a buffer overflow that may
    allow an attacker to overwrite the stack and execute arbitrary code under
    the security context of the server. Any valid login in Sybase is able to
    execute this function.

    DETAILS

    Vulnerable systems:
     * Sybase Adaptive Server version 12.0 and 12.5

    Sybase Adaptive Server provides a built-in function called DROP DATABASE.
    This function is used to remove a database from the server.

    DROP DATABASE accepts a single parameter that is the name of the database
    to remove. DROP DATABASE does not validate the length of the string passed
    into the first parameter. This buffer overflow may allow an attacker to
    run arbitrary code under the security context of the database.

    Below is an example of overflowing the buffer using the SQL tool isql.exe.

    1> declare @test varchar(16384)
    2> select @test = replicate('A', 16384)
    3> DROP DATABASE @test
    4> go

    Fix:
    You should apply the following patches:
     * 12.5.0.2 - 11/14/2002
     * 12.0.0.6 ESD#1 - 11/5/2002

    These patches can be downloaded from
    <http://downloads.sybase.com/swd/swx> http://downloads.sybase.com/swd/swx

    ADDITIONAL INFORMATION

    The original advisory can be found at:
     <http://www.appsecinc.com/resources/alerts/sybase/02-0002.html>
    http://www.appsecinc.com/resources/alerts/sybase/02-0002.html

    The information has been provided by <mailto:anewman@appsecinc.com> Aaron
    C. Newman (Application Security, Inc.).

    ========================================

    This bulletin is sent to members of the SecuriTeam mailing list.
    To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
    In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com

    ====================
    ====================

    DISCLAIMER:
    The information in this bulletin is provided "AS IS" without warranty of any kind.
    In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.



    Relevant Pages