exif_read_data() causes segfault on a certain image
| Bug #44388 | exif_read_data() causes segfault on a certain image | ||||
|---|---|---|---|---|---|
| Submitted: | 2008-03-10 06:03 UTC | Modified: | 2008-03-12 17:33 UTC | ||
| From: | jon at tgpsolutions dot com | Assigned: | |||
| Status: | Closed | Package: | Reproducible crash | ||
| PHP Version: | 5.2.5 | OS: | Linux | ||
| Private report: | No | CVE-ID: | None | ||
[2008-03-10 06:03 UTC] jon at tgpsolutions dot com
Description: ------------ PHP segfaults trying to read the EXIF data for this image: http://jon.tgpsolutions.com/exif_read_data-bug.jpg I hit this bug initially on PHP 5.2.1 (the version in Ubuntu 7.04), was able to reproduce on PHP 5.2.3-1ubuntu6.3 (the version in Ubuntu 7.10), and was able to reproduce again on PHP 5.2.5 compiled from source. #43630 looks similar to this bug, but it was closed as Bogus with the explaination "This simply tells you that your EXIF information is broken" - maybe the submitter wasn't clear that PHP segfaults after displaying the warnings? The sample image isn't available anymore, so I can't be sure if PHP segfaults or not in their case. Reproduce code: --------------- test.php: <?php $exif = exif_read_data('exif_read_data-bug.jpg'); ?> Expected result: ---------------- $exif contains EXIF data for the image. Actual result: -------------- jon@interceptor:~$ php test.php PHP Warning: exif_read_data(exif_read_data-bug.jpg): Process tag(xA92D=UndefinedTa): Illegal format code 0x4320, suppose BYTE in /home/jon/test.php on line 1 PHP Warning: exif_read_data(exif_read_data-bug.jpg): Process tag(xA92D=UndefinedTa): Illegal pointer offset(x74686769 + x7279706F = xE6E1D7D8 > x5FE9) in /home/jon/test.php on line 1 PHP Warning: exif_read_data(exif_read_data-bug.jpg): Process tag(x3220=UndefinedTa): Illegal format code 0x3030, suppose BYTE in /home/jon/test.php on line 1 PHP Warning: exif_read_data(exif_read_data-bug.jpg): Process tag(x3220=UndefinedTa): Illegal pointer offset(x43206565 < x406D2B12) in /home/jon/test.php on line 1 PHP Warning: exif_read_data(exif_read_data-bug.jpg): Process tag(x6168=UndefinedTa): Illegal format code 0x206E, suppose BYTE in /home/jon/test.php on line 1 PHP Warning: exif_read_data(exif_read_data-bug.jpg): Process tag(x6168=UndefinedTa): Illegal pointer offset(x72694672 < x406D2B1E) in /home/jon/test.php on line 1 PHP Warning: exif_read_data(exif_read_data-bug.jpg): Process tag(x2065=UndefinedTa): Illegal format code 0x6D49, suppose BYTE in /home/jon/test.php on line 1 PHP Warning: exif_read_data(exif_read_data-bug.jpg): Process tag(x2065=UndefinedTa): Illegal pointer offset(xE1FF2967 + x6E696761 = x506890C8 > x5FE9) in /home/jon/test.php on line 1 PHP Warning: exif_read_data(exif_read_data-bug.jpg): Process tag(xF15F=UndefinedTa): Illegal format code 0x7845, suppose BYTE in /home/jon/test.php on line 1 PHP Warning: exif_read_data(exif_read_data-bug.jpg): Process tag(xF15F=UndefinedTa): Illegal pointer offset(x2A4949 + x6669 = x2AAFB2 > x5FE9) in /home/jon/test.php on line 1 PHP Warning: exif_read_data(exif_read_data-bug.jpg): Process tag(x4C69=UndefinedTa): Illegal format code 0x0000, suppose BYTE in /home/jon/test.php on line 1 PHP Warning: exif_read_data(exif_read_data-bug.jpg): Process tag(x0000=UndefinedTa): Illegal format code 0x0000, suppose BYTE in /home/jon/test.php on line 1 ... above line repeated many more times... PHP Warning: exif_read_data(exif_read_data-bug.jpg): Process tag(x0000=UndefinedTa): Illegal format code 0x0000, suppose BYTE in /home/jon/test.php on line 1 PHP Warning: exif_read_data(exif_read_data-bug.jpg): Process tag(x0000=UndefinedTa): Illegal format code 0x0000, suppose BYTE in /home/jon/test.php on line 1 Segmentation fault jon@interceptor:~$
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2008-03-10 09:44 UTC] scottmac@php.net
[2008-03-12 17:33 UTC] iliaa@php.net