mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3148] firejail allows wlr-screencopy by default #1979
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#1979
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 @GovanifY on GitHub (Jan 15, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3148
Wayland theoretically adds on protection between applications so that they can't snoop on each others. Unfortunately the wayland standard willingly does not define ways to implement screenshots, and as such window managers are left to implement it on their own.
sway currently implements the wlr-screencopy protocol, which is enabled by default in every jail definition I can think of.
Here is an example: Let us assume I'm using this jail definition for mutt
This jail is pretty tightened already and should not be able to look at the user's screen, as it's a command line mail client.
But a "sandbox escape" if we can call it this way is possible by simply replying to any mail, which starts up your editor, in my case vim, and execute the command
:!grim ~/.config/mutt/screenshot.pngNB: this config is actually more tightened than the standard mutt one except for interpreters, as it uses a whitelist
As such I believe we should add an option into firejail configuration to disable certain wayland protocols and add it to every jail default, enabling it on a need-basis(not a lot of programs should need to screenshot your screen, hopefully)
@rusty-snake commented on GitHub (Jan 15, 2020):
Does grim work if you add
blacklist ${RUNUSER}/wayland-*?FWIW:
gnome-screenshotworks withblacklist ${RUNUSER}/wayland-*(under GNOME/mutter), because it uses D-Bus.firejail --nodbus gnome-screenshotstops it.@GovanifY commented on GitHub (Jan 15, 2020):
grim doesn't work this way, but this is hardly a solution as this would block any wayland communication, correct? In that case any GUI would also fail to run. I believe we would need some kind of protocol filtering in place, but this blacklist indeed helps for any non graphical application
@GovanifY commented on GitHub (Jan 15, 2020):
Also I just realized but this ends up being possibly unwanted too: it breaks wayland copy-paste functionnality from inside the sandbox. If your vim interacts with your wayland clipboard then all of this will be broken
@mat8913 commented on GitHub (Aug 22, 2020):
I don't think there's much firejail can do here. If wayland compositors decide to implement extensions, then it should be up to those compositors to implement them securely.
It looks like sway used to have a way to restrict which applications could use these extensions (see
d9a08b7a9d/sway/sway-security.7.txt), but that feature has since been removed for some reason.@rusty-snake commented on GitHub (Sep 1, 2020):
I think @mat8913 it right, we can not do anything here. Closing.