Bug #75968 [Com]: php-fpm restarts master process in a loop when using Program execution Function

From: Date: Tue, 20 Feb 2018 10:38:49 +0000
Subject: Bug #75968 [Com]: php-fpm restarts master process in a loop when using Program execution Function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214046@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75968&edit=1 ID: 75968 Comment by: schnederle at futureweb dot at Reported by: schnederle at futureweb dot at Summary: php-fpm restarts master process in a loop when using Program execution Function Status: Open Type: Bug Package: Reproducible crash Operating System: Centos/RHEL 7.4 PHP Version: 7.2.2 Block user comment: N Private report: N New Comment: someone with proper rights please assign CVE-2015-9253 to this Bug Report. Source: - http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-9253 - https://www.futureweb.at/security/CVE-2015-9253/ Previous Comments: ------------------------------------------------------------------------ [2018-02-19 13:15:23] schnederle at futureweb dot at https://www.futureweb.at/Futureweb-OG-php-fpm-master-process-restarts-child-process-in-a_pid,54177,type,firmeninfo.html ------------------------------------------------------------------------ [2018-02-16 15:51:06] schnederle at futureweb dot at was able to reproduce behaviour "self contained": Script 1: <?php stream_set_blocking(STDIN, false); echo "Blah"; ?> Script 2: <?php passthru('/usr/bin/php /path/to/1.php'); ?> Reproduceable on 2 Machines with php-fpm 7.2.2 and earlier. As it can be used to DOS Shared Hosting Servers (i.e. all Plesk Servers use PHP-FPM) I think this got some Security implications too. ------------------------------------------------------------------------ [2018-02-16 15:38:51] nikic@php.net Is it possible to provide a **self-contained** reproducer for this? That is, using something like "ls" rather than "postcss"? If not, please provide detailed instructions on how to reproduce this, including any necessary input files and instructions for the installation of necessary programs. ------------------------------------------------------------------------ [2018-02-16 15:32:59] schnederle at futureweb dot at correction - not the master process crashes but php-fpm continues to restart the process over and over again using 100% of the CPU on the php-fpm master process. (crash loop) ------------------------------------------------------------------------ [2018-02-16 15:22:30] schnederle at futureweb dot at Description: ------------ Follow-Up to already reported Bug #70185 (https://bugs.php.net/bug.php?id=70185) Still a Problem with current PHP 7.2.2. When using Program execution Functions (passthru(), exec(), shell_exec(), system(), ...) the php-fpm: master process reproduceable crashes with signal 15 (SIGTERM) which leads to crash-loop, 100% CPU usage and spamming of Logs (30GB within 1 day on my Dev-Server) Test script: --------------- <?php exec('/usr/bin/postcss css_from.css --use autoprefixer --autoprefixer.remove "false" --output css_to.css'); echo 'Done'; ?> Actual result: -------------- Millions of: ... [16-Feb-2018 14:48:30] WARNING: [pool www] child 53778 exited on signal 15 (SIGTERM) after 0.046685 seconds from start [16-Feb-2018 14:48:30] WARNING: [pool www] child 53782 exited on signal 15 (SIGTERM) after 0.045416 seconds from start [16-Feb-2018 14:48:30] WARNING: [pool www] child 53785 exited on signal 15 (SIGTERM) after 0.045331 seconds from start [16-Feb-2018 14:48:30] WARNING: [pool www] child 53787 exited on signal 15 (SIGTERM) after 0.044765 seconds from start ... ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75968&edit=1

« previous php.bugs (#214046) next »