CVE-2014-3597: Buffer Overflow
During the testing of the patch to fix CVE-2014-4049 (bug 1108447) in PHP, other possible buffer overflows were discovered [1] that led to a segfault in dnsgetrecord():
- code rely on dlen (from server response) without overflow check - code call dnexpand without sending real "end" of answer
It has been corrected upstream [2] and a reproducer to test is available [3]. This will be fixed in upstream 5.4.32 (currently unreleased).
[1] https://bugs.php.net/bug.php?id=67717 [2] https://github.com/php/php-src/commit/2fefae47716d501aec41c1102f3fd4531f070b05 [3] https://bugs.php.net/patch-display.php?bug=67717&patch=repro.patch&revision=1406726280
Other sources
Multiple buffer overflows in the phpparserr function in ext/standard/dns.c in PHP before 5.4.32 and 5.5.x before 5.5.16 allow remote DNS servers to cause a denial of service (application crash) or possibly execute arbitrary code via a crafted DNS record, related to the dnsgetrecord function and the dnexpand function. NOTE: this issue exists because of an incomplete fix for CVE-2014-4049.
— 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.5.16 - Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 5.4.32 - Upgrade
Upgrade
debian/php5to a version that resolves this vulnerability.Fixed in 5.3.3-7+squeeze22Fixed in 5.4.4-14+deb7u13Fixed in 5.6.0+dfsg-1 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 5.4.32 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 5.5.16
Event History
Frequently Asked Questions
What is the severity of CVE-2014-3597?
CVE-2014-3597 has a severity rating that suggests it allows remote attackers to cause a denial of service or potentially execute arbitrary code.
How do I fix CVE-2014-3597?
To fix CVE-2014-3597, upgrade to PHP version 5.4.32 or later, or 5.5.16 or later.
Which PHP versions are affected by CVE-2014-3597?
CVE-2014-3597 affects PHP versions prior to 5.4.32 and 5.5.x before 5.5.16.
What vulnerability type is CVE-2014-3597 classified as?
CVE-2014-3597 is classified as a buffer overflow vulnerability.
What could happen if CVE-2014-3597 is exploited?
If CVE-2014-3597 is exploited, it could lead to application crashes or allow attackers to execute arbitrary code.