-
Notifications
You must be signed in to change notification settings - Fork 569
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
access to the system DBus #3184
Comments
I wonder if we could bring in xdg-dbus-proxy integration for fine grained dbus access control instead of all or nothing. |
Sure we should. However this is a lot more work and blocking the system-bus works for almost all programs and prevents them from doing "privileged" actions. |
Would it be possible to enclose a session bus within a jail with other applications, so that they can use it without interfering with applications and session busses outside the jail? |
I did some experimenting, and it is possible with some additional firejail protections on /run and setting XDG_RUNTIME_DIR to launch dbus-launch --exit-with-session icewm-session into a x11=xephyr firejail container. Some testing shows that the session dbus inside the jail works. Anyone seen this configuration before? Tested a bit with dbus-monitor --session, and it does seem that the session dbus in the jail and the one outside are separate and keeping their distance, with apps that would normally fail in a nodbus jail now working. Cool! |
untested: |
I have experimented with |
@ned64 |
@Vincent43 Provided we had a convenient way to run I am tempted to implement |
@kris7t if we implement it compatible to flatpak we will be able to add restricted dbus to the most commonly used program-profiles by using the permissions from flathub. I could write a script to automate this. |
@jonleivent
then bind |
It would be perfect to have a dbus proxy. I would use a whitelist approach so that all (and new) services are blocked by default. These simple things could also be done with |
@ned64
the with-network one has (mostly tested with firefox):
|
Ideally apps would own their namespace + portal access and the rest would be granted per profile. Maybe more relaxed |
@Vincent43 Then, building on the same infrastructure as So the basic configuration would be something like
while each application with bus access least contributes a The system above has an advantage of being compatible both with existing profiles, and Flatpak premissions ( Of course, a much simpler approach, like So one plan of action would be
1, 2, and 3 looks fun enough (although I unfortunately cannot give an ETA, should I find the time to work on them), while 4 may require extensive testing before it can be released. |
I personally needed to add
You are whitelisting Anyway, I didn't manage to run
Whitelisting |
Maybe we want |
Sounds good. How can I help? |
I started working on DBus proxying in my fork: https://github.com/kris7t/firejail/tree/dbus-proxy For now, the user and system buses can be blocked separately by |
Thanks @jonleivent for bringing #3078 up.
Current situation:
Profiles with
nodbus
have no access to/run/dbus/system_bus_socket
, profiles withoutnodbus
have access. The must profiles withoutnodbus
didn't have it because they need access to the session-bus.Proposed change (soft):
Adding a
nodbus.system
option. If only this option is specified, the program can access the session-bus but not the system-bus.Proposed change (hard):
Firejail blocks system-bus access by default, unless an allow-system-dbus-access option is specified.
The text was updated successfully, but these errors were encountered: