mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2143] Harden against thumbnailer exploits etc. #1454
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#1454
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 @curiosity-seeker on GitHub (Oct 7, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2143
Some weeks ago Tavis Ormandy published several vulnerabilities in the postscript parser of ghostscript. They have been fixed in v. 9.25.
One possible attack using those vulnerabilities is creating thumbnails (via evince in Gnome or okular in KDE). That's why thumbnailers are now sandboxed in Gnome with bubblewrap (unfortunately not in KDE AFAIK).
One interesting aspect was that Jann Horn found that AppArmor did not protect against this exploit. As a consequence some AppArmor profiles/abstractions were modified.
So as one addtional rule I would suggest to add something like
read-only @{HOME}/.local/share/thumbnailersto disable-common.inc.
I'm not sure if this is sufficient. The general problem seems to be that a lot of the tools make use of applications with questionable security like ghostscript. A similar example was what Chris Evans published 2 years ago regarding gstreamer and tracker. Okay, there is a Firejail profile for tracker but ...
It's nice to know this problem does not exist for baloo.
Anyway, I wonder if the protection against these types of (potential) vulnerabilities can be improved. I'm afraid they are one of the biggest holes in Linux DEs.
@smitsohu commented on GitHub (Oct 7, 2018):
On KDE run sandboxes with
--nodbus, if possible. Then a thumbnail slave runs in the same sandbox as the application that demanded it, which is probably what you want.Unfortunately this trick doesn't work with Dolphin, which would need it the most. Personally I've just turned the thumbnailing off in Dolphin. Also we can't enable
--nodbusby default across the board, as it breaks older KDE installations.On a side note, and unrelated to Firejail, I wonder if it would be possible to work out a tailored sandbox for KIO thumbnail slaves using Apparmor.
Absolutely. Do you want to send a pull request?
@curiosity-seeker commented on GitHub (Oct 7, 2018):
I have KDE Plasma 5.13.4 and KDE Frameworks 5.48.0 here on Fedora. So it should be possible to add
nodbusto globals.local, shouldn't it?Thanks - good hint!
I think it should. Part of the problem might be that Ubuntu is using Gnome. On the other hand, openSUSE's Christian Boltz is in the Apparmor team, and openSUSE is using KDE as default DE. So perhaps there will also be changes for KDE ...
Done.
@curiosity-seeker commented on GitHub (Oct 7, 2018):
Just a remark regarding tracker: There is no doubt that it makes sense to sandbox it with Firejail. But as it stands, scarcely anybody will do it.
So ... shouldn't we think about offering an option during the installation routine of Firejail to create a simple systemd unit file in /etc/systemd/system ?
@Vincent43 commented on GitHub (Oct 7, 2018):
Implementing something for one app doesn't look good for me. There is systemd.exec for sandboxing systemd services.
@curiosity-seeker commented on GitHub (Oct 8, 2018):
I understand your reluctance. However, some counterarguments:
I'm not saying that this should be done at all costs. I'm just trying to present some arguments as a basis for brainstorming that might lead to possible enhancements.
@Vincent43 commented on GitHub (Oct 8, 2018):
Offering profiles doesn't add any security on its own, it only make firejail easier to use than similar apps which don't come with that many profiles.
So, installing units with full systemd.exec sandbox would be even better thing to do but out of scope for firejail. Manipulating systemd units is IMO too much interference in host system.
In text you linked it's stated: just prefix your application with “firejail” and run it. There isn't just install firejail and be secure promise. Also there is no such thing like "optional" install. It may be an option to
firecfgbut how those not-so-skilled home users will find it then? How you will resolve conflicts with systemd.exec, apparmor, selinux, etc?@Vincent43 commented on GitHub (Oct 10, 2018):
Adding to the above:
We couldn't just replace systemd units as those may differ across distros. Overriding
ExecStarthas the same concern as there may be different arguments passed.The risk to create random breakages is too big for that route..
@Vincent43 commented on GitHub (Oct 16, 2018):
Closing as
read-only @{HOME}/.local/share/thumbnailersis done and there is nothing else to do.