modphp: Security Advisory - php - CVE-2014-3587

Integer overflow in the cdf_read_property_info function in cdf.c in file
through 5.19, as used in the Fileinfo component in PHP before 5.4.32 and
5.5.x before 5.5.16, allows remote attackers to cause a denial of
service (application crash) via a crafted CDF file. NOTE: this
vulnerability exists because of an incomplete fix for CVE-2012-1571.

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-3587

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Yue Tao
2014-10-23 16:29:14 +08:00
committed by Martin Jansa
parent 81aecee0ed
commit 700078d664
2 changed files with 32 additions and 0 deletions
@@ -0,0 +1,31 @@
modphp: Security Advisory - php - CVE-2014-3587
Upstream-Status: Backport
Signed-off-by: Yue Tao <yue.tao@windriver.com>
From 7ba1409a1aee5925180de546057ddd84ff267947 Mon Sep 17 00:00:00 2001
From: Remi Collet <rcollet@redhat.com>
Date: Thu, 14 Aug 2014 17:19:03 -0700
Subject: [PATCH] Fix bug #67716 - Segfault in cdf.c
---
ext/fileinfo/libmagic/cdf.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/ext/fileinfo/libmagic/cdf.c b/ext/fileinfo/libmagic/cdf.c
index 429f3b9..2c0a2d9 100644
--- a/ext/fileinfo/libmagic/cdf.c
+++ b/ext/fileinfo/libmagic/cdf.c
@@ -820,7 +820,7 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
q = (const uint8_t *)(const void *)
((const char *)(const void *)p + ofs
- 2 * sizeof(uint32_t));
- if (q > e) {
+ if (q < p || q > e) {
DPRINTF(("Ran of the end %p > %p\n", q, e));
goto out;
}
--
1.7.9.5
@@ -10,6 +10,7 @@ SRC_URI = "http://www.php.net/distributions/php-${PV}.tar.bz2 \
file://70_mod_php5.conf \
file://0001-using-pkgconfig-to-check-libxml.patch \
file://php-CVE-2014-5120.patch \
file://php-CVE-2014-3587.patch \
"
S = "${WORKDIR}/php-${PV}"