-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
rust/cargo apparmor profile #621
Comments
Here's the profile for rust/cargo
Updated version will be hosted at https://github.com/bf/rust-security-problems/blob/main/apparmor-cargo.conf |
This program (and by extension any building program) are a program that usually should not be confined using MAC policies. To sum up:
|
I need Rust utilities too and created a very rough profile for them. My take on the situation is that there are different ways to isolate programs and processes (as opposed to user isolation which is already in Unix) on Linux. Since the issue is young, it's hard to tell the shape of the future system. The current version of AppArmor has limitations comparing to user namespaces (example). But user namespaces aren't widely deployed. Another issue is that source and target code paths can only be defined by the root. You defined them for yourself. I don't have
Actually, there were a couple of discussions. Hence Alex restricts what goes into this repository. You'll need your own repository if you believe in this application of AppArmor. |
Yeah, I'd need to fork this repo because there are so many oddities around chromium/thunderbird profiles for which I had to customize apparmor.d rules. Obviously we all fight the apparmor.d restrictions (e.g. umlaut handling...) so we're all trying to do what we can. The cargo rules actually work quite well at this point, and the malicious payloads I've showcased for rust can be mitigated with this approach. Feel free to look at https://github.com/bf/rust-security-problems/blob/main/apparmor-cargo.conf if you're interested. I'm a bit allergic to this "if it's not 100% secure we wont bother implementing it" approach because we're talking about a single layer in a defense-in-depth approach here to catch the most basic malware. While linux is very robust out of the box, the security controls for everyday users can be improved quite a bit :) Closing this issue because maintainers won't implement. Thanks for your input! |
This is not my approach at all (I will expand more on this once the full security model will be out). My main concern here is that:
This can be easily fixed thanks to the use of the
Can you tell us more? |
I noticed that that rust/cargo provides basically unrestricted access for third-party modules from crates.io not only at compile time but also when doing things like
cargo doc
.Therefore I'm building an apparmor profile for cargo/cargo-fmt/cargo-clippy/rustc/rustfmt/rustdoc binaries.
Do you think this is in scope for this project? Should I create pull request for this?
The text was updated successfully, but these errors were encountered: