mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2936] Firefox and Thunderbird profiles broken #1833
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#1833
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 (Aug 30, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2936
Sorry - I haven't had the time to investigate the details.
But commenting
seccomp.dropinfirefox-common.profilefixed the problem. So it seems that it is caused by the recent seccomp commits.@veloute commented on GitHub (Aug 30, 2019):
can confirm the recent sccomp commits are causing issues with a lot of other profiles than just firefox and thunderbird.
@curiosity-seeker commented on GitHub (Aug 30, 2019):
Yes, indeed: kate, quiterss, ...
@corecontingency commented on GitHub (Aug 30, 2019):
It is weird, because at least for me it is intermittent. When I first boot up, it doesn't work, however, tor-browser profile works just fine, and then once that is opened, the firefox profile works fine too, even if tor-browser is closed first!
Teamspeak is broken anytime you try to change the options though...
Both problems are fixed by commenting out the seccomp lines.
@corecontingency commented on GitHub (Aug 30, 2019):
Looks like the problem is @resources, if I replace @resources with what is supposed to be equal to (mbind,migrate_pages,move_pages,set_mempolicy), then both firefox and teamspeak work.
@curiosity-seeker commented on GitHub (Aug 30, 2019):
I don't think that this explains the problem completely. The 2 other examples mentioned earlier (quiterss and kate) only contain the
seccompline in their profiles.@corecontingency commented on GitHub (Aug 30, 2019):
Sorry, don't think I was being clear. Writing
seccompin a profile is exactly the same as writingin a profile. So I found that
@resourcesis the problem. Writingmbind,migrate_pages,move_pages,set_mempolicyis supposed to be the same as writing@resources, but it seems that something in the most recent commits messed this up, and replacing@resourceswith the constituent parts fixes the problem.So replace
seccompwithin your profiles and everything works fine. Just tested it with kate and quiterss and they work too.
EDIT: the guide for writing
seccompis here.@rusty-snake commented on GitHub (Aug 30, 2019):
Diff of
@resourcesinAdd further seccomp groups:ce4a323147 (diff-d36eaba912802a78468359b7b05c8c2dL358-R1053)New syscalls in
@resources:ioprio_set,nice,sched_setaffinity,sched_setattr,sched_setparam,sched_setscheduler@curiosity-seeker @corecontingency can you look in your
jouralwith syscall is the issue.BTW: syscalls.txt is now outdated, I will update it this weekend.
@rusty-snake commented on GitHub (Aug 30, 2019):
I just start firefox and close it (nothing tested, nothing broken). From my journal, the following should work. Can you guys confirm.
seccomp !chroot,!sched_setaffinity,!sched_setscheduler@corecontingency commented on GitHub (Aug 30, 2019):
Yup, although I don't think you need to remove sched_setaffinity. Firefox (and the other three programs) can work with it, at least on my system. Tried kate, teamspeak, and quiterss with their normal
seccompvalues but replaced@resourceswithand they worked fine. So, seems like
sched_setscheduleris the culprit, at least for those three programs.Also, will syntax like
be implemented in the future? Seems like a much better way of doing things.
@rusty-snake commented on GitHub (Aug 30, 2019):
It was logged in the journal.
It is implemented. Implementation in firejail: #2926, use in profiles: #2927.
@corecontingency commented on GitHub (Aug 30, 2019):
Oh. Looks like I need to recompile firejail. I'll try it out!
@corecontingency commented on GitHub (Aug 30, 2019):
So getting a weird error here.
seccomp !chroot,!sched_setaffinity,!sched_setschedulerdoesn't seem to work after recompiling firejail with firefox, the process just hangs after reportingmonitoring pid 12, and nothing show up insudo journalctl -fexcept forTried running
seccomp !sched_setschedulerwith Kate, andseccomp !chroot,!sched_setschedulerwith teamspeak and it works fine, no errors or messages in journalctl, so it seems to be just a problem with firefox.Weirdly, I ran the exact same thing for firefox, except using
seccomp.dropwith defaults excludingchroot,sched_setaffinity,sched_setschedulerbefore recompiling and firefox worked fine. Now, whether I write it using the new syntax or the old, firefox doesn't work.@corecontingency commented on GitHub (Aug 30, 2019):
Okay, so I think something new added to
@privilegedis causing me trouble. Tried running firefox withwhich is
@default(including new version of@resources) withchroot, andsched_setschedulerremoved, and@privilegedreplaced withwhich is what it used to be equal to (except
chroot). This seemed to run firefox fine, and no errors were logged insudo journalctl -f.Going to take a look at what was added to
@privilegedto try and narrow this down. For reference, am running Arch/KDE with wayland.@corecontingency commented on GitHub (Aug 30, 2019):
Got firefox to work with no errors in
sudo journalctl -f, and played around with the settings and went to some websites, so I think it is working. UsedWith capset enabled, it would start, but always thought it needed to reboot because of an update. With quotactl, setuid, and setuid32 enabled, it would just hang, and fail to start.
EDIT: Maybe we also want to disable sched_setaffinity if you were having trouble with it. What distro are you running?
@smitsohu commented on GitHub (Aug 31, 2019):
There is the more generic issue that
firejail firejaildoes not work because it wants to drop privileges (should besetresuidon most systems).@rusty-snake commented on GitHub (Aug 31, 2019):
@corecontingency
sched_setscheduler,sched_setaffinityare the only blocked syscalls on my system (fedora + firefox esr 60), but I see no breakage when they are blocked.For better debuging I modify my script from #433
@rusty-snake commented on GitHub (Sep 1, 2019):
mpv:
seccomp !sched_setscheduler,!sched_setaffinity@corecontingency commented on GitHub (Sep 1, 2019):
Just tried it out and it is broken by default, but works fine with just
seccomp !sched_setscheduler.For some reason nothing was printed to
sudo journalctlat all about firejail, or mpv when it failed to open using justseccomp. Now I am worried that my kernel isn't logging for some reason. I know it is logging some stuff, b/csudo journalctlis constantly printing these messages every 5 or so seconds:This might explain why I can run
seccomp !sched_setschedulerand not include!sched_setaffinityfor some stuff and not see any errors tosudo journalctl, b/c my journal isn't working. Alternatively, it could be some distro difference, and I actually don't need!sched_setaffinity.I need to figure out what is going on with my kernel log levels.
Do you want me to add mpv to my pull request, or are you going to add it directly to the repository?
@Vincent43 commented on GitHub (Sep 1, 2019):
I think amount of breaks is too big and it's just tip of the iceberg as nobody tested most of the apps yet. If the new default seccomp filter needs so much exceptions then it's not suitable default and should be reverted.
@rusty-snake commented on GitHub (Sep 1, 2019):
@corecontingency,
Same for feedreader [EDIT]
!sched_setaffinity,!sched_setscheduler,!fchown[/EDIT]Go ahead, but as @Vincent43 say: probably it is the best to revert some of the changes in seccomp.
Draft for syscalls.txt update: https://gist.github.com/rusty-snake/3dd58fb2f0087c8b64dc306beadd612f
I will commit it until the double include (see #2928) and the potential partial-revert are clarified.
@corecontingency commented on GitHub (Sep 1, 2019):
At minimum
!sched_setscheduler,!sched_setaffinityshould be removed from@resources, as that seems to be necessary for most programs to both actually work, and run with no errors tojournalctl, respectively.I am going to be leaving my pull request up until
seccompis fixed, for reference, in case someone is using a version compiled from github and wants to get some programs working again.@corecontingency commented on GitHub (Sep 6, 2019):
I think we are good to close this one, unless anyone else has problems. Firefox and thunderbird are fixed for me!
@rusty-snake commented on GitHub (Sep 7, 2019):
@corecontingency yes, should be fixed with #2939.