mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1765] Firefox 60+ fails to run content processes #1197
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#1197
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 @johnp on GitHub (Feb 7, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1765
Firefox Nightly doesn't seem to be able to start child processes / no tabs loading websites (except
about:-stuff, which AFAIK runs in the parent process), crashing them instead:https://crash-stats.mozilla.com/report/index/288d3c2b-c0be-4a85-af97-b294f0180207
I suspect bug 1401062 to be the issue, but don't know how to debug further.
firejail latest master / 0.9.53 on Fedora 27, works with
--noprofile.@smitsohu commented on GitHub (Feb 7, 2018):
Thanks for your report. Could you please check briefly if it works when you replace
seccompin /etc/firejail/firefox.profile with the longseccomp.dropline from qutebrowser profile?@johnp commented on GitHub (Feb 7, 2018):
No, doesn't work, but I just saw that a
fresh firefox profile works fine. I'll check my preferences to see what's triggering the issue...@johnp commented on GitHub (Feb 7, 2018):
I verified via mozregression that bug 140162 is the issue. (pushlog)
Ok, now I tried again several times and a fresh profile doesn't work either, but
--safe-modedoes.@SkewedZeppelin commented on GitHub (Feb 7, 2018):
We'll probably eventually need to remove
seccompand addcaps.keep sys_chroot,sys_adminlike chromium.profile as mentioned in #1414.@smitsohu commented on GitHub (Mar 17, 2018):
It seems that three options are causing problems:
noroot,seccompandapparmor. They work just fine in some distributions (Arch, Debian) and are breaking Firefox in others (Fedora, Ubuntu), depending on how distributions handle unprivileged user namespaces.@johnp Can you please comment out these lines in your Firefox profile and give it a try? Instead of disabling
seccompaltogether, you can also replace it with this long line:If you want to double-check: Adding
chrootto theseccomp.dropline should crash Firefox again.@johnp commented on GitHub (Mar 18, 2018):
@smitsohu Yes, works with
noroot,seccompandapparmorcommented out and with theseccomp.dropline together withnorootandapparmorcommented out. Addingchrootmakes Firefox unusable again.@m0n5t3r commented on GitHub (Mar 23, 2018):
on Ubuntu 16.04 (and firejail 0.9.52 from ppa:deki/firejail) I had to drop pivot-root from the seccomp line above (original issue: I was seeing blank windows, closing them didn't end the firefox program, but it would crash later in libmozsandbox.so - I assume it does some sort of chroot-ing on its own and needs that capability).
it works for me with noroot in there, btw. (and there is no apparmor line in my version of firejail)
@smitsohu commented on GitHub (Mar 23, 2018):
Thanks @m0n5t3r for the data point.
With regard to the Apparmor policy: Firefox crashes when it can't write to /proc/[pid]/uid_map, gid_map or setgroups.
@Vincent43 commented on GitHub (Mar 23, 2018):
That never happened to me. Is this new nightly thing?
@smitsohu commented on GitHub (Mar 23, 2018):
@Vincent43 Yep, it's only Nightly (for now).
@Vincent43 commented on GitHub (Mar 23, 2018):
Ok, we can fix it with adding
owner /proc/[0-9]*/{uid_map,gid_map,setgroups} w,to firejail apparmor profile.@smitsohu commented on GitHub (Mar 29, 2018):
Someone an idea why
norootis breaking it?It seems the user mapping goes a wrong waywithnoroot, /proc/[firefoxPID]/* files are not owned by the user but by nobody inside the sandbox. EDIT: That might also be the reason whyshell noneis causing problems in #1847. Actually both options seem to break Firefox only jointly.Another question is if this should be fixed in nightly/dev profiles, or directly in firefox-common.inc.
@Vincent43 commented on GitHub (Apr 5, 2018):
I think we should remove
noroot,seccomp,shellfromfirefox-common.incotherwise it will be broken again after firefox 60 release (firejail releases are't that often).@smitsohu commented on GitHub (Apr 5, 2018):
It should be sufficient to either disable
norootorshell none, I guess we have a choice here. Also since most ofseccompworks well, how about aseccomp.dropline in firefox-common?Btw, I still see problems only with chroot and have not been able to replicate the issue with pivot_root yet. Maybe I'm missing a condition?
EDITED: @Vincent43 but yes, I would agree to fix directly in firefox-common. palemon and basilisk could then get their own profiles without redirection.
@Vincent43 commented on GitHub (Apr 5, 2018):
I don't think
seccompis worth to keep when firefox rolls its own seccomp filter (and this is probably reason why it's breaking). We can trust upstream knowing which calls should be allowed. We don't use it in chromium profile already.In my understanding
norootbehavior differs on various distros (on some doesn't cause problems) so maybe disablingshellis better option.@Fred-Barclay commented on GitHub (Apr 5, 2018):
I'd prefer to have at least
seccomp.drop. We may have to get rid of it entirely some day for Firefox, but for now I think we ought to keep seccomp around in some form.We should probably drop
shell noneinstead ofnoroottoo. We can always control exactly which shells are present, and what can be called through them, withprivate-bineven withoutshell none.@smitsohu commented on GitHub (Apr 5, 2018):
seccomp.dropshould still be useful since the Firefox parent process runs without any sandbox AFAIK, similar to the situation with Chromium.Mozilla has spoken out against a SUID sandbox because it breaks support for downloading and running Firefox as a regular user, without installation, something Chromium has never attempted to support. As a consequence,
seccomp.dropshould do the job also in the foreseeable future.+1 for disabling
shell none.@Fred-Barclay commented on GitHub (Apr 7, 2018):
This should hopefully be fixed in upstream now.
seccompwas replaced with the string @smitsohu provided in https://github.com/netblue30/firejail/issues/1765#issuecomment-373925382After a brief discussion,
pivot_rootwas left in as neither @smitsohu nor I were able to reproduce any issues with it (I tested firefox nightly and beta on Mint 18.2).shell nonewas also commented out.@pizzadude commented on GitHub (Apr 9, 2018):
@Fred-Barclay it isn't fixed for me
I had to fix it manually, by commenting out:
nogroups
and possibly:
noroot
apparmor
(but not sure if those need to be commented out)
and disable-mnt because i have downloads folder in /media but that's unrelated
and this is on debian sid with firefox nightly and firejail latest git
Edit:
After testing again, it turns out I need to disable a few more settings, but I don't know which ones, so it looks like this:
https://pastebin.com/raw/GQx3BVyA
(there's more to the seccomp line, but it's truncated because i copy/pasted from nano)
which ones are the most important security wise?
@Fred-Barclay commented on GitHub (Apr 9, 2018):
@pizzadude we had to change a few other settings for apparmor. Can you build from the latests source and test again?
Thanks!
Fred
@pizzadude commented on GitHub (Apr 10, 2018):
@Fred-Barclay
It works fine when I comment tracelog out. It seems tracelog is the culprit. I'm not sure why. (not a programmer)