REDHAT-BUG-683183: Integer Overflow

Published Mar 8, 2011
·
Updated

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

Affected Software

1 affected component
The PHP Group PHP>=5.3.0, <5.3.6

Event History

Mar 8, 2011
Data Sourced
via Red Hat·07:05 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-683183?

The severity of REDHAT-BUG-683183 is considered high due to the potential for integer overflow vulnerabilities that may lead to memory corruption.

2

How do I fix REDHAT-BUG-683183?

To fix REDHAT-BUG-683183, update PHP to a version later than 5.3.6 where this vulnerability has been addressed.

3

What versions of PHP are affected by REDHAT-BUG-683183?

REDHAT-BUG-683183 affects PHP versions from 5.3.0 to below 5.3.6.

4

What is the nature of the vulnerability in REDHAT-BUG-683183?

The vulnerability in REDHAT-BUG-683183 is due to an integer overflow in the shmop_read() function which can lead to memory allocation issues.

5

What are the potential impacts of REDHAT-BUG-683183?

The potential impacts of REDHAT-BUG-683183 include application crashes and unauthorized access to system memory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203