mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3707] qBittorrent tray icon missing from notification panel when running it with firejail #2334
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#2334
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mYnDstrEAm on GitHub (Oct 28, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3707
The system tray icon of qBittorrent missing when minimizing it to the notification area
Bug and expected behavior
I get this in the console when starting qBittorrent with firejail:
Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol setorg.kde.knotifications: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOPNo profile and disabling firejail
firejail --noprofile /path/to/programin a terminal?I don't get these 2 outputs in the console and it minimizes to the notification area
Reproduce
Steps to reproduce the behavior:
firejail qbittorrentEnvironment
Debian 10 stable with KDE
Firejail 0.9.62
Additional context
The notification icon shows when running it without firejail
Checklist
https://github.com/netblue30/firejail/issues/1139)--profile=PROFILENAMEis used to set the right profile.@CodeArtisan00 commented on GitHub (Oct 28, 2020):
run with
ignore nodbus@rusty-snake commented on GitHub (Oct 28, 2020):
For the record:
ignore nodbusonly works for 0.9.62. In 0.9.64 either addignore dbus-user noneor set it tofilterand add talk rules.Tray-icon and native-notifications (there are multiple standards in the linux world, IDK how all of them work and which software implements which):
qBittorent may fail with that becaue it has no own rules and error-handling differs between "permission denied" on socket and "permission denied" inside dbus.
A hardened solution for 0.9.62:
@mYnDstrEAm commented on GitHub (Oct 28, 2020):
I ran
kate ~/.config/firejail/qbittorrent.localand added these two lines and it works now. Thank you!This should probably be added to the qbittorrent.profile.
However, I think that
ignore nodbusshould probably be replaced with allowing the notification tray icons in specific. You already listed relevant notification permissions. Before it's standardized better it should probably be done by firejail with something like "allow-tray".@rusty-snake commented on GitHub (Oct 29, 2020):
Hmm, qbittorent is a program which mainly deals with (untrusted) data from the internet. This means it has a high attack-surface (e.g. buffer-overflows while processing a bad packet can result in RCE). D-Bus is a good technology for sandbox-escapes. So just allowing all D-Bus is risky. Fortunately we have fine grained D-Bus access policies since 0.9.64. However a lot of D-Bus interfaces are still unsafe and
callrules are not maintainable without aliases. IMHO we should add a note for now.@mYnDstrEAm commented on GitHub (Oct 29, 2020):
That's why I'm wary of adding it (and I'm not sure what's being allowed when also blacklisting /run/dbus). But somehow qBittorrent and other apps with tray icons should work (completely) with firejail. Looks like Debian recently upgraded its used firejail version in backports to 0.9.64: is it now possible to allow tray-icons in specific? Does this mean that allowing notification area icons would still be unsafe with dbus (if so and if you know related dbus code issues please link them here; haven't looked into zeromq which is probably unlikely to be viable)?
@rusty-snake commented on GitHub (Oct 29, 2020):
/run/dbus/system_bus_socket is the socket of the system-bus which is mainly used for privileged things (NetworkManager, systemd, PackageKit, Bluetooth, ...).
Yes, you can install it and try the rules I posted above.
xdg-dbus-proxymust be installed.OT: I suggest to always use the backports version because it has newer features and the much more recent profiles.
It's not a bug in the D-Bus code. If you want it is a bug in the spec. The issue is that the most DEs populate all there objects/methods/interfaces on all names. Example on GNOME (<= 3.36.1) as I use GNOME and am more familiar but KDE should do the same IIRC.
dbus-user.talk org.freedesktop.Notifications(native notifications;notify-send) allows to take screenshots, install extensions (which are commonly used for spyware under linux), execute and shell command outside of the sandbox.IDK which of the names above are really needed and IDK if they safe under KDE, but based on my previous experience I classify all names as unsafe until I know better.
Using
dbus-{user,system}.callrules can be used to allow access only to specific functions/properties/signals. However, these rules are terrible to maintain until we have aliases.EDIT: and there are some reviews: https://github.com/netblue30/firejail/wiki/Restrict-D-Bus
@aminvakil commented on GitHub (Feb 25, 2024):
firejail 0.9.72-1 on Arch Linux on KDE Plasma 5.115.0-1 and qbittorrent 4.6.3-1
This works and no new permissions are necessary to add as mentioned in https://github.com/netblue30/firejail/issues/3707#issuecomment-717990844 :
Also for future readers like me, link has been moved to https://github.com/netblue30/firejail/wiki/Restrict-DBus .