-
-
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
enable AppArmor by default #4088
Comments
In case this is a For Whonix it's sane to enable AppArmor by default since we don't ship AppArmor profiles by default which have potential to break in bad ways. (Such as for Tor Browser which has its own updater so Tor Browser might rush ahead and do things which are not covered by apparmor-profile-torbrowser.) We only ship AppArmor profiles for packages which are upgraded through Debian apt package management which undergo testing before flowing into the stable repository (such as for Tor, sdwdate, ...). AppArmor enabled by default in Non-Qubes-Whonix for many releases. Package https://github.com/Whonix/grub-enable-apparmor only works when using VM kernel. Related: |
For now it is blocked by being incompatible with PVH :/ |
AppArmor works good in my PVH VMs, been using it for a while now. I don't think it's installed by default in the Debian template if I can remember correctly. |
Is this now unblocked by QubesOS/qubes-linux-kernel@96b8fba? /cc @HW42 |
Ignoring the news of QubesOS/qubes-linux-kernel@96b8fba - recently I added to Whonix wiki:
|
@marmarek This issue should be changed to FWIW, AppArmor works fine with current templates and the 4.19 kernels as long as |
If there were separate issues for this for Debian and Fedora, then the Debian one could have the |
This is yet another case where using in-vm kernel would make it much easier, as it would be the template controlling kernel command line. BTW with grub 2.04, it should be possible to use it with PVH mode too (previously only PV or HVM). There is grub2-xen-pvh package in current-testing already (to be installed in dom0). For kernel provided from dom0, things are more complex. We need a mechanism for template/standalone qube advertise support for apparmor and then a mechanism to add relevant kernel options. Possibly also allowing user to override it (force-disable, force-enable). Maybe we could implement it with
The above (especially point 3) may be surprising for some. But it allows: a) enabling apparmor by default if supported, b) overriding that decision. Another concern is abusing (*) Should the template be able to say "I don't support apparmor anymore", for example if user uninstall relevant packages? Should kernel options be dropped then? On the other hand, should the user be able to disable apparmor even if template does support it? @adrelanos @unman any opinions? |
I would have thought that doing a The tricky part is finding debian 10 templates that already exist, but not by the original name. This is one of several cases where it would be helpful for Qubes dom0 to know the OS type, distro and version of a template or standalone vm. |
I definitely don't want a distribution-specific code in rpm %post. For multiple reasons:
My proposal cover this. Installing updated package within template will start advertising support for apparmor.
I don't object this on the principle, but prefer to have as little distribution-specific code in dom0 as possible. Rather - set of features that template can advertise it supports. This way it's easier to create customized templates without dom0 modifications. |
I find all of this too complex and argued for "VM kernel all the way" in #5212 (comment). If you like to keep dom0 kernel long term, I'll revisit your comment #4088 (comment), follow-up comments and then pick the least worst one. |
Is this also in R4.0? Anything needed to do on the templates side, i.e. advertising apparmor feature for Debian, Fedora, Whonix or other templates? //cc @herypt |
It's in 4.1 only and should be added to the changelog for that very reason. I at least was quite suprised about apparmor being enabled after investigating why certain stuff didn't work in my VMs. |
@adrelanos Sorry for the late reply, it checks if apparmor.service is enabled in the template. |
Side note: This ticket feature not applied to debian-minimal according to #8331. |
Technically, add
apparmor=1 security=apparmor
tokernelopts
.For Debian templates I don't foresee any issues. For Whonix templates I foresee even less issues. Other templates, no idea.
What is the plan regarding 'VM kernel by default'?
(I am not advocating either dom0 or VM kernel. Just asking.)
The text was updated successfully, but these errors were encountered: