mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-22 16:35:43 +00:00
Compare commits
7
Commits
php-7.3.14
...
php-7.2.27
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40c86aa3af | ||
|
|
525e494fe5 | ||
|
|
5765d9844f | ||
|
|
5c90f8eb66 | ||
|
|
2bcbc95f03 | ||
|
|
0f79b1bf30 | ||
|
|
f79c774274 |
No files matched your search
@@ -1,7 +1,16 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2019, PHP 7.2.27
|
||||
23 Jan 2020, PHP 7.2.27
|
||||
|
||||
- Mbstring:
|
||||
. Fixed bug #79037 (global buffer-overflow in `mbfl_filt_conv_big5_wchar`).
|
||||
(CVE-2020-7060) (Nikita)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #79091 (heap use-after-free in session_create_id()). (cmb, Nikita)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #79099 (OOB read in php_strip_tags_ex). (CVE-2020-7059). (cmb)
|
||||
|
||||
18 Dec 2019, PHP 7.2.26
|
||||
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=2
|
||||
PHP_RELEASE_VERSION=27
|
||||
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`
|
||||
|
||||
|
||||
@@ -138,6 +138,17 @@ static unsigned short cp950_pua_tbl[][4] = {
|
||||
{0xf70f,0xf848,0xc740,0xc8fe},
|
||||
};
|
||||
|
||||
static inline int is_in_cp950_pua(int c1, int c) {
|
||||
if ((c1 >= 0xfa && c1 <= 0xfe) || (c1 >= 0x8e && c1 <= 0xa0) ||
|
||||
(c1 >= 0x81 && c1 <= 0x8d) || (c1 >= 0xc7 && c1 <= 0xc8)) {
|
||||
return (c >=0x40 && c <= 0x7e) || (c >= 0xa1 && c <= 0xfe);
|
||||
}
|
||||
if (c1 == 0xc6) {
|
||||
return c >= 0xa1 && c <= 0xfe;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Big5 => wchar
|
||||
*/
|
||||
@@ -186,11 +197,7 @@ mbfl_filt_conv_big5_wchar(int c, mbfl_convert_filter *filter)
|
||||
|
||||
if (filter->from->no_encoding == mbfl_no_encoding_cp950) {
|
||||
/* PUA for CP950 */
|
||||
if (w <= 0 &&
|
||||
(((c1 >= 0xfa && c1 <= 0xfe) || (c1 >= 0x8e && c1 <= 0xa0) ||
|
||||
(c1 >= 0x81 && c1 <= 0x8d) ||(c1 >= 0xc7 && c1 <= 0xc8))
|
||||
&& ((c > 0x39 && c < 0x7f) || (c > 0xa0 && c < 0xff))) ||
|
||||
((c1 == 0xc6) && (c > 0xa0 && c < 0xff))) {
|
||||
if (w <= 0 && is_in_cp950_pua(c1, c)) {
|
||||
c2 = c1 << 8 | c;
|
||||
for (k = 0; k < sizeof(cp950_pua_tbl)/(sizeof(unsigned short)*4); k++) {
|
||||
if (c2 >= cp950_pua_tbl[k][2] && c2 <= cp950_pua_tbl[k][3]) {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
Bug #79037: global buffer-overflow in `mbfl_filt_conv_big5_wchar`
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(mb_convert_encoding("\x81\x3a", "UTF-8", "CP950"));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(1) "?"
|
||||
@@ -2198,6 +2198,7 @@ static PHP_FUNCTION(session_create_id)
|
||||
/* Detect collision and retry */
|
||||
if (PS(mod)->s_validate_sid(&PS(mod_data), new_id) == FAILURE) {
|
||||
zend_string_release(new_id);
|
||||
new_id = NULL;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
--TEST--
|
||||
Bug #79091 (heap use-after-free in session_create_id())
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('session')) die('skip session extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
class MySessionHandler implements SessionHandlerInterface, SessionIdInterface, SessionUpdateTimestampHandlerInterface
|
||||
{
|
||||
public function close()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function destroy($session_id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function gc($maxlifetime)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function open($save_path, $session_name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function read($session_id)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function write($session_id, $session_data)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function create_sid()
|
||||
{
|
||||
return uniqid();
|
||||
}
|
||||
|
||||
public function updateTimestamp($key, $val)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function validateId($key)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ob_start();
|
||||
var_dump(session_set_save_handler(new MySessionHandler()));
|
||||
var_dump(session_start());
|
||||
ob_flush();
|
||||
session_create_id();
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
Warning: session_create_id(): Failed to create new ID in %s on line %d
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
/*
|
||||
DO NOT EDIT THIS FILE!
|
||||
|
||||
it has been automaticaly created by php7/scripts/credits from
|
||||
it has been automaticaly created by php7/scripts/credits from
|
||||
the information found in the various php7/ext/.../CREDITS and
|
||||
php7/sapi/.../CREDITS files
|
||||
|
||||
if you want to change an entry you have to edit the appropriate
|
||||
php7/sapi/.../CREDITS files
|
||||
|
||||
if you want to change an entry you have to edit the appropriate
|
||||
CREDITS file instead
|
||||
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ CREDIT_LINE("FTP", "Stefan Esser, Andrew Skalski");
|
||||
CREDIT_LINE("GD imaging", "Rasmus Lerdorf, Stig Bakken, Jim Winstead, Jouni Ahto, Ilia Alshanetsky, Pierre-Alain Joye, Marcus Boerger");
|
||||
CREDIT_LINE("GetText", "Alex Plotnick");
|
||||
CREDIT_LINE("GNU GMP support", "Stanislav Malyshev");
|
||||
CREDIT_LINE("Iconv", "Rui Hirokawa, Stig Bakken, Moriyoshi Koizumi ");
|
||||
CREDIT_LINE("Iconv", "Rui Hirokawa, Stig Bakken, Moriyoshi Koizumi");
|
||||
CREDIT_LINE("IMAP", "Rex Logan, Mark Musone, Brian Wang, Kaj-Michael Lang, Antoni Pamies Olive, Rasmus Lerdorf, Andrew Skalski, Chuck Hagenbuch, Daniel R Kalowsky");
|
||||
CREDIT_LINE("Input Filter", "Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye, Ilia Alshanetsky");
|
||||
CREDIT_LINE("InterBase", "Jouni Ahto, Andrew Avdeev, Ard Biesheuvel");
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
/*
|
||||
DO NOT EDIT THIS FILE!
|
||||
|
||||
it has been automaticaly created by php7/scripts/credits from
|
||||
it has been automaticaly created by php7/scripts/credits from
|
||||
the information found in the various php7/ext/.../CREDITS and
|
||||
php7/sapi/.../CREDITS files
|
||||
|
||||
if you want to change an entry you have to edit the appropriate
|
||||
php7/sapi/.../CREDITS files
|
||||
|
||||
if you want to change an entry you have to edit the appropriate
|
||||
CREDITS file instead
|
||||
|
||||
*/
|
||||
|
||||
@@ -4866,7 +4866,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, uint8_t *stateptr, const
|
||||
if (state == 4) {
|
||||
/* Inside <!-- comment --> */
|
||||
break;
|
||||
} else if (state == 2 && *(p-1) != '\\') {
|
||||
} else if (state == 2 && p >= buf + 1 && *(p-1) != '\\') {
|
||||
if (lc == c) {
|
||||
lc = '\0';
|
||||
} else if (lc != '\\') {
|
||||
@@ -4893,7 +4893,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, uint8_t *stateptr, const
|
||||
|
||||
case '!':
|
||||
/* JavaScript & Other HTML scripting languages */
|
||||
if (state == 1 && *(p-1) == '<') {
|
||||
if (state == 1 && p >= buf + 1 && *(p-1) == '<') {
|
||||
state = 3;
|
||||
lc = c;
|
||||
} else {
|
||||
@@ -4920,7 +4920,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, uint8_t *stateptr, const
|
||||
|
||||
case '?':
|
||||
|
||||
if (state == 1 && *(p-1) == '<') {
|
||||
if (state == 1 && p >= buf + 1 && *(p-1) == '<') {
|
||||
br=0;
|
||||
state=2;
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
--TEST--
|
||||
Bug #79099 (OOB read in php_strip_tags_ex)
|
||||
--FILE--
|
||||
<?php
|
||||
$stream = fopen('php://memory', 'w+');
|
||||
fputs($stream, "<?\n\"\n");
|
||||
rewind($stream);
|
||||
var_dump(fgetss($stream));
|
||||
var_dump(fgetss($stream));
|
||||
fclose($stream);
|
||||
|
||||
$stream = fopen('php://memory', 'w+');
|
||||
fputs($stream, "<\0\n!\n");
|
||||
rewind($stream);
|
||||
var_dump(fgetss($stream));
|
||||
var_dump(fgetss($stream));
|
||||
fclose($stream);
|
||||
|
||||
$stream = fopen('php://memory', 'w+');
|
||||
fputs($stream, "<\0\n?\n");
|
||||
rewind($stream);
|
||||
var_dump(fgetss($stream));
|
||||
var_dump(fgetss($stream));
|
||||
fclose($stream);
|
||||
?>
|
||||
--EXPECT--
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
+2
-2
@@ -3,6 +3,6 @@
|
||||
#define PHP_MAJOR_VERSION 7
|
||||
#define PHP_MINOR_VERSION 2
|
||||
#define PHP_RELEASE_VERSION 27
|
||||
#define PHP_EXTRA_VERSION "-dev"
|
||||
#define PHP_VERSION "7.2.27-dev"
|
||||
#define PHP_EXTRA_VERSION ""
|
||||
#define PHP_VERSION "7.2.27"
|
||||
#define PHP_VERSION_ID 70227
|
||||
Reference in new issue
Block a user