-
Notifications
You must be signed in to change notification settings - Fork 166
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
Update Systemd security settings #719
base: main
Are you sure you want to change the base?
Conversation
7eade14
to
9905e40
Compare
9905e40
to
f2e3366
Compare
We can not do this, at least not by default for everything. Especially not ProtectSystem. Still, I think adding an exception to Fedora's policy for PK would make more sense, as it literally can not function with any hardening enabled. |
To be clear, there isn't a Fedora policy that mandates any of this. The change proposal is explicitly about enabling settings on a service by service basis. If PackageKit can only accept some subset of these things that's perfectly fine. If none of this will work at all, we can close it out |
I think we can potentially allow things like I also do not see much of a point in restricting access to the system for a daemon which runs as root and literally has the ability to replace the current shell or install any suid-root binary into /usr/bin by design. |
I have turned off the settings you were concerned about. Let me know if you want to consider the rest. If you don't see value in adding any restrictions upstream, I can close it out as well and mark this PR as entirely rejected. |
I am mostly concerned that I can't estimate the impact of this given how many backends PK has and how much stuff packages do, while at the same time not seeing the benefit of guarding some things for a daemon that can literally replace your entire OS by design. |
As part of https://fedoraproject.org/wiki/Changes/SystemdSecurityHardening which has been approved for Fedora 40, I am working on updating Systemd services to add additional hardening settings, please review this PR and let me know if you have any feedback. If you have a list of directories that this service must be able to write to, I would like to add it an allow list and turn on ProtectSystem fyi.
https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html has detailed information on each of these settings including the version of Systemd where they were introduced.