Compare commits

...
Author SHA1 Message Date
Ferenc Kovacs b1ffeb3a7f 5.6.5 2015-01-21 01:40:37 +01:00
Stanislav Malyshev 896b34177e add protection against nulls 2015-01-21 01:34:30 +01:00
Ferenc Kovacs 81b4ce3ea3 fix NEWS 2015-01-21 01:25:50 +01:00
Stanislav Malyshev 21bc7464f4 Fix bug #68799: Free called on unitialized pointer 2015-01-21 01:25:49 +01:00
Stanislav Malyshev f4f068000b Fix for bug #68710 (Use After Free Vulnerability in PHP's unserialize())
Conflicts:
	ext/standard/var_unserializer.c
2015-01-21 00:54:10 +01:00
Ferenc Kovacs 569b85d9a2 add missing date to NEWS 2015-01-06 23:01:03 +01:00
Ferenc Kovacs 02950dc616 bump version to 5.6.5RC1 2015-01-06 22:49:03 +01:00
10 changed files with 113 additions and 9 deletions

No files matched your search

+14 -3
View File
@@ -1,6 +1,6 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2015, PHP 5.6.5
22 Jan 2015, PHP 5.6.5
- Core:
. Upgraded crypt_blowfish to version 1.3. (Leigh)
@@ -18,12 +18,15 @@
. Fixed bug #65576 (Constructor from trait conflicts with inherited
constructor). (dunglas at gmail dot com)
. Fixed bug #68676 (Explicit Double Free). (Kalle)
. Fixed bug #68710 (Use After Free Vulnerability in PHP's unserialize()).
(CVE-2015-0231) (Stefan Esser)
- CGI:
. Fix bug #68618 (out of bounds read crashes php-cgi). (Stas)
. Fixed bug #68618 (out of bounds read crashes php-cgi). (CVE-2014-9427)
(Stas)
- CLI server:
. Fix bug #68745 (Invalid HTTP requests make web server segfault). (Adam)
. Fixed bug #68745 (Invalid HTTP requests make web server segfault). (Adam)
- cURL:
. Fixed bug #67643 (curl_multi_getcontent returns '' when
@@ -33,6 +36,10 @@
. Implemented FR #68268 (DatePeriod: Getter for start date, end date and
interval). (Marc Bennewitz)
- EXIF:
. Fixed bug #68799: Free called on unitialized pointer. (CVE-2015-0232)
(Stas)
- Fileinfo:
. Fixed bug #68398 (msooxml matches too many archives). (Anatol)
. Fixed bug #68665 (invalid free in libmagic). (Joshua Rogers, Anatol Belski)
@@ -75,6 +82,10 @@
- pgsql:
. Fixed bug #68697 (lo_export return -1 on failure). (Ondřej Surý)
- PDO:
. Fixed bug #68371 (PDO#getAttribute() cannot be called with platform-specifi
attribute names). (Matteo)
- PDO_mysql:
. Fixed bug #68424 (Add new PDO mysql connection attr to control multi
statements option). (peter dot wolanin at acquia dot com)
+1 -1
View File
@@ -120,7 +120,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=6
PHP_RELEASE_VERSION=5
PHP_EXTRA_VERSION="-dev"
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
+1 -1
View File
@@ -2692,7 +2692,7 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP
static int exif_process_unicode(image_info_type *ImageInfo, xp_field_type *xp_field, int tag, char *szValuePtr, int ByteCount TSRMLS_DC)
{
xp_field->tag = tag;
xp_field->value = NULL;
/* XXX this will fail again if encoding_converter returns on error something different than SIZE_MAX */
if (zend_multibyte_encoding_converter(
(unsigned char**)&xp_field->value,
Binary file not shown.

After

Width:  |  Height:  |  Size: 735 B

+63
View File
@@ -0,0 +1,63 @@
--TEST--
Bug #68799 (Free called on unitialized pointer)
--SKIPIF--
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
--FILE--
<?php
/*
* Pollute the heap. Helps trigger bug. Sometimes not needed.
*/
class A {
function __construct() {
$a = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa';
$this->a = $a . $a . $a . $a . $a . $a;
}
};
function doStuff ($limit) {
$a = new A;
$b = array();
for ($i = 0; $i < $limit; $i++) {
$b[$i] = clone $a;
}
unset($a);
gc_collect_cycles();
}
$iterations = 3;
doStuff($iterations);
doStuff($iterations);
gc_collect_cycles();
print_r(exif_read_data(__DIR__.'/bug68799.jpg'));
?>
--EXPECTF--
Array
(
[FileName] => bug68799.jpg
[FileDateTime] => %d
[FileSize] => 735
[FileType] => 2
[MimeType] => image/jpeg
[SectionsFound] => ANY_TAG, IFD0, WINXP
[COMPUTED] => Array
(
[html] => width="1" height="1"
[Height] => 1
[Width] => 1
[IsColor] => 1
[ByteOrderMotorola] => 1
)
[XResolution] => 96/1
[YResolution] => 96/1
[ResolutionUnit] => 2
[Author] =>
)
+25
View File
@@ -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===
+1 -1
View File
@@ -342,7 +342,7 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long
} 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,
+1 -1
View File
@@ -346,7 +346,7 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long
} 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,
+2 -2
View File
@@ -3,6 +3,6 @@
#define PHP_MAJOR_VERSION 5
#define PHP_MINOR_VERSION 6
#define PHP_RELEASE_VERSION 5
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "5.6.5-dev"
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "5.6.5"
#define PHP_VERSION_ID 50605
+5
View File
@@ -813,6 +813,11 @@ PHPAPI int vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap
{
smart_str xbuf = {0};
/* since there are places where (v)spprintf called without checking for null,
a bit of defensive coding here */
if(!pbuf) {
return 0;
}
xbuf_format_converter(&xbuf, format, ap);
if (max_len && xbuf.len > max_len) {