modif: allow userns in firejail-default apparmor profile#7080
modif: allow userns in firejail-default apparmor profile#7080cobratbq wants to merge 2 commits intonetblue30:masterfrom
userns in firejail-default apparmor profile#7080Conversation
5967565 to
9c7189d
Compare
userns to firejail processuserns in firejail-default apparmor profile
kmk3
left a comment
There was a problem hiding this comment.
IIUC, adding
usernsto the AppArmor-profile for firejail is effectively the
same as previous AppArmor without this addition, because it only recent got
to being managed. It effectively allows user-namespaces thus deferring to
firejailto determine whether to continue to allow it.Nice, since this makes the profile work the same as in AppArmor 3, sounds
good to me.Assuming that this
abi/4.0indicates a "language" version, thus available
keywords, then AppArmor 3 would likely reject the profile, but would do so
already. (I'm guessing as to its meaning, so I'm not 100% sure.)
Judging by #6675, AppArmor 4 seems to be relatively recent, so I'd expect many
systems to still be using AppArmor 3.x.
If the current profiles work in AppArmor 3.x but fail with this change, then it
might be better to avoid it for now.
Can you test with AppArmor 3.x to confirm what happens?
AIUI firejail itself uses a very permissive apparmor profile |
I'll see if I can check a couple of things. We may be able to define profiles with a Converted to draft to reflect the open issue. |
Good catch. Maybe AppArmor 4 assumes So if we just add Edit: That is, just for the sake of fixing the user namespace support (and the Then we could add a specific profile for 4.x, etc. |
|
Some AppArmor notes:
|
|
Thanks @cobratbq. It seems to be working fine on Debian stable, but let's wait until next week. We have a new release coming over the weekend, we'll merge it in after that. |
So, I'm not sure what the desired solution is for the profiles? I don't think you can write one profile version, so you would have to conditionally package one conditional on AppArmor version. That's been bugging me a bit. On another note: Well, if that's in place. Any chance you can check out running Firefox without
Apparmor ends up in a mixed-mode setup of Firejail |
Add
usernsto the AppArmor profile for firejail, such that with AppArmor enforcing restrictions, firejail is granted sufficient permissions to exert full control over the capabilities and permissions it is managing.Fixes: #7078
firejailchild-process would likely be subjected to some influence from apparmor, or not?The open question should not matter more/less specifically for this patch.