Compare commits

..
45 Commits
Author SHA1 Message Date
Anatol Belski cff4562e6d Set versions 2018-09-11 07:05:39 +02:00
Anatol Belski 4415dab25e Sync NEWS [ci skip] 2018-09-10 16:56:37 +02:00
Stanislav Malyshev 024f3ac160 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Update NEWS
  Fix for bug #76582
2018-09-09 12:27:44 -07:00
Stanislav Malyshev c1de84014d Update NEWS 2018-09-09 12:19:38 -07:00
Stanislav Malyshev 23b057742e Fix for bug #76582
The brigade seems to end up in a messed up state if something fails
in shutdown, so we clean it up.
2018-09-09 11:45:14 -07:00
Ferenc Kovacs e5b27b9916 Merge branch 'PHP-5.6' into PHP-7.0 2018-07-19 16:56:32 +02:00
Ferenc Kovacs 1ba3314335 5.6.38 will be next 2018-07-19 16:54:58 +02:00
Anatol Belski d011da9d1a 7.0.32 next 2018-07-17 12:36:13 +02:00
Anatol Belski b52c4fcbcd [ci skip] Update NEWS 2018-07-17 11:58:00 +02:00
Stanislav Malyshev bddf8140e4 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Add NEWS
  Fixed bug #76459 windows linkinfo lacks openbasedir check
  Fix bug #76557: heap-buffer-overflow (READ of size 48) while reading exif data
  Fix bug #76423 - Int Overflow lead to Heap OverFlow in exif_thumbnail_extract of exif.c
2018-07-16 15:13:13 -07:00
Anatol Belski f151e048ed Fixed bug #76459 windows linkinfo lacks openbasedir check 2018-07-16 15:11:56 -07:00
Stanislav Malyshev b73a108543 Add NEWS 2018-07-16 14:26:31 -07:00
Anatol Belski 289cb0f77c Fixed bug #76459 windows linkinfo lacks openbasedir check 2018-07-16 14:21:02 -07:00
Stanislav Malyshev 3462efa386 Fix bug #76557: heap-buffer-overflow (READ of size 48) while reading exif data
Use MAKERNOTE length as data size.
2018-07-16 14:17:51 -07:00
Stanislav Malyshev 1baeae4270 Fix bug #76423 - Int Overflow lead to Heap OverFlow in exif_thumbnail_extract of exif.c 2018-07-16 14:16:58 -07:00
Ferenc Kovacs 5ac5f313bd Merge branch 'PHP-5.6' into PHP-7.0 2018-04-25 00:13:11 +02:00
Ferenc Kovacs fe3d53f443 5.6.37 will be next 2018-04-24 23:23:14 +02:00
Anatol Belski 090fef553d 7.0.31 next 2018-04-24 11:36:12 +02:00
Anatol Belski 31c3646757 [ci skip] Update NEWS 2018-04-24 11:21:03 +02:00
Anatol Belski 3070883bcf Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix test portability
2018-04-24 10:48:22 +02:00
Anatol Belski 4371af3e19 Fix test portability 2018-04-24 10:47:32 +02:00
Stanislav Malyshev 5a18d7a0df Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix tsrm_ls
  Fix #76129 - remove more potential unfiltered outputs for phar
  Fix test
  Fix bug #76248 - Malicious LDAP-Server Response causes Crash
  Fix bug #76249 - fail on invalid sequences
  Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value
  Fix bug #75981: prevent reading beyond buffer start
2018-04-23 21:59:57 -07:00
Stanislav Malyshev ee76a5ae5a Fix tsrm_ls 2018-04-23 16:48:27 -07:00
Stanislav Malyshev 58b0003975 Merge remote-tracking branch 'security/bug76249' into PHP-5.6
* security/bug76249:
  Fix test
  Fix bug #76249 - fail on invalid sequences
2018-04-23 13:44:19 -07:00
Stanislav Malyshev a4c55eefd0 Merge remote-tracking branch 'security/bug76248' into PHP-5.6
* security/bug76248:
  Fix bug #76248 - Malicious LDAP-Server Response causes Crash
2018-04-23 13:44:12 -07:00
Stanislav Malyshev 6e64aba47f Fix #76129 - remove more potential unfiltered outputs for phar 2018-04-23 13:43:43 -07:00
Stanislav Malyshev e2dcf3cc54 Merge remote-tracking branch 'security/PHP-5.6' into PHP-5.6
* security/PHP-5.6:
  Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value
  Fix bug #75981: prevent reading beyond buffer start
2018-04-23 13:42:51 -07:00
Stanislav Malyshev 8dca5ae5ec Fix test 2018-04-22 22:19:51 -07:00
Stanislav Malyshev 49782c5499 Fix bug #76248 - Malicious LDAP-Server Response causes Crash 2018-04-22 22:01:35 -07:00
Stanislav Malyshev 06d309fd7a Fix bug #76249 - fail on invalid sequences 2018-04-22 21:26:39 -07:00
Christoph M. Becker b4e4788c44 Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value
The MakerNote is not necessarily null-terminated, so we must not use
`strlen()` to avoid OOB reads.  Instead `php_strnlen()` is the proper
way to handle this.
2018-04-22 20:15:02 -07:00
Ferenc Kovacs 01f42b836c Merge branch 'PHP-5.6' into PHP-7.0 2018-03-28 23:17:59 +02:00
Ferenc Kovacs cb981e39c2 [ci skip] 5.6.36 will be next 2018-03-28 23:14:30 +02:00
Anatol Belski 1e4273d881 [ci skip] Fix release date 2018-03-27 16:02:19 +02:00
Anatol Belski 48f835efbf 7.0.30 next 2018-03-27 15:00:54 +02:00
Anatol Belski ca51458081 [ci skip] Update NEWS 2018-03-27 14:26:06 +02:00
Anatol Belski e2b7392b96 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  [ci skip] Update NEWS
2018-03-27 14:25:24 +02:00
Anatol Belski 2885f62816 [ci skip] Update NEWS 2018-03-27 14:24:43 +02:00
Jakub Zelenka 276d19feaa Do not set PR_SET_DUMPABLE by default 2018-03-27 14:19:36 +02:00
Anatol Belski eac822e897 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Do not set PR_SET_DUMPABLE by default
2018-03-27 14:19:22 +02:00
Jakub Zelenka d20bebfe13 Do not set PR_SET_DUMPABLE by default 2018-03-27 14:18:01 +02:00
Ferenc Kovacs c28a6253e5 Merge branch 'PHP-5.6' into PHP-7.0 2018-02-28 00:00:12 +01:00
Ferenc Kovacs 3db7427b71 5.6.35 is next 2018-02-27 23:57:06 +01:00
Anatol Belski c61b56ed00 7.0.29 next 2018-02-27 11:48:49 +01:00
Stanislav Malyshev 36239fee36 Fix bug #75981: prevent reading beyond buffer start 2018-02-20 15:44:00 -08:00
34 changed files with 274 additions and 25 deletions

No files matched your search

+38
View File
@@ -1,5 +1,43 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
13 Sep 2018 PHP 7.0.32
- Apache2
. Fixed bug #76582 (XSS due to the header Transfer-Encoding: chunked). (Stas)
19 Jul 2018 PHP 7.0.31
- Exif:
. Fixed bug #76423 (Int Overflow lead to Heap OverFlow in
exif_thumbnail_extract of exif.c). (Stas)
. Fixed bug #76557 (heap-buffer-overflow (READ of size 48) while reading exif
data). (Stas)
- Win32:
. Fixed bug #76459 (windows linkinfo lacks openbasedir check). (Anatol)
26 Apr 2018 PHP 7.0.30
- Exif:
. Fixed bug #76130 (Heap Buffer Overflow (READ: 1786) in exif_iif_add_value).
(Stas)
- iconv:
. Fixed bug #76249 (stream filter convert.iconv leads to infinite loop on
invalid sequence). (Stas)
- LDAP:
. Fixed bug #76248 (Malicious LDAP-Server Response causes Crash). (Stas)
- Phar:
. Fixed bug #76129 (fix for CVE-2018-5712 may not be complete). (Stas)
29 Mar 2018 PHP 7.0.29
- FPM:
. Fixed bug #75605 (Dumpable FPM child processes allow bypassing opcache
access controls). (Jakub Zelenka)
01 Mar 2018 PHP 7.0.28
- Standard:
+1 -1
View File
@@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=7
PHP_MINOR_VERSION=0
PHP_RELEASE_VERSION=28
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`
+9 -3
View File
@@ -1704,7 +1704,7 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
case TAG_FMT_UNDEFINED:
if (value) {
if (tag == TAG_MAKER_NOTE) {
length = MIN(length, strlen(value));
length = (int) php_strnlen(value, length);
}
/* do not recompute length here */
@@ -2536,7 +2536,10 @@ static void exif_thumbnail_extract(image_info_type *ImageInfo, char *offset, siz
return;
}
/* Check to make sure we are not going to go past the ExifLength */
if ((ImageInfo->Thumbnail.offset + ImageInfo->Thumbnail.size) > length) {
if (ImageInfo->Thumbnail.size > length
|| (ImageInfo->Thumbnail.offset + ImageInfo->Thumbnail.size) > length
|| ImageInfo->Thumbnail.offset > length - ImageInfo->Thumbnail.size
) {
EXIF_ERRLOG_THUMBEOF(ImageInfo)
return;
}
@@ -2714,6 +2717,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
int NumDirEntries, old_motorola_intel, offset_diff;
const maker_note_type *maker_note;
char *dir_start;
int data_len;
for (i=0; i<=sizeof(maker_note_array)/sizeof(maker_note_type); i++) {
if (i==sizeof(maker_note_array)/sizeof(maker_note_type)) {
@@ -2768,6 +2772,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
switch (maker_note->offset_mode) {
case MN_OFFSET_MAKER:
offset_base = value_ptr;
data_len = value_len;
break;
case MN_OFFSET_GUESS:
if (maker_note->offset + 10 + 4 >= value_len) {
@@ -2784,6 +2789,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
return FALSE;
}
offset_base = value_ptr + offset_diff;
data_len = value_len - offset_diff;
break;
default:
case MN_OFFSET_NORMAL:
@@ -2797,7 +2803,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
for (de=0;de<NumDirEntries;de++) {
if (!exif_process_IFD_TAG(ImageInfo, dir_start + 2 + 12 * de,
offset_base, IFDlength, displacement, section_index, 0, maker_note->tag_table)) {
offset_base, data_len, displacement, section_index, 0, maker_note->tag_table)) {
return FALSE;
}
}
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #76130 (Heap Buffer Overflow (READ: 1786) in exif_iif_add_value)
--DESCRIPTION--
This test is meant to exhibit memory issues with the `-m` option. Since a lot of
notices and warnings are to be expected anyway, we suppress these, since the are
not relevant for this test.
--INI--
error_reporting=E_ALL & ~E_WARNING & ~E_NOTICE
--SKIPIF--
<?php
if (!extension_loaded('exif')) die('skip exif extension not available');
?>
--FILE--
<?php
exif_read_data(__DIR__ . '/bug76130_1.jpg');
exif_read_data(__DIR__ . '/bug76130_2.jpg');
?>
===DONE===
--EXPECT--
===DONE===
Binary file not shown.
Binary file not shown.
Binary file not shown.
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #76423 (Int Overflow lead to Heap OverFlow in exif_thumbnail_extract of exif.c)
--SKIPIF--
<?php
if (!extension_loaded('exif')) die('skip exif extension not available');
?>
--FILE--
<?php
exif_read_data(__DIR__ . '/bug76423.jpg', 0, true, true);
?>
===DONE===
--EXPECTF--
Warning: exif_read_data(%s.jpg): Thumbnail goes IFD boundary or end of file reached in %s on line %d
Warning: exif_read_data(%s.jpg): File structure corrupted in %s on line %d
Warning: exif_read_data(%s.jpg): Invalid JPEG file in %s on line %d
===DONE===
Binary file not shown.
+79
View File
@@ -0,0 +1,79 @@
--TEST--
Bug 76557 (heap-buffer-overflow (READ of size 48) while reading exif data)
--SKIPIF--
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
--FILE--
<?php
var_dump(count(exif_read_data(dirname(__FILE__) . "/bug76557.jpg")));
?>
DONE
--EXPECTF--
Warning: exif_read_data(bug76557.jpg): Process tag(x010F=Make ): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x8769=Exif_IFD_Po): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x927C=MakerNote ): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal pointer offset(x30303030 + x30303030 = x60606060 > x00EE) in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): File structure corrupted in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Invalid JPEG file in %sbug76557.php on line %d
int(1)
DONE
+3
View File
@@ -2648,6 +2648,9 @@ static int php_iconv_stream_filter_append_bucket(
tcnt = 0;
break;
}
} else {
php_error_docref(NULL, E_WARNING, "iconv stream filter (\"%s\"=>\"%s\"): invalid multibyte sequence", self->from_charset, self->to_charset);
goto out_failure;
}
break;
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #76249 (stream filter convert.iconv leads to infinite loop on invalid sequence)
--SKIPIF--
<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?>
--FILE--
<?php
$fh = fopen('php://memory', 'rw');
fwrite($fh, "abc");
rewind($fh);
if (false === @stream_filter_append($fh, 'convert.iconv.ucs-2/utf8//IGNORE', STREAM_FILTER_READ, [])) {
stream_filter_append($fh, 'convert.iconv.ucs-2/utf-8//IGNORE', STREAM_FILTER_READ, []);
}
$a = stream_get_contents($fh);
var_dump(strlen($a));
?>
DONE
--EXPECTF--
Warning: stream_get_contents(): iconv stream filter ("ucs-2"=>"utf%A8//IGNORE"): invalid multibyte sequence in %sbug76249.php on line %d
int(3)
DONE
+5 -1
View File
@@ -1121,7 +1121,11 @@ PHP_FUNCTION(ldap_get_entries)
add_assoc_long(&tmp1, "count", num_attrib);
dn = ldap_get_dn(ldap, ldap_result_entry);
add_assoc_string(&tmp1, "dn", dn);
if (dn) {
add_assoc_string(&tmp1, "dn", dn);
} else {
add_assoc_null(&tmp1, "dn");
}
#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS
ldap_memfree(dn);
#else
+40
View File
@@ -0,0 +1,40 @@
--TEST--
Bug #76248 (Malicious LDAP-Server Response causes Crash)
--SKIPIF--
<?php
require_once('skipif.inc');
if (!function_exists('pcntl_fork')) die('skip fork not available');
?>
--FILE--
<?php
$pid = pcntl_fork();
const PORT = 12345;
if ($pid == 0) {
// child
$server = stream_socket_server("tcp://127.0.0.1:12345");
$socket = stream_socket_accept($server, 3);
fwrite($socket, base64_decode("MAwCAQFhBwoBAAQABAAweQIBAmR0BJljbj1yb290LGRjPWV4YW1wbGUsZGM9Y29tMFcwIwQLb2JqZWN0Q2xhc3MxFAQSb3JnYW5pemF0aW9uYWxSb2xlMAwEAmNuMQYEBHJvb3QwIgQLZGVzY3JpcHRpb24xEwQRRGlyZWN0b3J5IE1hbmFnZXIwDAIBAmUHCgEABAAEADB5AgEDZHQEmWNuPXJvb3QsZGM9ZXhhbXBsZSxkYz1jb20wVzAjBAtvYmplY3RDbGFzczEUBBJvcmdhbml6YXRpb25hbFJvbGUwDAQCY24xBgQEcm9vdDAiBAtkZXNjcmlwdGlvbjETBBFEaXJlY3RvcnkgTWFuYWdlcjAMAgEDZQcKAQAEAAQA"));
fflush($socket);
} else {
// parent
$ds = ldap_connect("127.0.0.1", PORT);
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
$b = ldap_bind($ds, "cn=root,dc=example,dc=com", "secret");
$s = ldap_search($ds, "dc=example,dc=com", "(cn=root)");
$tt = ldap_get_entries($ds, $s);
var_dump($tt);
}
?>
--EXPECT--
array(2) {
["count"]=>
int(1)
[0]=>
array(2) {
["count"]=>
int(0)
["dn"]=>
NULL
}
}
+2 -4
View File
@@ -317,8 +317,7 @@ static void phar_do_403(char *entry, int entry_len) /* {{{ */
sapi_header_op(SAPI_HEADER_REPLACE, &ctr);
sapi_send_headers();
PHPWRITE("<html>\n <head>\n <title>Access Denied</title>\n </head>\n <body>\n <h1>403 - File ", sizeof("<html>\n <head>\n <title>Access Denied</title>\n </head>\n <body>\n <h1>403 - File ") - 1);
PHPWRITE(entry, entry_len);
PHPWRITE(" Access Denied</h1>\n </body>\n</html>", sizeof(" Access Denied</h1>\n </body>\n</html>") - 1);
PHPWRITE("Access Denied</h1>\n </body>\n</html>", sizeof("Access Denied</h1>\n </body>\n</html>") - 1);
}
/* }}} */
@@ -342,8 +341,7 @@ static void phar_do_404(phar_archive_data *phar, char *fname, int fname_len, cha
sapi_header_op(SAPI_HEADER_REPLACE, &ctr);
sapi_send_headers();
PHPWRITE("<html>\n <head>\n <title>File Not Found</title>\n </head>\n <body>\n <h1>404 - File ", sizeof("<html>\n <head>\n <title>File Not Found</title>\n </head>\n <body>\n <h1>404 - File ") - 1);
PHPWRITE(entry, entry_len);
PHPWRITE(" Not Found</h1>\n </body>\n</html>", sizeof(" Not Found</h1>\n </body>\n</html>") - 1);
PHPWRITE("Not Found</h1>\n </body>\n</html>", sizeof("Not Found</h1>\n </body>\n</html>") - 1);
}
/* }}} */
@@ -20,6 +20,6 @@ Status: 403 Access Denied
<title>Access Denied</title>
</head>
<body>
<h1>403 - File /hi Access Denied</h1>
<h1>403 - File Access Denied</h1>
</body>
</html>
@@ -18,6 +18,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /notfound.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
@@ -18,6 +18,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /index.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
+1 -1
View File
@@ -19,6 +19,6 @@ Status: 403 Access Denied
<title>Access Denied</title>
</head>
<body>
<h1>403 - File /hi Access Denied</h1>
<h1>403 - File Access Denied</h1>
</body>
</html>
+1 -1
View File
@@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /notfound.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
+1 -1
View File
@@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /index.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
@@ -19,6 +19,6 @@ Status: 403 Access Denied
<title>Access Denied</title>
</head>
<body>
<h1>403 - File /hi Access Denied</h1>
<h1>403 - File Access Denied</h1>
</body>
</html>
@@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /notfound.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
@@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /index.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
@@ -19,6 +19,6 @@ Status: 403 Access Denied
<title>Access Denied</title>
</head>
<body>
<h1>403 - File /hi Access Denied</h1>
<h1>403 - File Access Denied</h1>
</body>
</html>
@@ -17,6 +17,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /notfound.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
@@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /index.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
+11
View File
@@ -87,6 +87,7 @@ PHP_FUNCTION(readlink)
PHP_FUNCTION(linkinfo)
{
char *link;
char *dirname;
size_t link_len;
zend_stat_t sb;
int ret;
@@ -95,12 +96,22 @@ PHP_FUNCTION(linkinfo)
return;
}
dirname = estrndup(link, link_len);
php_dirname(dirname, link_len);
if (php_check_open_basedir(dirname)) {
efree(dirname);
RETURN_FALSE;
}
ret = VCWD_STAT(link, &sb);
if (ret == -1) {
php_error_docref(NULL, E_WARNING, "%s", strerror(errno));
efree(dirname);
RETURN_LONG(Z_L(-1));
}
efree(dirname);
RETURN_LONG((zend_long) sb.st_dev);
}
/* }}} */
+3 -3
View File
@@ -2,7 +2,7 @@
/* edit configure.in to change version number */
#define PHP_MAJOR_VERSION 7
#define PHP_MINOR_VERSION 0
#define PHP_RELEASE_VERSION 28
#define PHP_RELEASE_VERSION 32
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "7.0.28"
#define PHP_VERSION_ID 70028
#define PHP_VERSION "7.0.32"
#define PHP_VERSION_ID 70032
+1
View File
@@ -689,6 +689,7 @@ zend_first_try {
if (!parent_req) {
php_apache_request_dtor(r);
ctx->request_processed = 1;
apr_brigade_cleanup(brigade);
bucket = apr_bucket_eos_create(r->connection->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(brigade, bucket);
+3
View File
@@ -132,6 +132,7 @@ static struct ini_value_parser_s ini_fpm_pool_options[] = {
{ "listen.mode", &fpm_conf_set_string, WPO(listen_mode) },
{ "listen.allowed_clients", &fpm_conf_set_string, WPO(listen_allowed_clients) },
{ "process.priority", &fpm_conf_set_integer, WPO(process_priority) },
{ "process.dumpable", &fpm_conf_set_boolean, WPO(process_dumpable) },
{ "pm", &fpm_conf_set_pm, WPO(pm) },
{ "pm.max_children", &fpm_conf_set_integer, WPO(pm_max_children) },
{ "pm.start_servers", &fpm_conf_set_integer, WPO(pm_start_servers) },
@@ -613,6 +614,7 @@ static void *fpm_worker_pool_config_alloc() /* {{{ */
wp->config->listen_backlog = FPM_BACKLOG_DEFAULT;
wp->config->pm_process_idle_timeout = 10; /* 10s by default */
wp->config->process_priority = 64; /* 64 means unset */
wp->config->process_dumpable = 0;
wp->config->clear_env = 1;
if (!fpm_worker_all_pools) {
@@ -1621,6 +1623,7 @@ static void fpm_conf_dump() /* {{{ */
} else {
zlog(ZLOG_NOTICE, "\tprocess.priority = %d", wp->config->process_priority);
}
zlog(ZLOG_NOTICE, "\tprocess.dumpable = %s", BOOL2STR(wp->config->process_dumpable));
zlog(ZLOG_NOTICE, "\tpm = %s", PM2STR(wp->config->pm));
zlog(ZLOG_NOTICE, "\tpm.max_children = %d", wp->config->pm_max_children);
zlog(ZLOG_NOTICE, "\tpm.start_servers = %d", wp->config->pm_start_servers);
+1
View File
@@ -64,6 +64,7 @@ struct fpm_worker_pool_config_s {
char *listen_mode;
char *listen_allowed_clients;
int process_priority;
int process_dumpable;
int pm;
int pm_max_children;
int pm_start_servers;
+1 -1
View File
@@ -398,7 +398,7 @@ int fpm_unix_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
}
#ifdef HAVE_PRCTL
if (0 > prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)) {
if (wp->config->process_dumpable && 0 > prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to prctl(PR_SET_DUMPABLE)", wp->config->name);
}
#endif
+6
View File
@@ -69,6 +69,12 @@ listen = 127.0.0.1:9000
; Default Value: no set
; process.priority = -19
; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
; or group is differrent than the master process user. It allows to create process
; core dump and ptrace the process for the pool user.
; Default Value: no
; process.dumpable = yes
; Choose how the process manager will control the number of child processes.
; Possible Values:
; static - a fixed number (pm.max_children) of child processes;