CVE-2011-0708: Input Validation
An insufficient input validation flaws was discovered in the PHP's Exif extension that allows extracting Exif data from image files: http://thread.gmane.org/gmane.comp.security.oss.general/4198
An integer overflow causes PHP to not validate offsets read from the file properly, causing it to read behind the end of the buffer. This leads to PHP interpreter crash when reading specially crafted Exif data.
Before the code over-reading the buffer is reached, PHP needs to allocate a large amount of memory (based on the components / length value read from the file). This attempt triggers the integer overflow check in safeemalloc on 32bit platforms and requires the memorylimit for the script to be set to -1 (i.e. no limit is enforced by PHP) on 64bit platforms.
Upstream commits, which include reproducers: http://svn.php.net/viewvc?view=revision&revision=308316 http://svn.php.net/viewvc?view=revision&revision=308317
The follow-up commit replaces the use of hard-coded numeric constant with INT32MAX: http://svn.php.net/viewvc?view=revision&revision=308362
This fix should first appear in upstream version 5.3.6.
Other sources
exif.c in the Exif extension in PHP before 5.3.6 on 64-bit platforms performs an incorrect cast, which allows remote attackers to cause a denial of service (application crash) via an image with a crafted Image File Directory (IFD) that triggers a buffer over-read.
— MITRE
Affected Software
Remediation
Patch Available
Patch Available
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2011-0708?
CVE-2011-0708 is classified as a medium severity vulnerability that stems from insufficient input validation in the PHP Exif extension.
How do I fix CVE-2011-0708?
To mitigate CVE-2011-0708, users should upgrade their PHP installation to a version that has resolved this vulnerability.
What versions of PHP are affected by CVE-2011-0708?
CVE-2011-0708 affects multiple PHP versions including 3.0, 4.0 to 4.4.9, and 5.0 to 5.3.5.
Is CVE-2011-0708 an aggregate of vulnerabilities?
No, CVE-2011-0708 is specifically tied to an integer overflow vulnerability within the Exif extension of PHP.
Can CVE-2011-0708 lead to other security issues?
Yes, the exploitation of CVE-2011-0708 can potentially lead to user-controlled buffer overflows and arbitrary code execution.