[UNIX] Integer overflow in PHP array_pad() function

From: support@securiteam.com
Date: 04/06/03

  • Next message: support@securiteam.com: "[NEWS] Clear Text Password Vulnerability Found in DeskNow"
    From: support@securiteam.com
    To: list@securiteam.com
    Date: 6 Apr 2003 13:10:52 +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

    In the US?

    Contact Beyond Security at our new California office
    housewarming rates on automated network vulnerability
    scanning. We also welcome ISPs and other resellers!

    Please contact us at: 323-882-8286 or ussales@beyondsecurity.com
    - - - - - - - - -

      Integer overflow in PHP array_pad() function
    ------------------------------------------------------------------------

    SUMMARY

     <http://www.php.net > PHP is a widely-used general-purpose scripting
    language that is especially suited for Web development and can be embedded
    into HTML.
    A buffer overflow in the array_pad function may enable users that can
    execute PHP commands to gain administrative privileges.

    DETAILS

    The function array_pad(array input, int pad_size, mixed pad_value) returns
    a copy of the input padded to size specified by pad_size with pad_value.

    Unfortunately the implementation of this function suffers from an integer
    overflow caused by a very long second argument and could allow a local or
    remote attacker to gain control over the web server.

    The following short script will cause an httpd child to die:

    $ cat t.php
    <?php
        array_pad(array(1,2,3), 0x40000003, "pad");
    ?>

    Platforms tested:
    Linux 2.4 with Apache 1.3.27 / PHP 4.3.1

    Vendor status:
    Vendor was contacted.

    ADDITIONAL INFORMATION

    This information has been provided by Sir Mordred
    <mailto:mordred@s-mail.com)> mordred@s-mail.com.

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

    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.


  • Next message: support@securiteam.com: "[NEWS] Clear Text Password Vulnerability Found in DeskNow"

    Relevant Pages

    • [UNIX] ProBoards Forums Contains a XXS Vulnerability
      ... A user viewing the post would see a popup message containing his cookie. ... Vendor was notified and the vulnerability was fixed almost immediately. ... 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. ...
      (Securiteam)
    • [UNIX] Sun AnswerBook2 Gettransbitmap Buffer Overflow Vulnerability
      ... there are no vendor patches available. ... Otherwise, disable AnswerBook2. ... 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. ...
      (Securiteam)
    • [NT] Macromedia Sitespring Cross-Site Scripting
      ... The vendor was notified on 16 April 2002. ... Replace the error script with a custom error page. ... 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. ...
      (Securiteam)
    • [UNIX] B2 PHP Remote Command Execution
      ... B2 is a php script that allows webmasters to ... But since b2config.php does not exist inside the directory, an attacker ... 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. ...
      (Securiteam)
    • [NT] Windows Based PHP Leaks True Path
      ... PHP for Windows reveals the true path where the program was installed. ... http://somehost/database.php/123 the PHP program will return its install ... 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. ...
      (Securiteam)