PHP 5.2.10 fixes one security issue: http://www.php.net/releases/5_2_10.php Fixed bug #48378 (exif_read_data() segfaults on certain corrupted .jpeg files). (Pierre) Upstream bug report: http://bugs.php.net/bug.php?id=48378 Upstream patch: http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c#rev1.173.2.5.2.28 The issue is caused by insufficient validation of values read from the input file. offset_of_ifd is used as index to the array, but its upper bound is not properly checked. This can result in out-of-bounds read and crash of PHP interpreter, or disclose portions of its memory via EXIF header data used in script's output.
Created attachment 348617 [details] Test case from the upstream bug Source: http://bugs.php.net/bug.php?id=48378
This issue affect PHP versions shipped in Red Hat Enterprise Linux 3, 4 and 5, and Red Hat Application Stack v1 and v2. Due to the limited impact of the flaw, there's no plan to release updates addressing only this flaw immediately, fix will be included in the next PHP security updates addressing more severe flaws.
maniadrive-1.2-15.fc11,php-5.2.10-1.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/maniadrive-1.2-15.fc11,php-5.2.10-1.fc11
php-5.2.10-1.fc10,maniadrive-1.2-15.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/php-5.2.10-1.fc10,maniadrive-1.2-15.fc10
Note also that this only seems to affect php on the command-line: # cat test.php <?php echo "about to read "; exif_read_data("hello-s148.jpeg","FILE,COMPUTED,ANY_TAG"); echo "read it"; ?> # php test.php about to read Segmentation fault # tail /var/log/httpd/intranet-error_log -f ... [Thu Aug 27 13:50:13 2009] [error] [client 192.168.250.50] PHP Warning: exif_read_data() [<a href='function.exif-read-data'>function.exif-read-data</a>]: Unable to open /phpsysinfo/test/test.php on line 3 Loading test.php in the web browser shows: about to read read it No segmentation fault is recorded in the logs at all, and the web server continues to run so there is no real impact on security from a denial-of-service perspective unless you are using a CLI application.
This issue has been addressed in following products: Red Hat Web Application Stack for RHEL 5 Via RHSA-2009:1461 https://rhn.redhat.com/errata/RHSA-2009-1461.html
This issue has been addressed in following products: Red Hat Enterprise Linux 5 Red Hat Enterprise Linux 4 Red Hat Enterprise Linux 3 Via RHSA-2010:0040 https://rhn.redhat.com/errata/RHSA-2010-0040.html