php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76843 php 7.2-7.3 segfault when opcache extension loaded and php_uname disabled
Submitted: 2018-09-05 06:22 UTC Modified: 2018-09-05 10:30 UTC
From: dmitry dot novitsky at ihc dot ru Assigned: cmb (profile)
Status: Duplicate Package: opcache
PHP Version: 7.2.9 OS: CentOS 6
Private report: No CVE-ID: None
 [2018-09-05 06:22 UTC] dmitry dot novitsky at ihc dot ru
Description:
------------
Hello
We have found that joomla on php 7.2 + opcache + lsphp recieved 503 error (segmentation fault) if php_uname exist in disable functions in php.ini

LSPHP-binary:

cat php.ini
disable_functions = php_uname
zend_extension = opcache.so
memory_limit = 1024M

/usr/local/php72/bin/lsphp -c /home/p503511/php.ini test.php

Warning: (null)() has been disabled for security reasons in Unknown on line 0
Segmentation fault


PHP-BINARY:
/usr/local/php72/bin/php -c /home/p503511/php.ini test.php

Warning: php_uname() has been disabled for security reasons in test.php on line 5

Warning: php_uname() has been disabled for security reasons in test.php on line 5

If execute script through apache or litespeed - in both tests - segfaults


Litespeed support reply:
"Hello Dmitry,

This seems like a bug inside of PHP itself and should be reported at php.net. I tested on both Apache and LSWS and they both give 503 errors. The only difference is when I run via command line, regular php doesn't print out an error when lsphp binary does. Though running the test script in a browser I get the same results for Apache and LSWS.

Best Regards,
Jonathan Kagan"

Test script:
---------------
cat test.php
<?php
function getStatsData()
{
return array(
'server_os' => php_uname('s') . ' ' . php_uname('r')
);
}
getStatsData();
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-05 10:30 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2018-09-05 10:30 UTC] cmb@php.net
This looks like a duplicate of bug #76796.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 23:01:31 2024 UTC