Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken exec(), shell_exec() and similar functions in Bookworm docker images #1432

Closed
Pinkbyte opened this issue Aug 14, 2023 · 2 comments
Closed

Comments

@Pinkbyte
Copy link

Pinkbyte commented Aug 14, 2023

Test script:

<?php
error_reporting(E_ALL);

exec('/bin/ls /', $output, $err);
print_r($output);
echo $err;
?>

With 8.2.8-apache-bookworm and 8.1.22-apache-bookworm i got this output(broken):

Warning: exec(): Unable to fork [/bin/ls /] in /var/www/html/2.php on line 4
Array
(
)
-1

With 8.2.8-apache-bullseye and 8.1.22-apache-bullseye i got this output(works fine):

Array
(
    [0] => bin
    [1] => boot
    [2] => dev
    [3] => etc
    [4] => home
    [5] => lib
    [6] => lib64
    [7] => media
    [8] => mnt
    [9] => opt
    [10] => proc
    [11] => root
    [12] => run
    [13] => sbin
    [14] => srv
    [15] => sys
    [16] => tmp
    [17] => usr
    [18] => var
)
0
@tianon
Copy link
Member

tianon commented Dec 12, 2023

This is likely due to seccomp -- probably need to update Docker, runc, and libseccomp on your host.

docker-library/python#837 (comment)

@tianon tianon closed this as completed Dec 14, 2023
@Barbery

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants