-
-
Notifications
You must be signed in to change notification settings - Fork 50
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 breaks updating kernel package in a template #8144
SELinux breaks updating kernel package in a template #8144
Comments
@DemiMarie any idea? |
Interestingly, this seems to affect only Fedora 38, but not Fedora 37. So, maybe it is an upstream issue? Or some change in upstream SELinux policy which makes our labeling incompatible? In any case, linking to #8069 |
It does not fail with in-VM kernel, so it is something specific to our /lib/modules handling. |
FWIW, I have tried regenerating modules.img with |
Does it fail when using |
Does it fail when using `kernel-latest`?
Yes, I tried specifically with 6.2.10. I have not tried with 5.15
kernel.
…--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
|
along with a comment stating that |
This unbreaks writing to /lib/modules with SELinux enforcing. Reported-by: Marek Marczykowski-Górecki <[email protected]> Fixes: QubesOS/qubes-issues#8144
kernel_t can read, write, create, and delete all files and device nodes on the system, so preventing it from setting arbitrary SELinux labels makes no sense. Furthermore, limiting what kernel_t can do breaks overlay mounts set up in the initramfs, as the overlay uses kernel_t to access the underlying volumes. Fix this by allowing kernel_t the maximum possible privileges over all labeled inodes in the system. That kernel_t does not already have such privilege is likely an upstream policy bug. Fixes: QubesOS/qubes-issues#8144 (the right way this time)
How to file a helpful issue
Qubes OS release
R4.2
Brief summary
With SELinux in enforcing mode, updating kernel packages in a template fails.
Steps to reproduce
sudo dnf update 'kernel*'
in a SELinux-enabled template (booted from dom0-provided kernel)Expected behavior
Kernel packages (including modules) are successfully updated in the root fs.
Actual behavior
and also
I believe it's specific to our setup for /lib/modules, not a Fedora upstream issue.
The text was updated successfully, but these errors were encountered: