mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-12 11:40:50 +00:00
Compare commits
30
Commits
php-7.1.5
...
php-5.6.32
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f21492505 | ||
|
|
f600785f65 | ||
|
|
ad7ed6fe21 | ||
|
|
787e3a1ee4 | ||
|
|
9839d3a953 | ||
|
|
45ac5edbd9 | ||
|
|
7d06a5c89f | ||
|
|
37acebcc8c | ||
|
|
a7815e63bd | ||
|
|
d37658be6c | ||
|
|
390f64701d | ||
|
|
7991a88675 | ||
|
|
55b880070c | ||
|
|
703be4f77e | ||
|
|
27a743b82b | ||
|
|
bdf7393ddb | ||
|
|
2693e52113 | ||
|
|
4e68b2c52b | ||
|
|
f269cdcd4f | ||
|
|
e46d589624 | ||
|
|
12107d619b | ||
|
|
f7f4fd4706 | ||
|
|
e8b7698f5e | ||
|
|
2aae60461c | ||
|
|
f8c514ba6b | ||
|
|
8dc4f4dc9e | ||
|
|
5f8380d33e | ||
|
|
89637c6b41 | ||
|
|
3eecee16d1 | ||
|
|
0f8cf3b849 |
No files matched your search
@@ -1,3 +1,4 @@
|
||||
dist: precise
|
||||
language: c
|
||||
sudo: false
|
||||
addons:
|
||||
|
||||
@@ -1,6 +1,45 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ?? 2017, PHP 5.6.31
|
||||
26 Sep 2017, PHP 5.6.32
|
||||
|
||||
- Date:
|
||||
. Fixed bug #75055 (Out-Of-Bounds Read in timelib_meridian()). (Derick)
|
||||
|
||||
- mcrypt:
|
||||
. Fixed bug #72535 (arcfour encryption stream filter crashes php). (Leigh)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #75207 (applied upstream patch for CVE-2016-1283). (Anatol)
|
||||
|
||||
06 Jul 2017, PHP 5.6.31
|
||||
|
||||
- Core:
|
||||
. Fixed bug #73807 (Performance problem with processing post request over
|
||||
2000000 chars). (Nikita)
|
||||
. Fixed bug #74111 (Heap buffer overread (READ: 1) finish_nested_data from
|
||||
unserialize). (Nikita)
|
||||
. Fixed bug #74603 (PHP INI Parsing Stack Buffer Overflow Vulnerability).
|
||||
(Stas)
|
||||
. Fixed bug #74819 (wddx_deserialize() heap out-of-bound read via
|
||||
php_parse_date()). (Derick)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #74435 (Buffer over-read into uninitialized memory). (cmb)
|
||||
|
||||
- mbstring:
|
||||
. Add oniguruma upstream fix (CVE-2017-9224, CVE-2017-9226, CVE-2017-9227,
|
||||
CVE-2017-9228, CVE-2017-9229) (Remi, Mamoru TASAKA)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #74651 (negative-size-param (-1) in memcpy in zif_openssl_seal()).
|
||||
(Stas)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #74087 (Segmentation fault in PHP7.1.1(compiled using the bundled PCRE library)).
|
||||
(Stas)
|
||||
|
||||
- WDDX:
|
||||
. Fixed bug #74145 (wddx parsing empty boolean tag leads to SIGSEGV). (Stas)
|
||||
|
||||
19 Jan 2017, PHP 5.6.30
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
0=0&~2000000000
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #74603 (PHP INI Parsing Stack Buffer Overflow Vulnerability)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_INT_MAX !== 2147483647)
|
||||
die('skip for 32-bit only');
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(parse_ini_file(__DIR__ . "/bug74603.ini", true, INI_SCANNER_NORMAL));
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(1) "0"
|
||||
}
|
||||
@@ -53,7 +53,7 @@ static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
int i_result;
|
||||
int i_op1, i_op2;
|
||||
char str_result[MAX_LENGTH_OF_LONG];
|
||||
char str_result[MAX_LENGTH_OF_LONG+1];
|
||||
|
||||
i_op1 = atoi(Z_STRVAL_P(op1));
|
||||
free(Z_STRVAL_P(op1));
|
||||
|
||||
+2
-2
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=6
|
||||
PHP_RELEASE_VERSION=31
|
||||
PHP_EXTRA_VERSION="-dev"
|
||||
PHP_RELEASE_VERSION=32
|
||||
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`
|
||||
|
||||
|
||||
+7261
-6578
File diff suppressed because it is too large.
Load diff
@@ -899,7 +899,7 @@ datefull = day ([ \t.-])* monthtext ([ \t.-])* year;
|
||||
datenoday = monthtext ([ .\t-])* year4;
|
||||
datenodayrev = year4 ([ .\t-])* monthtext;
|
||||
datetextual = monthtext ([ .\t-])* day [,.stndrh\t ]+ year;
|
||||
datenoyear = monthtext ([ .\t-])* day [,.stndrh\t ]*;
|
||||
datenoyear = monthtext ([ .\t-])* day ([,.stndrh\t ]+|[\000]);
|
||||
datenoyearrev = day ([ .\t-])* monthtext;
|
||||
datenocolon = year4 monthlz daylz;
|
||||
|
||||
@@ -917,8 +917,8 @@ isoweek = year4 "-"? "W" weekofyear;
|
||||
exif = year4 ":" monthlz ":" daylz " " hour24lz ":" minutelz ":" secondlz;
|
||||
firstdayof = 'first day of';
|
||||
lastdayof = 'last day of';
|
||||
backof = 'back of ' hour24 space? meridian?;
|
||||
frontof = 'front of ' hour24 space? meridian?;
|
||||
backof = 'back of ' hour24 (space? meridian)?;
|
||||
frontof = 'front of ' hour24 (space? meridian)?;
|
||||
|
||||
/* Common Log Format: 10/Oct/2000:13:55:36 -0700 */
|
||||
clf = day "/" monthabbr "/" year4 ":" hour24lz ":" minutelz ":" secondlz space tzcorrection;
|
||||
|
||||
@@ -40,7 +40,7 @@ object(DateInterval)#%d (15) {
|
||||
["special_amount"]=>
|
||||
int(-1)
|
||||
["have_weekday_relative"]=>
|
||||
int(9)
|
||||
int(%d)
|
||||
["have_special_relative"]=>
|
||||
int(0)
|
||||
}
|
||||
|
||||
@@ -34,14 +34,14 @@ foreach ( $tests as $start => $data )
|
||||
echo "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
Sat, 23 Oct 2010 00:00:00 +0000
|
||||
Fri, 15 Oct 2010 23:00:00 +0000
|
||||
Wed, 15 Dec 2010 16:15:00 +0000
|
||||
Mon, 20 Dec 2010 00:00:00 +0000
|
||||
Mon, 20 Dec 2010 10:00:00 +0000
|
||||
Tue, 21 Dec 2010 12:00:00 +0000
|
||||
Mon, 03 Jan 2011 00:00:00 +0000
|
||||
Mon, 03 Jan 2011 09:00:00 +0000
|
||||
Sat, 23 Oct 2010 00:00:00 +0100
|
||||
Fri, 15 Oct 2010 23:00:00 +0100
|
||||
Sun, 28 Mar 2010 00:15:00 +0000
|
||||
Sun, 28 Mar 2010 02:15:00 +0100
|
||||
Sun, 28 Mar 2010 02:15:00 +0100
|
||||
@@ -147,6 +147,9 @@ gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd) /* {{{ */
|
||||
int haveGlobalColormap;
|
||||
gdImagePtr im = 0;
|
||||
|
||||
memset(ColorMap, 0, 3 * MAXCOLORMAPSIZE);
|
||||
memset(localColorMap, 0, 3 * MAXCOLORMAPSIZE);
|
||||
|
||||
/*1.4//imageNumber = 1; */
|
||||
if (! ReadOK(fd,buf,6)) {
|
||||
return 0;
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
Bug #74435 (Buffer over-read into uninitialized memory)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die('skip gd extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$im = imagecreatefromgif(__DIR__ . DIRECTORY_SEPARATOR . 'bug74435.gif');
|
||||
var_dump($im);
|
||||
$width = imagesx($im);
|
||||
$height = imagesy($im);
|
||||
for ($i = 0; $i < $width; $i += 16) {
|
||||
for ($j = 0; $j < $height; $j += 16) {
|
||||
if (($index = imagecolorat($im, $i, $j)) >= 2) {
|
||||
list($red, $green, $blue, $alpha) = array_values(imagecolorsforindex($im, $index));
|
||||
if ($red !== 0 || $green !== 0 || $blue !== 0 || $alpha !== 0) {
|
||||
echo "unexpected color at ($i, $j)\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
resource(%d) of type (gd)
|
||||
===DONE===
|
||||
@@ -1425,14 +1425,9 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
||||
break;
|
||||
|
||||
case OP_EXACT1: MOP_IN(OP_EXACT1);
|
||||
#if 0
|
||||
DATA_ENSURE(1);
|
||||
if (*p != *s) goto fail;
|
||||
p++; s++;
|
||||
#endif
|
||||
if (*p != *s++) goto fail;
|
||||
DATA_ENSURE(0);
|
||||
p++;
|
||||
MOP_OUT;
|
||||
break;
|
||||
|
||||
@@ -3128,6 +3123,8 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
|
||||
}
|
||||
else {
|
||||
UChar *q = p + reg->dmin;
|
||||
|
||||
if (q >= end) return 0; /* fail */
|
||||
while (p < q) p += enclen(reg->enc, p);
|
||||
}
|
||||
}
|
||||
@@ -3208,7 +3205,13 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
|
||||
else {
|
||||
if (reg->dmax != ONIG_INFINITE_DISTANCE) {
|
||||
*low = p - reg->dmax;
|
||||
if (*low > s) {
|
||||
if (p - str < reg->dmax) {
|
||||
*low = (UChar* )str;
|
||||
if (low_prev)
|
||||
*low_prev = onigenc_get_prev_char_head(reg->enc, str, *low);
|
||||
}
|
||||
else {
|
||||
if (*low > s) {
|
||||
*low = onigenc_get_right_adjust_char_head_with_prev(reg->enc, s,
|
||||
*low, (const UChar** )low_prev);
|
||||
if (low_prev && IS_NULL(*low_prev))
|
||||
@@ -3221,6 +3224,7 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
|
||||
(pprev ? pprev : str), *low);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* no needs to adjust *high, *high is used as range check only */
|
||||
*high = p - reg->dmin;
|
||||
|
||||
@@ -3064,7 +3064,7 @@ fetch_token_in_cc(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
|
||||
PUNFETCH;
|
||||
prev = p;
|
||||
num = scan_unsigned_octal_number(&p, end, 3, enc);
|
||||
if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
|
||||
if (num < 0 || num >= 256) return ONIGERR_TOO_BIG_NUMBER;
|
||||
if (p == prev) { /* can't read nothing. */
|
||||
num = 0; /* but, it's not error */
|
||||
}
|
||||
@@ -3436,7 +3436,7 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
|
||||
if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) {
|
||||
prev = p;
|
||||
num = scan_unsigned_octal_number(&p, end, (c == '0' ? 2:3), enc);
|
||||
if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
|
||||
if (num < 0 || num >= 256) return ONIGERR_TOO_BIG_NUMBER;
|
||||
if (p == prev) { /* can't read nothing. */
|
||||
num = 0; /* but, it's not error */
|
||||
}
|
||||
@@ -4068,7 +4068,9 @@ next_state_class(CClassNode* cc, OnigCodePoint* vs, enum CCVALTYPE* type,
|
||||
}
|
||||
}
|
||||
|
||||
*state = CCS_VALUE;
|
||||
if (*state != CCS_START)
|
||||
*state = CCS_VALUE;
|
||||
|
||||
*type = CCV_CLASS;
|
||||
return 0;
|
||||
}
|
||||
@@ -4084,7 +4086,11 @@ next_state_val(CClassNode* cc, OnigCodePoint *vs, OnigCodePoint v,
|
||||
switch (*state) {
|
||||
case CCS_VALUE:
|
||||
if (*type == CCV_SB)
|
||||
{
|
||||
if (*vs > 0xff)
|
||||
return ONIGERR_INVALID_CODE_POINT_VALUE;
|
||||
BITSET_SET_BIT(cc->bs, (int )(*vs));
|
||||
}
|
||||
else if (*type == CCV_CODE_POINT) {
|
||||
r = add_code_range(&(cc->mbuf), env, *vs, *vs);
|
||||
if (r < 0) return r;
|
||||
|
||||
@@ -89,7 +89,7 @@ static php_stream_filter_status_t php_mcrypt_filter(
|
||||
php_stream_bucket_delref(bucket TSRMLS_CC);
|
||||
} else {
|
||||
/* Stream cipher */
|
||||
php_stream_bucket_make_writeable(bucket TSRMLS_CC);
|
||||
bucket = php_stream_bucket_make_writeable(bucket TSRMLS_CC);
|
||||
if (data->encrypt) {
|
||||
mcrypt_generic(data->module, bucket->buf, bucket->buflen);
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #72535 arcfour encryption stream filter crashes php
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$passphrase = 'My secret';
|
||||
$plaintext = 'Secret secret secret data';
|
||||
|
||||
$iv = substr(md5('iv' . $passphrase, true), 0, 8);
|
||||
$key = substr(md5('pass1' . $passphrase, true) .
|
||||
md5('pass2' . $passphrase, true), 0, 24);
|
||||
$opts = array('iv' => $iv, 'key' => $key, 'mode' => 'stream');
|
||||
|
||||
$expected = substr($plaintext . $plaintext, 0, 48);
|
||||
|
||||
$fp = fopen('php://memory', 'wb+');
|
||||
stream_filter_append($fp, 'mcrypt.arcfour', STREAM_FILTER_WRITE, $opts);
|
||||
fwrite($fp, $plaintext);
|
||||
?>
|
||||
==NOCRASH==
|
||||
--EXPECT--
|
||||
==NOCRASH==
|
||||
@@ -4982,15 +4982,15 @@ PHP_FUNCTION(openssl_seal)
|
||||
buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(&ctx));
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
|
||||
if (!EVP_SealInit(&ctx, cipher, eks, eksl, NULL, pkeys, nkeys) || !EVP_SealUpdate(&ctx, buf, &len1, (unsigned char *)data, data_len)) {
|
||||
if (EVP_SealInit(&ctx, cipher, eks, eksl, NULL, pkeys, nkeys) <= 0 ||
|
||||
!EVP_SealUpdate(&ctx, buf, &len1, (unsigned char *)data, data_len) ||
|
||||
!EVP_SealFinal(&ctx, buf + len1, &len2)) {
|
||||
RETVAL_FALSE;
|
||||
efree(buf);
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
goto clean_exit;
|
||||
}
|
||||
|
||||
EVP_SealFinal(&ctx, buf + len1, &len2);
|
||||
|
||||
if (len1 + len2 > 0) {
|
||||
zval_dtor(sealdata);
|
||||
buf[len1 + len2] = '\0';
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEoDCCBAmgAwIBAgIBJzANBgkqhkiG9w0BAQQFADCBkDELMAkGA1UEFhMCUk8x
|
||||
EDAOBgNVBAgTB1JvbWFuaWExEDAOBgNVBAcTB0NyYWlvdmExDzANBgNVBAoTBlNl
|
||||
cmdpdTETMBEGA1UECxMKU2VyZ2l1IFNSTDESMBAGA1UEAxMJU2VyZ2l1IENBMSMw
|
||||
IQYJKoZIhvcNAQkBFhRuX3NlcmdpdUBob3RtYWlsLmNvbTAeFw0wNDA1MTQxMzM0
|
||||
NTZaFw0wNTA1MTQxMzM0NTZaMIGaMQswCQYDVQQGEwJSTzEQMA4GA1UECBMHUm9t
|
||||
YW5pYTEQMA4GA1UEBxMHQ3JhaW92YTETMBEGA1UEChMKU2VyZ2l1IFNSTDETMBEG
|
||||
A1UECxMKU2VyZ2l1IFNSTDEYMBYGA1UEAxMPU2VyZ2l1IHBlcnNvbmFsMSMwIQYJ
|
||||
KoZIhvcNAQkBFhRuX3NlcmdpdUBob3RtYWlsLmNvbTCBnzANBgkqhkiG9w0BAQEF
|
||||
AAOBjQAwgYkCgYEApNj7XXz8T8FcLIWpBniPYom3QcT6T7u0xRPHqtqzj5oboBYp
|
||||
DJe5d354/y0gJTpiLt8+fTrPgWXnbHm3pOHgXzTcX6Arani0GDU0/xDi4VkCRGcS
|
||||
YqX2sJpcDzAbmK9UDMt3xf/O1B8AJan3RfO0Bm3ozTEPziLMkmsiYr5b/L4CAwEA
|
||||
AaOCAfwwggH4MAkGA1UdEwQCMAAwNQYJYIZIAYb4QgENBCgWJkZvciBHcmlkIHVz
|
||||
ZSBvbmx5OyByZXF1ZXN0IHRhZyB1c2VyVGFnMBEGCWCGSAGG+EIBAQQEAwIF4DA/
|
||||
BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vbW9iaWxlLmJsdWUtc29mdHdhcmUucm86
|
||||
OTAvY2EvY3JsLnNodG1sMDUGCWCGSAGG+EIBCAQoFiZodHRwOi8vbW9iaWxlLmJs
|
||||
dWUtc29mdHdhcmUucm86OTAvcHViLzAhBgNVHREEGjAYgRZzZXJnaXVAYmx1ZXNv
|
||||
ZnR3YXJlLnJvMB0GA1UdDgQWBBSwp//5QRXeIzm93TEPl6CyonTg/DCBpwYDVR0j
|
||||
BIGfMIGcoYGWpIGTMIGQMQswCQYDVQQGEwJSTzEQMA4GA1UECBMHUm9tYW5pYTEQ
|
||||
MA4GA1UEBxMHQ3JhaW92YTEPMA0GA1UEChMGU2VyZ2l1MRMwEQYDVQQLEwpTZXJn
|
||||
aXUgU1JMMRIwEAYDVQQDEwlTZXJnaXUgQ0ExIzAhBgkqhkiG9w0BCQEWFG5fc2Vy
|
||||
Z2l1QGhvdG1haWwuY29tggEAMAsGA1UdDwQEAwIE8DAjBglghkgBhvhCAQIEFhYU
|
||||
aHR0cDovLzYyLjIzMS45OC41Mi8wCwYDKgMEBAQ+52I0MA0GCSqGSIb3DQEBBAUA
|
||||
A4GBAIBIOJ+iiLyQfNJEY+IMefayQea0nmuXYY+F+L1DFjSC7xChytgYoPNnKkhh
|
||||
3dWPtxbswiqKYUnGi6y3Hi4UhDsOaDW29t2S305hSc2qgjOiNtRYQIVYQ8EHG1k7
|
||||
Fl63S7uCOhnVJt+4MnUK1N6/pwgsp+Z2GvEsDG1qCKnvNpf6
|
||||
-----END CERTIFICATE-----
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #74651: negative-size-param (-1) in memcpy in zif_openssl_seal()
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("openssl")) die("skip openssl not loaded");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$inputstr = file_get_contents(__DIR__ . "/74651.pem");
|
||||
$pub_key_id = openssl_get_publickey($inputstr);
|
||||
var_dump($pub_key_id);
|
||||
var_dump(openssl_seal($inputstr, $sealed, $ekeys, array($pub_key_id, $pub_key_id), 'AES-128-ECB'));
|
||||
?>
|
||||
--EXPECTF--
|
||||
resource(%d) of type (OpenSSL key)
|
||||
bool(false)
|
||||
@@ -7274,7 +7274,12 @@ for (;; ptr++)
|
||||
so far in order to get the number. If the name is not found, leave
|
||||
the value of recno as 0 for a forward reference. */
|
||||
|
||||
else
|
||||
/* This patch (removing "else") fixes a problem when a reference is
|
||||
to multiple identically named nested groups from within the nest.
|
||||
Once again, it is not the "proper" fix, and it results in an
|
||||
over-allocation of memory. */
|
||||
|
||||
/* else */
|
||||
{
|
||||
ng = cd->named_groups;
|
||||
for (i = 0; i < cd->names_found; i++, ng++)
|
||||
|
||||
@@ -7307,7 +7307,7 @@ if (opcode == OP_COND || opcode == OP_SCOND)
|
||||
|
||||
if (*matchingpath == OP_FAIL)
|
||||
stacksize = 0;
|
||||
if (*matchingpath == OP_RREF)
|
||||
else if (*matchingpath == OP_RREF)
|
||||
{
|
||||
stacksize = GET2(matchingpath, 1);
|
||||
if (common->currententry == NULL)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
CVE-2016-1283, see bug #75207
|
||||
--FILE--
|
||||
<?php
|
||||
preg_match("/(?:F?+(?:^(?(R)a+\"){99}-))(?J)(?'R'(?'R'<((?'RR'(?'R'\){97)?J)?J)(?'R'(?'R'\){99|(:(?|(?'R')(\k'R')|((?'R')))H'R'R)(H'R))))))/", "*b\dc");
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
Warning: preg_match(): Compilation failed: unmatched parentheses at offset %d in %s on line %d
|
||||
==DONE==
|
||||
@@ -42,7 +42,7 @@ bool(false)
|
||||
Notice: unserialize(): Error at offset 17 of 33 bytes in %sbug25378.php on line %d
|
||||
bool(false)
|
||||
|
||||
Notice: unserialize(): Error at offset 33 of 32 bytes in %sbug25378.php on line %d
|
||||
Notice: unserialize(): Error at offset 32 of 32 bytes in %sbug25378.php on line %d
|
||||
bool(false)
|
||||
|
||||
Notice: unserialize(): Error at offset 2 of 13 bytes in %sbug25378.php on line %d
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
Bug #74111: Heap buffer overread (READ: 1) finish_nested_data from unserialize
|
||||
--FILE--
|
||||
<?php
|
||||
$s = 'O:8:"stdClass":00000000';
|
||||
var_dump(unserialize($s));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: unserialize(): Error at offset 25 of 23 bytes in %s on line %d
|
||||
bool(false)
|
||||
@@ -48,7 +48,7 @@ DONE
|
||||
--EXPECTF--
|
||||
Notice: unserialize(): Error at offset 0 of 3 bytes in %sbug70436.php on line %d
|
||||
|
||||
Notice: unserialize(): Error at offset 17 of 17 bytes in %sbug70436.php on line %d
|
||||
Notice: unserialize(): Error at offset 16 of 17 bytes in %sbug70436.php on line %d
|
||||
array(4) {
|
||||
[0]=>
|
||||
int(1)
|
||||
@@ -62,4 +62,4 @@ array(4) {
|
||||
[3]=>
|
||||
bool(false)
|
||||
}
|
||||
DONE
|
||||
DONE
|
||||
+487
-512
File diff suppressed because it is too large.
Load diff
@@ -410,13 +410,12 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long
|
||||
|
||||
static inline int finish_nested_data(UNSERIALIZE_PARAMETER)
|
||||
{
|
||||
if (*((*p)++) == '}')
|
||||
return 1;
|
||||
if (*p >= max || **p != '}') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if SOMETHING_NEW_MIGHT_LEAD_TO_CRASH_ENABLE_IF_YOU_ARE_BRAVE
|
||||
zval_ptr_dtor(rval);
|
||||
#endif
|
||||
return 0;
|
||||
(*p)++;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #74145 (wddx parsing empty boolean tag leads to SIGSEGV)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("wddx")) print "skip";
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$data = file_get_contents(__DIR__ . '/bug74145.xml');
|
||||
$wddx = wddx_deserialize($data);
|
||||
var_dump($wddx);
|
||||
?>
|
||||
DONE
|
||||
--EXPECTF--
|
||||
NULL
|
||||
DONE
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version='1.0' ?>
|
||||
<!DOCTYPE et SYSTEM 'w'>
|
||||
<wddxPacket ven='1.0'>
|
||||
<array>
|
||||
<var Name="name">
|
||||
<boolean ></boolean>
|
||||
</var>
|
||||
</array>
|
||||
</wddxPacket>
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Bug #75055 Out-Of-Bounds Read in timelib_meridian()
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("wddx")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$file_str = dirname(__FILE__) . "/bug75055.wddx";
|
||||
|
||||
$wddx_str = file_get_contents($file_str);
|
||||
print strlen($wddx_str) . " bytes read.\n";
|
||||
|
||||
var_dump(wddx_deserialize($wddx_str));
|
||||
?>
|
||||
--EXPECT--
|
||||
323 bytes read.
|
||||
array(1) {
|
||||
["aDateTime"]=>
|
||||
string(12) "frONt of 0 0"
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version='1.0'?>
|
||||
<!DOCTYPE wddxPacket SYSTEM 'wddx_0100.dtd'>
|
||||
<wddxPacket version='1.0'>
|
||||
<header/>
|
||||
<data>
|
||||
<struct>
|
||||
<var name='aDateTime'>
|
||||
<dateTime>frONt of 0 0</dateTime>
|
||||
</var>
|
||||
</struct>
|
||||
</data>
|
||||
</wddxPacket>
|
||||
|
||||
+6
-4
@@ -801,20 +801,22 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
|
||||
|
||||
if (atts) for (i = 0; atts[i]; i++) {
|
||||
if (!strcmp(atts[i], EL_VALUE) && atts[i+1] && atts[i+1][0]) {
|
||||
ent.type = ST_BOOLEAN;
|
||||
SET_STACK_VARNAME;
|
||||
|
||||
ALLOC_ZVAL(ent.data);
|
||||
INIT_PZVAL(ent.data);
|
||||
Z_TYPE_P(ent.data) = IS_BOOL;
|
||||
ent.type = ST_BOOLEAN;
|
||||
SET_STACK_VARNAME;
|
||||
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
|
||||
php_wddx_process_data(user_data, atts[i+1], strlen(atts[i+1]));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ALLOC_ZVAL(ent.data);
|
||||
INIT_PZVAL(ent.data);
|
||||
Z_TYPE_P(ent.data) = IS_BOOL;
|
||||
ent.type = ST_BOOLEAN;
|
||||
SET_STACK_VARNAME;
|
||||
ZVAL_FALSE(&ent.data);
|
||||
ZVAL_FALSE(ent.data);
|
||||
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
|
||||
}
|
||||
} else if (!strcmp(name, EL_NULL)) {
|
||||
|
||||
@@ -237,11 +237,14 @@ typedef struct post_var_data {
|
||||
char *ptr;
|
||||
char *end;
|
||||
uint64_t cnt;
|
||||
|
||||
/* Bytes in ptr that have already been scanned for '&' */
|
||||
size_t already_scanned;
|
||||
} post_var_data_t;
|
||||
|
||||
static zend_bool add_post_var(zval *arr, post_var_data_t *var, zend_bool eof TSRMLS_DC)
|
||||
{
|
||||
char *ksep, *vsep, *val;
|
||||
char *start, *ksep, *vsep, *val;
|
||||
size_t klen, vlen;
|
||||
/* FIXME: string-size_t */
|
||||
unsigned int new_vlen;
|
||||
@@ -250,9 +253,11 @@ static zend_bool add_post_var(zval *arr, post_var_data_t *var, zend_bool eof TSR
|
||||
return 0;
|
||||
}
|
||||
|
||||
vsep = memchr(var->ptr, '&', var->end - var->ptr);
|
||||
start = var->ptr + var->already_scanned;
|
||||
vsep = memchr(start, '&', var->end - start);
|
||||
if (!vsep) {
|
||||
if (!eof) {
|
||||
var->already_scanned = var->end - var->ptr;
|
||||
return 0;
|
||||
} else {
|
||||
vsep = var->end;
|
||||
@@ -285,6 +290,7 @@ static zend_bool add_post_var(zval *arr, post_var_data_t *var, zend_bool eof TSR
|
||||
efree(val);
|
||||
|
||||
var->ptr = vsep + (vsep != var->end);
|
||||
var->already_scanned = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -304,7 +310,7 @@ static inline int add_post_vars(zval *arr, post_var_data_t *vars, zend_bool eof
|
||||
}
|
||||
}
|
||||
|
||||
if (!eof) {
|
||||
if (!eof && vars->str.c != vars->ptr) {
|
||||
memmove(vars->str.c, vars->ptr, vars->str.len = vars->end - vars->ptr);
|
||||
}
|
||||
return SUCCESS;
|
||||
|
||||
+4
-4
@@ -2,7 +2,7 @@
|
||||
/* edit configure.in to change version number */
|
||||
#define PHP_MAJOR_VERSION 5
|
||||
#define PHP_MINOR_VERSION 6
|
||||
#define PHP_RELEASE_VERSION 31
|
||||
#define PHP_EXTRA_VERSION "-dev"
|
||||
#define PHP_VERSION "5.6.31-dev"
|
||||
#define PHP_VERSION_ID 50631
|
||||
#define PHP_RELEASE_VERSION 32
|
||||
#define PHP_EXTRA_VERSION ""
|
||||
#define PHP_VERSION "5.6.32"
|
||||
#define PHP_VERSION_ID 50632
|
||||
@@ -1,7 +1,10 @@
|
||||
--TEST--
|
||||
FPM: Test IPv6 support
|
||||
--SKIPIF--
|
||||
<?php include "skipif.inc"; ?>
|
||||
<?php include "skipif.inc";
|
||||
@stream_socket_client('tcp://[::1]:0', $errno);
|
||||
if ($errno != 111) die('skip IPv6 not supported.');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
--TEST--
|
||||
FPM: Test IPv4/IPv6 support
|
||||
--SKIPIF--
|
||||
<?php include "skipif.inc"; ?>
|
||||
<?php include "skipif.inc";
|
||||
@stream_socket_client('tcp://[::1]:0', $errno);
|
||||
if ($errno != 111) die('skip IPv6 not supported.');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
--TEST--
|
||||
FPM: Test IPv4 allowed clients
|
||||
--SKIPIF--
|
||||
<?php include "skipif.inc"; ?>
|
||||
<?php include "skipif.inc";
|
||||
@stream_socket_client('tcp://[::1]:0', $errno);
|
||||
if ($errno != 111) die('skip IPv6 not supported.');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
--TEST--
|
||||
FPM: Test IPv6 allowed clients (bug #68428)
|
||||
--SKIPIF--
|
||||
<?php include "skipif.inc"; ?>
|
||||
<?php include "skipif.inc";
|
||||
@stream_socket_client('tcp://[::1]:0', $errno);
|
||||
if ($errno != 111) die('skip IPv6 not supported.');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
--TEST--
|
||||
FPM: Test IPv6 all addresses and access_log (bug #68421)
|
||||
--SKIPIF--
|
||||
<?php include "skipif.inc"; ?>
|
||||
<?php include "skipif.inc";
|
||||
@stream_socket_client('tcp://[::1]:0', $errno);
|
||||
if ($errno != 111) die('skip IPv6 not supported.');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
Reference in new issue
Block a user