CVE-2011-1092: Integer Overflow
Integer overflow in ext/shmop/shmop.c in PHP before 5.3.6 allows context-dependent attackers to cause a denial of service (crash) and possibly read sensitive memory via a large third argument to the shmopread function.
Other sources
It was reported [1],[2] that there was an integer overflow in PHP's shmopread() function. This function reads a given number of bytes from memory, at a given offset starting from a shared memory area. With a sufficiently large value, more memory is allocated than there is space for, which could result in a segfault because PHP is reading past its own memory. If there is enough allocated memory available, however, PHP could leak up to 2GB of arbitrary memory.
To test:
<?php $shmkey = ftok(FILE, 't'); $shmid = shmopopen($shmkey, "c", 0644, 100); $shmdata = shmopread($shmid, 1, 2147483647); //if there is no segmentation fault past this point, we have 2gb of memory! echo $shmdata; ?>
This sets a start value of 1, and 2^31 (2147483647) as the count:
2147483647+1 = -2147483647
This was corrected upstream [3] for version 5.3.6.
References:
[1] http://openwall.com/lists/oss-security/2011/03/08/9 [2] http://bugs.php.net/54193 [3] http://svn.php.net/viewvc/?view=revision&revision=309018
— Red Hat
Affected Software
Remediation
Patch Available
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2011-1092?
CVE-2011-1092 has a severity rating that indicates a potential for denial of service and possible memory exposure.
How do I fix CVE-2011-1092?
To fix CVE-2011-1092, you should upgrade to PHP versions 5.3.6 or later that address this vulnerability.
What versions of PHP are affected by CVE-2011-1092?
CVE-2011-1092 affects multiple versions of PHP, including 4.x and 5.2.x versions prior to 5.3.6.
What is the impact of exploiting CVE-2011-1092?
Exploiting CVE-2011-1092 can lead to a denial of service by crashing the application, potentially making sensitive data accessible.
Can CVE-2011-1092 be exploited remotely?
Yes, CVE-2011-1092 can be exploited by context-dependent attackers, which may allow for remote exploitation under certain circumstances.