-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
add security.level for php-fpm #65935 #516
Conversation
wp->limit_guid = wp->config->security_limit_guid; | ||
} | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's with the extra new lines?
return 0; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And there is more broken whitespace/indentation.
Do you really think that script uid matching proccess uid increase security ? I mostly think the opposite. I usually think that the process "must not" own the script and have only "read" right. |
I think another check could make sense: "webserver" user can only excute script from a "webauthor" (with webserver != webauthor), thus is any file is added by some exploit, it won't be executable. P.S. which I think is mostly what suExec do. |
http://httpd.apache.org/docs/2.2/suexec.html
Seems quite similar to suexec to me ?? I'm up for implementing varied modes of security while we are at it all the same ... |
This has been totally done over ...
Delicious now, right ?? |
From http://httpd.apache.org/docs/2.2/suexec.html
This means that the wrapper can only be called by apache. The wrapper, not the script.
This means the script will run under an unprivileged account which is obviously not apache. But suExec is something special. So definitively, having process uid = script owner doesn't make sense, from security POV. |
Coming back to this later ... |
https://bugs.php.net/bug.php?id=65935
It went something like this:
Someone asked for suexec like functionality, a gid/uid check, which I implemented.
Some other people said can we do more.
Remi pointed out that suexec is much more
http://httpd.apache.org/docs/2.2/suexec.html
suexec is loads, and restrictive, all the time.
So for php-fpm only I implemented a security level to give a bit of power to the user in configuring their security.
Lastly ... SECURE ALL THE THINGS !!!