Date: Thu, 5 Mar 2015 22:33:55 +0000 (UTC) From: Florian Smeets <flo@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r380560 - in branches/2015Q1/lang/php53: . files Message-ID: <201503052233.t25MXtMl020285@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: flo Date: Thu Mar 5 22:33:54 2015 New Revision: 380560 URL: https://svnweb.freebsd.org/changeset/ports/380560 QAT: https://qat.redports.org/buildarchive/r380560/ Log: MFH: r379853 Add patches for - CVE-2014-8142 - CVE-2015-0231 Approved by: portmgr (erwin) Added: branches/2015Q1/lang/php53/files/patch-CVE-2014-8142.patch - copied unchanged from r379853, head/lang/php53/files/patch-CVE-2014-8142.patch branches/2015Q1/lang/php53/files/patch-CVE-2015-0231.patch - copied unchanged from r379853, head/lang/php53/files/patch-CVE-2015-0231.patch Modified: branches/2015Q1/lang/php53/Makefile Directory Properties: branches/2015Q1/ (props changed) Modified: branches/2015Q1/lang/php53/Makefile ============================================================================== --- branches/2015Q1/lang/php53/Makefile Thu Mar 5 22:31:43 2015 (r380559) +++ branches/2015Q1/lang/php53/Makefile Thu Mar 5 22:33:54 2015 (r380560) @@ -3,7 +3,7 @@ PORTNAME= php53 PORTVERSION= 5.3.29 -PORTREVISION?= 3 +PORTREVISION?= 4 CATEGORIES?= lang devel www MASTER_SITES= ${MASTER_SITE_PHP} MASTER_SITE_SUBDIR= distributions Copied: branches/2015Q1/lang/php53/files/patch-CVE-2014-8142.patch (from r379853, head/lang/php53/files/patch-CVE-2014-8142.patch) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2015Q1/lang/php53/files/patch-CVE-2014-8142.patch Thu Mar 5 22:33:54 2015 (r380560, copy of r379853, head/lang/php53/files/patch-CVE-2014-8142.patch) @@ -0,0 +1,56 @@ +Index: ext/standard/tests/serialize/bug68594.phpt +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ ext/standard/tests/serialize/bug68594.phpt 2015-02-13 11:27:34.753347966 -0500 +@@ -0,0 +1,23 @@ ++--TEST-- ++Bug #68545 Use after free vulnerability in unserialize() ++--FILE-- ++<?php ++for ($i=4; $i<100; $i++) { ++ $m = new StdClass(); ++ ++ $u = array(1); ++ ++ $m->aaa = array(1,2,&$u,4,5); ++ $m->bbb = 1; ++ $m->ccc = &$u; ++ $m->ddd = str_repeat("A", $i); ++ ++ $z = serialize($m); ++ $z = str_replace("bbb", "aaa", $z); ++ $y = unserialize($z); ++ $z = serialize($y); ++} ++?> ++===DONE=== ++--EXPECTF-- ++===DONE=== +Index: ext/standard/var_unserializer.c +=================================================================== +--- ext/standard/var_unserializer.c 2015-02-13 11:27:34.793348294 -0500 ++++ ext/standard/var_unserializer.c 2015-02-13 11:27:34.753347966 -0500 +@@ -298,6 +298,9 @@ + } else { + /* object properties should include no integers */ + convert_to_string(key); ++ if (zend_symtable_find(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) { ++ var_push_dtor(var_hash, old_data); ++ } + zend_hash_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data, + sizeof data, NULL); + } +Index: ext/standard/var_unserializer.re +=================================================================== +--- ext/standard/var_unserializer.re 2015-02-13 11:27:34.793348294 -0500 ++++ ext/standard/var_unserializer.re 2015-02-13 11:27:34.753347966 -0500 +@@ -304,6 +304,9 @@ + } else { + /* object properties should include no integers */ + convert_to_string(key); ++ if (zend_symtable_find(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) { ++ var_push_dtor(var_hash, old_data); ++ } + zend_hash_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data, + sizeof data, NULL); + } Copied: branches/2015Q1/lang/php53/files/patch-CVE-2015-0231.patch (from r379853, head/lang/php53/files/patch-CVE-2015-0231.patch) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2015Q1/lang/php53/files/patch-CVE-2015-0231.patch Thu Mar 5 22:33:54 2015 (r380560, copy of r379853, head/lang/php53/files/patch-CVE-2015-0231.patch) @@ -0,0 +1,56 @@ +Index: ext/standard/tests/strings/bug68710.phpt +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ ext/standard/tests/strings/bug68710.phpt 2015-02-13 11:36:32.969760122 -0500 +@@ -0,0 +1,25 @@ ++--TEST-- ++Bug #68710 Use after free vulnerability in unserialize() (bypassing the ++CVE-2014-8142 fix) ++--FILE-- ++<?php ++for ($i=4; $i<100; $i++) { ++ $m = new StdClass(); ++ ++ $u = array(1); ++ ++ $m->aaa = array(1,2,&$u,4,5); ++ $m->bbb = 1; ++ $m->ccc = &$u; ++ $m->ddd = str_repeat("A", $i); ++ ++ $z = serialize($m); ++ $z = str_replace("aaa", "123", $z); ++ $z = str_replace("bbb", "123", $z); ++ $y = unserialize($z); ++ $z = serialize($y); ++} ++?> ++===DONE=== ++--EXPECTF-- ++===DONE=== +Index: ext/standard/var_unserializer.c +=================================================================== +--- ext/standard/var_unserializer.c 2015-02-13 11:36:33.009760449 -0500 ++++ ext/standard/var_unserializer.c 2015-02-13 11:36:32.969760122 -0500 +@@ -298,7 +298,7 @@ + } else { + /* object properties should include no integers */ + convert_to_string(key); +- if (zend_symtable_find(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) { ++ if (zend_hash_find(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) { + var_push_dtor(var_hash, old_data); + } + zend_hash_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data, +Index: ext/standard/var_unserializer.re +=================================================================== +--- ext/standard/var_unserializer.re 2015-02-13 11:36:33.009760449 -0500 ++++ ext/standard/var_unserializer.re 2015-02-13 11:36:32.969760122 -0500 +@@ -304,7 +304,7 @@ + } else { + /* object properties should include no integers */ + convert_to_string(key); +- if (zend_symtable_find(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) { ++ if (zend_hash_find(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) { + var_push_dtor(var_hash, old_data); + } + zend_hash_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503052233.t25MXtMl020285>