mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2385] Firefox cannot play Netflix videos if started in firejail #1592
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#1592
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 @pianoslum on GitHub (Feb 1, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2385
OS: Arch Linux
Kernel: x86_64 Linux 4.20.6-zen1-1-zen
DE: XFCE4
WM: Xfwm4
CPU: Intel Core i5-4590 @ 4x 3.7GHz
GPU: GeForce GTX 970
firejail version 0.9.58
Mozilla Firefox 65.0
I upgraded firejail (0.9.56-1 -> 0.9.58-1) on Jan 28th and since I cannot watch Netflix videos (DRM) in firefox. When I load one, just the gray background is shown. When I close firefox, the process(es) stay open in the background so I have to kill them.
firejail --debug or journalctl show nothing suspicious.
The config I use is the standard config minus
norootbecause of https://wiki.archlinux.org/index.php/Firejail#Proprietary_Nvidia_driversIf I can do anything to help, I'll be glad to do so :-)
@smitsohu commented on GitHub (Feb 1, 2019):
Could you please try
firejail --ignore='noexec ${HOME}' firefox?Thanks.
@pianoslum commented on GitHub (Feb 1, 2019):
firefoxI guess ;-)And indeed this fixes the problem, thank you very much!
What could be the reason for this?
And should this option be dropped from the standard config then?
@smitsohu commented on GitHub (Feb 1, 2019):
Ya, that should have been
firefox, I've updated the comment for better clarity, thanks.The
noexecoption was improved in 0.9.58, so it behaves slightly different now.Good question. This is a rather annoying bug, we need to fix this somehow.
I wonder if there are concerns or reservations about an
execoption, to reverse the effect ofnoexec. Anyone?@damluk commented on GitHub (Feb 1, 2019):
What kind of threat is mitigated by
noexec homeanyway? If one does not trust the browser itself, thennoexec homedoes not add any security. So let's say we trust the browser. Is there a scenario in which a website offers a download and triggers the execution of the downloaded file without user intervention?@SkewedZeppelin commented on GitHub (Feb 1, 2019):
@smitsohu for now should we comment noexec home from both firefox and chromium -common.profiles? Along with some others like youtube-dl and spotify?
@netblue30 commented on GitHub (Feb 1, 2019):
They bring in an executable, save it in home or under /tmp and run it from there. All other system directories are read-only. We have noexec home and noexec tmp in most profiles. The change in this firejail version is we fixed a bug in noexec, so this time noexec really works (before it was broken).
I would say we need to get noexec home out of all browsers (maybe others like youtube-dl and spotify mentioned above). There are all kind of addons and plugins installed in user home directory, libraries form NVIDIA drivers and so on.
@damluk commented on GitHub (Feb 2, 2019):
Who is "they", and what is the concrete scenario of bringing in the executable and running it? I would appreciate a concrete example of an application run by firejail and the mechanism of downloading and running the executable.
For chrome and firefox, the worst configuration I can come up with, is to make them automatically open some content-type, e.g.
application/x-executablewith another application.noexechas no effect in that case. How can I configure chrome or firefox to set the executable flag on a downloaded file and directlyexecveit?@Vincent43 commented on GitHub (Feb 2, 2019):
Attacker exploits one of RCE vuln which are available in every[1] release[2] then download and execute malware in writable&executable dirs like
/homeor/tmp. This is exactly the same way as browsers downloads codecs to play drm content.[1] https://www.mozilla.org/en-US/security/advisories/mfsa2019-01/
[2] https://chromereleases.googleblog.com/search/label/Stable%20updates
In kodi case you may download malware plugin yourselves.
@damluk commented on GitHub (Feb 2, 2019):
I see, so this is about software vulnerabilities. In that case, an attacker would have control of parts of the execution environment of the application, so there are malicious things going on even before anything is written to disk. A clever shellcode dropper could grep through
/proc/mountsand look for a writeable, executable directory. If this pull request aims to introducenoexecexceptions, the dropper would find them. In the best case these would be readonly, but this would mean that the browser could not update or install plugins inside firejail.As a sidenote,
/run/user/$UIDis a candidate to drop more malicious code, already.@Vincent43 commented on GitHub (Feb 2, 2019):
We introduce exceptions to handle average users who have trouble figuring out why some functionality doesn't work. Experienced users who doesn't need those functionalities may undo those changes locally.
Perhaps we should block
XDG_RUNTIME_DIRit as well. Apparmor integration blocks execution from/run/user/$UID/homeand/tmpalready.@smitsohu commented on GitHub (Feb 2, 2019):
Probably
noexec ${RUNUSER}can be added to most profiles without pain.But there is also always
/dev/shm, and we would have to decide app by app if it can be mounted noexec or not.EDIT: I just realize that
/dev/shmas well is not executable under Apparmor.@Vincent43 commented on GitHub (Feb 2, 2019):
Ideally we could add:
in
disable-common.incand addignore noexec xxxin apps profiles but it may be too much burden.Yeah, Apparmor uses whitelist so failing safe is easier there 😄
@smitsohu commented on GitHub (Feb 2, 2019):
Small remark:
/var/tmpis hard-coded noexec,and if I see it right there is currently no way around.