BugTraq
@(#)Mordred Labs advisory - Integer overflow in PHP str_repeat() function Apr 01 2003 12:29PM
Sir Mordred (mordred s-mail com) (1 replies)
//@(#) Mordred Security Labs advisory

Release date: April 1, 2003
Name: Integer overflow in PHP str_repeat() function
Versions affected: all versions
Risk: average
Author: Sir Mordred (mordred (at) s-mail (dot) com [email concealed])

I. Description:

PHP is a widely-used general-purpose scripting language that is
especially suited for Web development and can be embedded into HTML.
Please visit http://www.php.net for more information about PHP.

II. Details:

The function str_repeat(string input, int multiplier) returns input
repeated multiplier times.

The implementation of this function suffers from a simple integer overflow
caused by
a very long second argument and could allow a local/remote attacker in the
worst case to gain control over the web server.

The following short script will illustrate this vulnerability:

$ cat t.php
<?php
str_repeat(str_repeat("A", 0x2000), 0x40000000);
?>

III. Platforms tested

Linux 2.4 with Apache 1.3.27 / PHP 4.3.1

IV. Vendor response

Vendor has been contacted.

________________________________________________________________________

This letter has been delivered unencrypted. We'd like to remind you that
the full protection of e-mail correspondence is provided by S-mail
encryption mechanisms if only both, Sender and Recipient use S-mail.
Register at S-mail.com: http://www.s-mail.com

[ reply ]
Re: @(#)Mordred Labs advisory - Integer overflow in PHP str_repeat() function Apr 03 2003 06:39AM
Goran Krajnovic (goran krajnovic hinet hr) (2 replies)
Re: @(#)Mordred Labs advisory - Integer overflow in PHP str_repeat() function Apr 04 2003 07:45PM
Javi Lavandeira (javi isr co jp) (1 replies)
Re: @(#)Mordred Labs advisory - Integer overflow in PHP str_repeat() function Apr 04 2003 08:20PM
Jon Ribbens jon+bugtraq (at) unequivocal.co (dot) uk [email concealed] (jon+bugtraq unequivocal co uk)
Re: @(#)Mordred Labs advisory - Integer overflow in PHP str_repeat() function Apr 03 2003 10:10PM
Jedi/Sector One (j pureftpd org)


 

Privacy Statement
Copyright 2010, SecurityFocus