summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/php/php-5.6.12/CVE-2015-7803.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/php/php-5.6.12/CVE-2015-7803.patch')
-rw-r--r--meta-oe/recipes-devtools/php/php-5.6.12/CVE-2015-7803.patch85
1 files changed, 0 insertions, 85 deletions
diff --git a/meta-oe/recipes-devtools/php/php-5.6.12/CVE-2015-7803.patch b/meta-oe/recipes-devtools/php/php-5.6.12/CVE-2015-7803.patch
deleted file mode 100644
index 223b9958b..000000000
--- a/meta-oe/recipes-devtools/php/php-5.6.12/CVE-2015-7803.patch
+++ /dev/null
@@ -1,85 +0,0 @@
1From d698f0ae51f67c9cce870b09c59df3d6ba959244 Mon Sep 17 00:00:00 2001
2From: Stanislav Malyshev <stas@php.net>
3Date: Mon, 28 Sep 2015 15:51:59 -0700
4Subject: [PATCH] Fix bug #69720: Null pointer dereference in
5 phar_get_fp_offset()
6
7Upstream-Status: Backport
8
9https://git.php.net/?p=php-src.git;a=patch;h=d698f0ae51f67c9cce870b09c59df3d6ba959244
10
11excluded the binary part of the test
12
13CVE: CVE-2015-7803
14Signed-off-by: Armin Kuster <akuster@mvista.com>
15
16---
17 ext/phar/tests/bug69720.phar | Bin 0 -> 8192 bytes
18 ext/phar/tests/bug69720.phpt | 40 ++++++++++++++++++++++++++++++++++++++++
19 ext/phar/util.c | 6 +++++-
20 3 files changed, 45 insertions(+), 1 deletion(-)
21 create mode 100644 ext/phar/tests/bug69720.phar
22 create mode 100644 ext/phar/tests/bug69720.phpt
23
24Index: php-5.6.12/ext/phar/tests/bug69720.phpt
25===================================================================
26--- /dev/null
27+++ php-5.6.12/ext/phar/tests/bug69720.phpt
28@@ -0,0 +1,40 @@
29+--TEST--
30+Phar - bug #69720 - Null pointer dereference in phar_get_fp_offset()
31+--SKIPIF--
32+<?php if (!extension_loaded("phar")) die("skip"); ?>
33+--FILE--
34+<?php
35+try {
36+ // open an existing phar
37+ $p = new Phar(__DIR__."/bug69720.phar",0);
38+ // Phar extends SPL's DirectoryIterator class
39+ echo $p->getMetadata();
40+ foreach (new RecursiveIteratorIterator($p) as $file) {
41+ // $file is a PharFileInfo class, and inherits from SplFileInfo
42+ $temp="";
43+ $temp= $file->getFileName() . "\n";
44+ $temp.=file_get_contents($file->getPathName()) . "\n"; // display contents
45+ var_dump($file->getMetadata());
46+ }
47+}
48+ catch (Exception $e) {
49+ echo 'Could not open Phar: ', $e;
50+}
51+?>
52+--EXPECTF--
53+
54+MY_METADATA_NULL
55+
56+Warning: file_get_contents(phar:///%s): failed to open stream: phar error: "test.php" is not a file in phar "%s.phar" in %s.php on line %d
57+array(1) {
58+ ["whatever"]=>
59+ int(123)
60+}
61+object(DateTime)#2 (3) {
62+ ["date"]=>
63+ string(26) "2000-01-01 00:00:00.000000"
64+ ["timezone_type"]=>
65+ int(3)
66+ ["timezone"]=>
67+ string(3) "UTC"
68+}
69Index: php-5.6.12/ext/phar/util.c
70===================================================================
71--- php-5.6.12.orig/ext/phar/util.c
72+++ php-5.6.12/ext/phar/util.c
73@@ -494,7 +494,11 @@ really_get_entry:
74 (*ret)->is_tar = entry->is_tar;
75 (*ret)->fp = phar_get_efp(entry, 1 TSRMLS_CC);
76 if (entry->link) {
77- (*ret)->zero = phar_get_fp_offset(phar_get_link_source(entry TSRMLS_CC) TSRMLS_CC);
78+ phar_entry_info *link = phar_get_link_source(entry TSRMLS_CC);
79+ if(!link) {
80+ return FAILURE;
81+ }
82+ (*ret)->zero = phar_get_fp_offset(link TSRMLS_CC);
83 } else {
84 (*ret)->zero = phar_get_fp_offset(entry TSRMLS_CC);
85 }