Gentoo: mod_php Integer overflow vulnerability
Posted by LinuxSecurity.com Team   
Gentoo Integer overflows have been fixed in several php functions.

- - ---------------------------------------------------------------------
GENTOO LINUX SECURITY ANNOUNCEMENT 200306-02
- - ---------------------------------------------------------------------

          PACKAGE : mod_php php
          SUMMARY : integer overflow
             DATE : 2003-06-08 17:47 UTC
          EXPLOIT : local
VERSIONS AFFECTED : =mod_php-4.3.2 >=mod_php-4.3.2
              CVE :

- - ---------------------------------------------------------------------

From advisories:

"In PHP emalloc() function implements the error safe wrapper around malloc().
Unfortunately this function suffers from an integer overflow and
considering the fact that emalloc() is used in many places around PHP
source code, it may lead to many serious security issues."

"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 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/remote
attacker in the worst case to gain control over the web server."

Read the full advisories at: 
http://marc.theaimsgroup.com/?l=bugtraq&m=104860818613543&w=2 
http://marc.theaimsgroup.com/?l=bugtraq&m=104931355406416&w=2 
http://marc.theaimsgroup.com/?l=bugtraq&m=104931384806788&w=2

SOLUTION

It is recommended that all Gentoo Linux users who are running
dev-php/mod_php and/or dev-php/php upgrade
to mod_php-4.3.2 and/or php-4.3.2 as follows

emerge sync
emerge mod_php
and/or
emerge php
emerge clean

- - ---------------------------------------------------------------------
aliz@gentoo.org - GnuPG key is available at  http://cvs.gentoo.org/~aliz
robbat2@gentoo.org
- - ---------------------------------------------------------------------