-
Notifications
You must be signed in to change notification settings - Fork 741
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
Make value of kernel.unprivileged_userns_clone depending on kernel version #727
Comments
This is a hard one. I totally understand where you come from. The curlpit ist, not all systems run Podman and in all these cases it is very much preferable to keep it as is. From what I am reading it is still considered a security risk to have this option enabled. What I am very much in favour for is to add some documentation to tell our users how to handle this problem. I know it's hard to find, but we already have something similar for other problems: https://github.com/dev-sec/ansible-collection-hardening/tree/master/roles/os_hardening#known-limitations @rndmh3ro while thinking about this I had the idea to include some extra tasks to notify our users of these known limitations. In this case something like an assert, where we discover that podman is installed and the kernel option is still set to our default and in this case we will emit a warning with a link to the documentation. Currently this would be like 4-5 warnings for the whole collection and could considerably improve the usability. Do you have an opinion on this? |
We discussed this some more: What we don't want:
What we think:
Therefore it is probably enough to properly document these kinds of issues. We already have a "known limitations" part in the docs: https://github.com/dev-sec/ansible-collection-hardening/tree/master/roles/os_hardening#known-limitations I propose to move this part on top of the variables-section and add this topic. @deimi what do you think? |
That is fine for me, because I understand that it is probably only relevant for podman/container use cases. I totally agree, usually no one reads warnings. Additionally I would welcome to have |
That is because |
Description
Currently you set the sysctl config
kernel.unprivileged_userns_clone
to0
, for mitigating CVE-2021-33909.Unfortunately this config prevents running podman containers as non root, which would actually be a good thing from security perspective. I searched quite some time until I found that this role was the reason why I was not able to start containers.
Solution
Only set
kernel.unprivileged_userns_clone
to 0 when the kernel version is below 5.14.4 or if it is explicitly set by the user. Newer kernel versions are not effected anymore by CVE-2021-33909Alternatives
No response
Additional information
...
The text was updated successfully, but these errors were encountered: