-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Should simple setcap/setuid modules be kept in NixOS? #50480
Comments
- programs.wireshark
A good example, I guess, especially given that best practice is probably tcpdump for straightforward privileged capture and wireshark (maybe even sandboxed) for dissection of packets without fear of One More Wireshark Dissector Bug leading to something bad done as root…
|
That's actually a sort of terrible example. Basically because what you just described is how many people would go about it - either security.wrappers.dumpcap = {
source = "${wireshark}/bin/dumpcap";
capabilities = "cap_net_raw+p";
owner = "root";
group = "wireshark";
permissions = "u+rx,g+x";
}; Wireshark does not run as root, the program Speaking more generally: I would say keep the setcap wrappers as they are better than sudo or setuid and slightly more difficult for users to add. Dropping setuid wrappers seems fine though, especially if there's a configuration error that tells you how to add them yourself for the transition. |
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:
|
Issue description
There's quite a few NixOS modules that do nothing more than set up a "security.wrappers" configuration for a single binary. This seems like a bad idea to me. My concern is that it obscures what is going on behind the scenes from the user. When you enable these modules, it is not exactly clear what it is doing. Having users explicitly make these programs setuid via the
security.wrappers
interface seems like the best policy. Given the very serious security concerns, I want users to know very clearly what they are making setuid/setgid. Almost all of these programs will work just fine viasudo
invocations.From just a maintenance perspective, this also feels like it could lead to potentially buggy or insecure modules. Here is a full list of some of the modules I am talking about:
The text was updated successfully, but these errors were encountered: