CVE-2014-0238: Buffer Overflow
A flaw was found in the way file parsed property information from Composite Document Files (CDF) files. A property entry with 0 elements triggers an infinite loop.
The problem is in cdfreadpropertyinfo() function in src/cdf.c: https://github.com/file/file/blob/FILE518/src/cdf.c#L742
A for loop with counter i is used to loop through properties. Inside it, nelements value is read from the input file. For string type properties, there is additional nested for loop with counter j, which also increments counter i of the outer for loop. https://github.com/file/file/blob/FILE518/src/cdf.c#L890
In cdf.c:
801 for (i = 0; i < sh.shproperties; i++) { .. 814 if (inp[i].pitype & CDFVECTOR) { 815 nelements = CDFGETUINT32(q, 1); .. 873 case CDFLENGTH32STRING: 874 case CDFLENGTH32WSTRING: .. 890 for (j = 0; j < nelements; j++, i++) { .. 905 } 906 i--;
Other sources
The cdfreadpropertyinfo function in cdf.c in the Fileinfo component in PHP before 5.4.29 and 5.5.x before 5.5.13 allows remote attackers to cause a denial of service (infinite loop or out-of-bounds memory access) via a vector that (1) has zero length or (2) is too long.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 5.4.29 - Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 5.5.13 - Upgrade
Upgrade
debian/fileto a version that resolves this vulnerability.Fixed in 5.04-5+squeeze6Fixed in 5.11-2+deb7u4Fixed in 1:5.19-1 - Upgrade
Upgrade
debian/php5to a version that resolves this vulnerability.Fixed in 5.3.3-7+squeeze24Fixed in 5.4.4-14+deb7u10Fixed in 5.6.0~beta4+dfsg-1
Event History
Frequently Asked Questions
What is the severity of CVE-2014-0238?
CVE-2014-0238 has a moderate severity level due to its potential to cause denial of service.
How do I fix CVE-2014-0238?
To fix CVE-2014-0238, upgrade to PHP version 5.4.29 or later, or version 5.5.13 or later.
What systems are affected by CVE-2014-0238?
CVE-2014-0238 affects PHP versions prior to 5.4.29, versions in the 5.5.x series prior to 5.5.13, and certain Debian Linux releases.
What type of vulnerability is CVE-2014-0238?
CVE-2014-0238 is a vulnerability that can lead to denial of service through infinite loops or out-of-bounds memory access.
Who can exploit CVE-2014-0238?
Remote attackers can exploit CVE-2014-0238 by sending specially crafted input to trigger the vulnerability.