mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #950] Add KDE's konsole to blacklisted terminal emulators #646
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#646
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 @RalfJung on GitHub (Dec 1, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/950
disable-commoncontains a bunch of blacklisted terminal emulators, but KDE'skonsoleseems to be missing. When I runfirejail konsole, I get full access to all files because KDE applications are started via D-Bus and hence run outside of the jail. Clearly this is a more general problem that can only be properly solved by firewalling D-Bus, but for now, adding konsole to the terminal emulator blacklist indisable-commonwould at least block the trivial exploit.I added the following line locally:
@valoq commented on GitHub (Dec 1, 2016):
When I start kde application in Kubuntu 16.10 via konsole they are jailed as expected.
Please provide more info on how to reproduce the issue.
Applications that are started by dbus or systemd (gnome) are an issue. I think we need to do something in that regard as well. However I don't know much about dbus yet other then that it provides no security measures for isolation.
@RalfJung commented on GitHub (Dec 1, 2016):
I am running in a KDE session in Debian testing. When I do
firejail konsole, and then I dols ~/*, I can see all folders. I thought they should all be hidden because all of them except for my downloads folder are hidden inside afirejail firefox. But indeed this is not specific to konsole,firejail bashcan also see all these folders. I guess the actual problem is that I did not yet understand why for some profiles, all folders in my home directory are hidden by default, whereas for others, they are shown by default.Other KDE applications however do break the jail, e.g.
firejail dolphincan access files in~/.ssh.@valoq commented on GitHub (Dec 1, 2016):
That should definitely not happen.
I can reproduce the issue and I assume other kde applications are affected as well.
The issue with dolphin is that it triggers certain sub-processes like file.so which are started by kdeinit5 outside of the jail.
A similar issue exists here #934 with gnome applications.
@netblue30
It seems firejail needs a way to handle request via dbus and systemd to be effective with gnome and kde applications as well as possibly others.
At the moment the only way is to isolate IPC completely which breaks many applications.
It would probably be best to force certain service applications like kdeinit5 to be automatically started separately inside the sandbox and block request to outside processes.
@curiosity-seeker commented on GitHub (Dec 1, 2016):
This is not surprising. In Firefox you can only see the folders which are explicitly whitelisted. However, there are no profiles for konsole and bash. Hence, if you execute them with Firejail the
default.profileis applied which only blacklists the stuff contained in the included *.inc files.@RalfJung commented on GitHub (Dec 1, 2016):
That doesn't seem to be entirely correct; for example, I can see
/mnt/storein Firefox which is where I mount by HDD (with$HOMEbeing on an SSD).So far, I have not figured out when exactly firejail switches to "whitelist mode"...
@curiosity-seeker commented on GitHub (Dec 1, 2016):
It switches to whitelist mode if that command is used in the respective profile. I was talking about your home directory.
If you input
file:///home/<username>in the Firefox address line you'll see which folders are accessible in your home - those are the files/folders whitelisted in firefox.profile. But /mnt is outside of home so the whitelist rules do not apply. On the other hand, in the included *.inc files there are no blacklist commands regarding mnt. If you want to blacklist it you have to add an appropriate rule yourself.
@RalfJung commented on GitHub (Dec 1, 2016):
Ah, I finally found the explanation:
So doing
whitelistfor anything in/homeenables whitelist mode for/homeonly. Understood.Lucky enough,
/mntis in that list too, so I can also enabled whitelist mode for it. If I was using another (non-standard) top directory I guess I would have been out of luck?Anyway, this bug can be closed. Thanks for your quick replies!