-
Notifications
You must be signed in to change notification settings - Fork 588
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
profiles: loupe: harden and disable apparmor #6333
Conversation
I don't see how a permissive profile is worse than no profile. That is defeatist. |
The usual distinction between a more vs less permissive profile is whether it I can't think of any profile for a common GUI program that allows a hole as big Also, imagine if we ended up with a significant number of profiles that do next |
but loupe is already special cased as it already aggressively sandboxes each decoded image into its own sandbox and again, I didn't use disable-common because it seems to directly conflict with it invoking bwrap |
After actually installing and testing loupe I think we can accomodate both sides of the arguments/security considerations. Let me explain by going over my observations. [1]
We need to fix this. [2] We can [3] Additional hardenings I've tested succesfully: [4] Adding Here's my hardened loupe.profile. Hope this helps to clear up some of the pain-points in both PR's. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #6333 (comment).
The profile currently does not include disable-common nor makes `${HOME}` read-only, so the program can simply write to ~/.bashrc directly[1]. disable-common.inc was commented due to it apparently breaking bwrap. As discovered by @glitsj16, it seems that allowing the bwrap binary is enough to make it work (and that apparmor breaks loupe)[2]. So disable apparmor, allow bwrap and include disable-common.inc, plus other hardening by @glitsj16. This amends commit 9a0db13 ("profiles: add loupe", 2024-04-30) / PR netblue30#6327. [1] netblue30#6327 (review) [2] netblue30#6333 (comment)
Thanks for the testing! Updated the PR with most of your changes. Now the profile seems pretty good. @SkewedZeppelin Thoughts? |
Unfiltered access to the session-bus is a hole as big as writing to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The profile currently does not include disable-common nor makes
${HOME}
read-only, so the program can simply write to ~/.bashrcdirectly[1].
disable-common.inc was commented due to it apparently breaking bwrap.
As discovered by @glitsj16, it seems that allowing the bwrap binary is
enough to make it work (and that apparmor breaks loupe)[2].
So disable apparmor, allow bwrap and include disable-common.inc, plus
other hardening by @glitsj16.
This amends commit 9a0db13 ("profiles: add loupe", 2024-04-30) /
PR #6327.
[1] #6327 (review)
[2] #6333 (comment)