Can we get the exact functions that you added for this security patch ?
As I have already a custom “disable_functions” on my install I can’t just run the sed command !
For what I have read, I have already disabled all functions that you list in your patch. But just to be sure
Disabling all the proposed functions could cause a lot of issues so take care.
Here some examples of php apps that are using some of the disabled functions:
Yourls
$ list_used_php_disabled_functions /home/test/web/yourls.example.com/public_html/
Checking php disabled functions but used in /home/test/web/yourls.example.com/public_html/
exec
Grav
$ list_used_php_disabled_functions /home/test/web/grav.example.com/public_html/
Checking php disabled functions but used in /home/test/web/grav.example.com/public_html/
pcntl_signal
pcntl_signal_dispatch
pcntl_sigprocmask
exec
system
passthru
shell_exec
proc_open
NextCloud
$ list_used_php_disabled_functions /home/test/web/nextcloud.example.com/public_html/
Checking php disabled functions but used in /home/test/web/nextcloud.example.com/public_html/
pcntl_waitpid
pcntl_signal
pcntl_signal_dispatch
pcntl_strerror
pcntl_sigprocmask
pcntl_exec
pcntl_getpriority
pcntl_setpriority
exec
system
passthru
shell_exec
proc_open
popen
Roundcube
$ list_used_php_disabled_functions /var/lib/roundcube
Checking php disabled functions but used in /var/lib/roundcube
pcntl_signal
exec
system
passthru
shell_exec
proc_open
popen
Hestia
$ list_used_php_disabled_functions /usr/local/hestia/web/
Checking php disabled functions but used in /usr/local/hestia/web/
pcntl_signal
pcntl_signal_dispatch
pcntl_sigprocmask
exec
system
passthru
shell_exec
popen
With my comment above, I just wanted to say that you should be careful before disabling all those functions because it is possible that the application you are going to use needs some of them.
Yeah, I know, I don’t know why I put that as an example.
I know nothing about MyVesta and maybe I’m wrong but I think they only disable functions in fpm, not in cli because if they disable them in cli they won’t be able to use update.sh script from Roundcube to update installation.
I’ve also made modifications to the ‘disable_functions’ list because I work extensively with Laravel. However, I’m uncertain about the security implications of the current setup. Could someone kindly take a quick look at it?
Just a quick note that these are required for Nextcloud. I had to enable them in /etc/php/x.x/cli/php.ini so that the nextcloud occ app would stop complaining.
A client also had to enable them to get a laravel app to run.
Unfortunately they can’t be enabled on a per site basis in php.fpm pool config, or in .user.ini