-
Notifications
You must be signed in to change notification settings - Fork 172
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
Defense in Depth - SELinux #226
Comments
A user reported here having issues running dangerzone on a SELinux-enabled system. |
This is an interesting project that we can have in mind for generating SELinux labels: https://github.com/containers/udica |
As part of fixing #880, we apply the Ultimately, if a Linux host does not use SELinux, there's no way for Dangerzone to "enable" it. This is an administrative action, and one that may break the workflow of lots of users. As for Windows and macOS, the same issue applies, plus the fact that we have even less control on the Linux VM. Given that with gVisor, the inner container does not have the capability to open files (due to gVisor's strict seccomp filter), we believe that we have a similar protection as SELinux, in the rare case of container escapes. If we also consider that Dangerzone can utilize SELinux in enforcing mode, then we think it's safe to close this issue. |
To be pedantic, this is actually not true in the configuration that Dangerzone uses, which uses DirectFS, which allows the |
DirectFS is enabled by default in gVisor to improve I/O performance, but comes at the cost of enabling the `openat(2)` syscall (with severe restrictions, but still). As Dangerzone is not performance-sensitive, and that it is desirable to guarantee for the document conversion process to not open any files (to mimic some of what SELinux provides), might as well disable it by default. See freedomofpress#226.
DirectFS is enabled by default in gVisor to improve I/O performance, but comes at the cost of enabling the `openat(2)` syscall (with severe restrictions, but still). As Dangerzone is not performance-sensitive, and that it is desirable to guarantee for the document conversion process to not open any files (to mimic some of what SELinux provides), might as well disable it by default. See freedomofpress#226.
DirectFS is enabled by default in gVisor to improve I/O performance, but comes at the cost of enabling the `openat(2)` syscall (with severe restrictions, but still). As Dangerzone is not performance-sensitive, and that it is desirable to guarantee for the document conversion process to not open any files (to mimic some of what SELinux provides), might as well disable it by default. See #226.
Parent issue: #221
If an attacker manages to escape the container, we want to restrict them as much as possible. One way to do so is by using SELinux, which is also mentioned in the CIS Docker advisories (official link, mirror).
There are several issues that make the adoption of an SELinux policy by Dangerzone a bit difficult though:
Once we circumvent these issues, we should check if Dangerzone can take advantage of enforcing SELinux on the host.
The text was updated successfully, but these errors were encountered: