Yue Tao 700078d664 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>
2014-10-30 09:00:07 +01:00

32 lines
915 B
Diff

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