-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
SELinux support in Fedora qubes #4239
Comments
Does this happen if you use the stock Fedora kernel? |
This was done a fresh fedora 28 template installed via package manager (not fedora 26 + updated to fedora 28) and then it was fully updated via yum update. I made no manual change of the kernel so it would be the default one that would be selected with those steps @DemiMarie You seem to be wanting DomU hardening, so I assume you are interested in running SELInux. Have you been able to get it to work? If so, any special steps? |
If you check the console while it's booting (or boot in debug mode), here is the error I get:
So it's missing the SELinux policy. |
Is |
@marmarek No. That fixed that. Now it sits at:
And then it crashes with no more info. Any specific logs I should check besides Running |
Try increasing qrexec_timeout property. |
@marmarek It works! It took a few minutes, but went through giving progress until complete. It "restarted" the VM once done. This caused an error message to pop up, but I just had to start it again and now SELinux is enabled:
|
This isn't really protecting anything... What happens if you switch to enforcing mode? Check also if processes are labeled ( |
@marmarek My bad, not my intention to spam this issue. You're right, enabling enforcing mode does keep it from booting (and blocks different Qubes-related actions if enabled post-boot). Here is the error from that:
|
Seems like the SELinux policies need to be written. Have you tried dumping the actions in permissive mode and creating rules, then testing in enforcing? |
@ideologysec I have done that, and it works. The one caveat is that one must use |
Just dumping my experience on this issue: I made it to actually run SELinux in the enforcing mode. But I am not really into SELinux, I did mess with labeling some Qubes files and tracking them in a module, but failed terrible. The following steps allowed me running a Fedora based VM named selinuxtest in the enforcing mode:
Sometimes it then works to open another Terminal via qvm-start and sometimes it does not. |
I have a git repository (which I will publish soon) that includes working SELinux policies for Fedora. I have SELinux enforcing on most qubes I use, including the one I am using to type this message. |
@DemiMarie any updates on the repo with working SELinux policies? |
@ideologysec My current repo will need significant cleanup, and there have been many other high-priority issues lately. |
Questions that still need to be answered:
|
SELinux policy is going to limit qfile-unpacker access to just this directory. It makes sense, as the data indeed comes from a different VM. Move the default restore location there, but use a directory name that cannot conflict with an actual VM name (`#` is not valid in a VM name), just to avoid unlikely corner cases. Related to QubesOS/qubes-issues#4239
SELinux policy is going to limit qfile-unpacker access to just this directory. It makes sense, as the data indeed comes from a different VM. Move the default restore location there, but use a directory name that cannot conflict with an actual VM name (`#` is not valid in a VM name), just to avoid unlikely corner cases. Related to QubesOS/qubes-issues#4239
This is now implemented. |
@xbc5 thanks for the ping. And thanks everyone for the hard work of making this happen! |
Given that there is passwordless sudo with a lengthy justification on how privesc are alright, what is the point of enabling SELinux in Fedora Qubes? |
User is running unconstrained, but having SELinux enabled allows using it for various in-VM sandboxes, like podman, bubblewrap, but also for extra hardening of receiving side of qvm-copy. |
Qubes OS version:
4.0 utilizing default Fedora 28 templates that are fully updated
Steps to reproduce the behavior:
SELINUX=enforcing
SELINUXTYPE=targeted
qvm-prefs --set kernelopts "nopat security=selinux selinux=1"
qvm-start
Expected behavior:
Expected that the AppVM can boot with SELinux enabled especially because SELinux is enabled by default in fedora.
Actual behavior:
The VM does not start and eventually will need to be killed.
The text was updated successfully, but these errors were encountered: