php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36722 possible integer overflow in memory allocation
Submitted: 2006-03-13 18:09 UTC Modified: 2006-03-23 01:00 UTC
Votes:13
Avg. Score:4.2 ± 0.9
Reproduced:12 of 12 (100.0%)
Same Version:1 (8.3%)
Same OS:2 (16.7%)
From: michael dot virnstein at brodos dot de Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 4.4.2 OS: SuSE Linux 9.0
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-03-13 18:09 UTC] michael dot virnstein at brodos dot de
Description:
------------
We randomly get errors like the following:
-----------------------------------------
[Mon Mar 13 17:39:12 2006] [error] [client 172.17.5.130] PHP Fatal error:  Possible integer overflow in memory allocation (28 * 139335776 + 0) in /home/geugen
/public_html/lib/class/button.php on line 172, referer: http://localhost/index.php
-----------------------------------------
the strange thing is that this line in the file only contains comments. There's also a class definition in the file, but this comment is not inside any function or class. 

Just a note:
In index.php there's an object called and inside one of the methods of this object the above file is included. Suffice to say that almost all files get included inside this method call or inside the included files.

The problem seems to occur totally random and disappears with reloading the page.

We are using PHP 4.4.2 as mod_php with Apache 2.0.54, but the problem occured with 4.4.1 also.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-13 18:11 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2006-03-13 18:39 UTC] michael dot virnstein at brodos dot de
This was an error in PHP 4.4.2 not in PHP 5.1
 [2006-03-13 19:00 UTC] tony2001@php.net
Exactly. And I would like to know if you're able to reproduce it with 5.1.
 [2006-03-13 19:16 UTC] michael dot virnstein at brodos dot de
Sorry, but i'm not able to test this problem with PHP 5.1 atm. This is a test-server in our company and we're not able to test our app with php 5 right now, especially with the problem occuring so random. This problem isn't even occuring on our production system at all. If there'd be a 4.4.x Version that i could test for a couple of days, i could provide some feedback.
 [2006-03-13 19:25 UTC] tony2001@php.net
Well, I'm afraid you're on your own with this problem, as apparently nobody except you is able reproduce it and it looks like there is no reproduce code for the issue.
 [2006-03-14 12:27 UTC] michael dot virnstein at brodos dot de
Is there a way i can provide mor information to you, by setting e.g. a php directive to get more information when such an error occures
 [2006-03-15 13:48 UTC] tony2001@php.net
Yes, and this information is a reproduce case.
 [2006-03-23 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2007-05-06 02:58 UTC] Alexander at Kriegisch dot name
PHP Fatal error:  Possible integer overflow in memory allocation (8 * 4 + 0) in Unknown on line 0

This was reported by a user trying to start a statically compiled PHP 5.2.1 (sapi/cgi binary) from an Apache 1.3.37. I cannot reproduce it on my router box, because it runs a 2.6 kernel, I just compiled the version for him (GCC 4.1.0, binutils 2.16.91.0.6, uClibc 0.9.26, crosstool-0.42).

Just wanted to add this to make clear that other users on other platforms and with other PHP versions have this problem, too. I cannot tell if the cause is the same, though.
 [2007-12-13 10:27 UTC] johan at solace dot miun dot se
A few weeks back, my websites suddenly started throwing random occurences of this message in different php-files...

Fatal error: Possible integer overflow in memory allocation (5 * 1 + 42) in /usr/local/webroot/www.imagine3d.org/html/mainfile.php on line 54

It happens in different php applications, like xoops and phpMyAdmin and even during the install of never version of php during its pear install part which is php.

I upgraded apache to 2.0.61 and php to 4.4.7 with no change.

fault seems to incure in different string and preg calls in the various applications but I havent been able to make a reproducable small and simple code example.

The fault comes up randomly, but quite often... sometimes it also 
just dies... no error...

System is a 12CPU Sun Enterprise 4500 with 12GB Ram,no hardware faults visible in logs, running Solaris 9.
 [2007-12-17 22:31 UTC] johan at solace dot miun dot se
Well,

I have found the problem at OUR site at least...

One of the twelve CPU's has a bit error in bit 2 of integer calculations, after switching them off and testing I found that CPU #5 was the culprit, since the code of the pages went randomly to different cpu's it sometimes worked, sometimes not...

there have been NO faults reported by the system, but with the cpu disabled it works flawlessy again so its no doubt in my mind its a hardware fault anymore.

Sorry if I wasted your time...

/Johan Andersson
 [2009-03-02 08:57 UTC] jinlizh0 at gmail dot com
I have this problem in our site.

PHP Fatal error:  Possible integer overflow in memory allocation (28 * -1220466008 + 0)

We are using php 4.4.9 , Red hat ES 4.

How I can solve this problem?

It's solved in PHP 5.1 or later ?
 [2010-11-03 21:41 UTC] youngad6 at gmail dot com
I had this problem and fixed it by deleting the wsdl cache files.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Oct 16 14:01:27 2019 UTC