Compare commits

...
4 Commits
Author SHA1 Message Date
Christoph M. Becker 2b5ec153e4 Prepare for 7.3.21 2020-08-04 09:10:53 +02:00
Christoph M. Becker 09171dc1d7 Fix #79877: getimagesize function silently truncates after a null byte
We have to check for NUL bytes if `getimagesize()` has been called.

(cherry picked from commit ff577b04c0)
2020-08-03 11:04:57 +02:00
Christoph M. Becker f57a999379 Fix #79797: Use of freed hash key in the phar_parse_zipfile function
We must not use heap memory after we freed it.

(cherry picked from commit 7355ab8176)
2020-08-03 11:04:01 +02:00
Christoph M. Becker 82949e5076 Bump version to 7.3.21RC1 2020-07-21 09:13:03 +02:00
9 changed files with 41 additions and 7 deletions

No files matched your search

+8 -2
View File
@@ -1,12 +1,14 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 7.3.21
06 Aug 2020, PHP 7.3.21
- Apache:
. Fixed bug #79030 (Upgrade apache2handler's php_apache_sapi_get_request_time
to return usec). (Herbert256)
- Core:
. Fixed bug #79877 (getimagesize function silently truncates after a null
byte) (cmb)
. Fixed bug #79778 (Assertion failure if dumping closure with unresolved
static variable). (Nikita)
. Fixed bug #79792 (HT iterators not removed if empty array is destroyed).
@@ -30,13 +32,17 @@ PHP NEWS
- Mbstring:
. Fixed bug #79787 (mb_strimwidth does not trim string). (XXiang)
- Phar:
. Fixed bug #79797 (Use of freed hash key in the phar_parse_zipfile
function). (CVE-2020-7068) (cmb)
- Standard:
. Fixed bug #70362 (Can't copy() large 'data://' with open_basedir). (cmb)
. Fixed bug #79817 (str_replace() does not handle INDIRECT elements). (Nikita)
. Fixed bug #78008 (dns_check_record() always return true on Alpine).
(Andy Postnikov)
?? ??? ????, PHP 7.3.20
09 Jul 2020, PHP 7.3.20
- Core:
. Fixed bug #79650 (php-win.exe 100% cpu lockup). (cmb)
+1 -1
View File
@@ -20,7 +20,7 @@
#ifndef ZEND_H
#define ZEND_H
#define ZEND_VERSION "3.3.21-dev"
#define ZEND_VERSION "3.3.21"
#define ZEND_ENGINE_3
+1 -1
View File
@@ -108,7 +108,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=7
PHP_MINOR_VERSION=3
PHP_RELEASE_VERSION=21
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`
Binary file not shown.
+14
View File
@@ -0,0 +1,14 @@
--TEST--
Bug #79797 (Use of freed hash key in the phar_parse_zipfile function)
--SKIPIF--
<?php
if (!extension_loaded('phar')) die('skip phar extension not available');
?>
--INI--
phar.cache_list={PWD}/bug79797.phar
--FILE--
<?php
echo "done\n";
?>
--EXPECT--
done
+1 -1
View File
@@ -705,7 +705,7 @@ foundit:
efree(actual_alias);
}
zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), actual_alias, mydata->alias_len, mydata);
zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), mydata->alias, mydata->alias_len, mydata);
} else {
phar_archive_data *fd_ptr;
+5
View File
@@ -1496,6 +1496,11 @@ static void php_getimagesize_from_any(INTERNAL_FUNCTION_PARAMETERS, int mode) {
Z_PARAM_ZVAL_DEREF(info)
ZEND_PARSE_PARAMETERS_END();
if (mode == FROM_PATH && CHECK_NULL_PATH(input, input_len)) {
php_error_docref(NULL, E_WARNING, "Invalid path");
return;
}
if (argc == 2) {
zval_ptr_dtor(info);
array_init(info);
+9
View File
@@ -0,0 +1,9 @@
--TEST--
Bug #79877 (getimagesize function silently truncates after a null byte)
--FILE--
<?php
var_dump(getimagesize("/tmp/a.png\0xx"));
?>
--EXPECTF--
Warning: getimagesize(): Invalid path in %s on line %d
NULL
+2 -2
View File
@@ -3,6 +3,6 @@
#define PHP_MAJOR_VERSION 7
#define PHP_MINOR_VERSION 3
#define PHP_RELEASE_VERSION 21
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "7.3.21-dev"
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "7.3.21"
#define PHP_VERSION_ID 70321