mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2681] gimp: failure due to seccomp (needs mbind syscall) #1689
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#1689
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 @carloabelli on GitHub (May 7, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2681
Gimp 2.10.10 fails to load (hangs without any output).
Firejail version 0.9.58.2 on Arch Linux. Runs fine with
--noprofile. Disablingseccompingimp.profilefixes the issue.@SkewedZeppelin commented on GitHub (May 7, 2019):
I cannot reproduce this.
Are you using the proprietary NVIDIA drivers? or AppArmor?
@carloabelli commented on GitHub (May 7, 2019):
@SkewedZeppelin Using AppArmor
@smitsohu commented on GitHub (May 8, 2019):
Does
sudo journalctl | grep syscallreturn something? Or do you see other messages related to gimp in your syslog?Thanks.
@carloabelli commented on GitHub (May 9, 2019):
@smitsohu Yup:
@smitsohu commented on GitHub (May 9, 2019):
Ok, then
firejail --debug-syscalls | grep 237will return the syscall that was used by gimp although it was forbidden by seccomp.@carloabelli commented on GitHub (May 10, 2019):
@smitsohu
mbind@smitsohu commented on GitHub (May 10, 2019):
@carloabelli Cool, thanks!
Now the question is why it is failing for you. As this is not caused by AppArmor and there are no proprietary video drivers, another wild guess would be OpenCL... do you have OpenCL enabled on your system?
It seems there is an evironment variable to turn OpenCL off in Gimp, could you please try
firejail --env=GEGL_USE_OPENCL=no gimp? There should be also a toggle somewhere in the preferences, not sure if that would work as well.@carloabelli commented on GitHub (May 10, 2019):
@smitsohu I don't believe I have OpenCL enabled. Running with that env variable did not resolve the issue.
@smitsohu commented on GitHub (May 10, 2019):
Ok. How does the output of
firejail gimp --verboselook when it is not responding any more (probably only the last couple of lines are interesting)?@smitsohu commented on GitHub (May 10, 2019):
seccomp.drop @cpu-emulation,@debug,@obsolete,@privileged,add_key,fanotify_init,io_cancel,io_destroy,io_getevents,io_setup,io_submit,ioprio_set,kcmp,keyctl,migrate_pages,move_pages,name_to_handle_at,ni_syscall,open_by_handle_at,personality,process_vm_readv,ptrace,remap_file_pages,request_key,set_mempolicy,syslog,umount,userfaultfd,vmspliceis the default seccomp filter just without
mbind. If you want you can add it to /etc/firejail/gimp.local along withignore seccompto keep going with the filter.@carloabelli commented on GitHub (May 11, 2019):
@smitsohu
Unfortunately there is no output before it stops responding with the verbose flag.
Adding gimp.local with those contents does allow gimp to run.
@rusty-snake commented on GitHub (Jun 23, 2019):
Closing for now, since there is a workaround.
@ghost commented on GitHub (Jan 25, 2020):
I don't have anything against this per se, but my gimp runs just fine on Arch/Ubuntu with seccomp and doesn't need this at all. https://github.com/netblue30/firejail/issues/2681 had a workaround, so I wonder why we merged this for everybody while the OP can use 'seccomp !mbind' in gimp.local. Or am I missing something here?
@Fred-Barclay commented on GitHub (Jan 26, 2020):
@glitsj16 I was wondering that too...
@carloabelli commented on GitHub (Jan 27, 2020):
@glitsj16 @Fred-Barclay I wasn't sure how wide ranging the issue is, so if it's too isolated I'd be happy to revert this (perhaps a comment should be added about allowing mbind in some cases). Also happy to help figure out exactly what it is about my setup that causes this.
@ghost commented on GitHub (Jan 27, 2020):
@carloabelli No worries. If we can reproduce, we already have a fix. If we cannot, we can reverse later on. But indeed, let's try to determine why your firejailed gimp hangs exactly. I assume both have been updated since your original report. Can you provide details on the environment in which this occurs please? Desktop environment, using Xorg or Wayland, content of gimp.local if you have that etcetera. For example, a memory-deny-write-execute in gimp.local could make it hang.
Those look like AppArmor. Have you tried --ignore=apparmor yet (using the original full seccomp obviously)?
@carloabelli commented on GitHub (Jan 28, 2020):
@glitsj16 Sounds good. I'm currently running Arch Linux with sway as my window manager (so wayland). GIMP version 2.10.14 and firejail version 0.9.62. Currently my gimp.local just contains
seccomp !mbind. Removing that line causes GIMP to hang. Usingignore apparmoralso has no effect (still hangs). Disabling apparmor system wide also does not help, so it seems that its not apparmor related.@ghost commented on GitHub (Jan 28, 2020):
@carloabelli Thanks for the update. I assume you still get the same syscall 237. Sway has Xwayland support correct? It's just a shot in the dark, but do you get the same issue/syscall when running GIMP under X11? I run the same GIMP version on Arch under GNOME Wayland and nothing indicates it needs access to kernel memory or NUMA settings, which is what mbind does if I'm not mistaken. Under X11 just the same, a rather exceptionally clean, silent run. Do you run the stock Arch kernel? Default factory settings for GIMP? As you notice, at the moment I'm clueless as to what might cause this for you. No need to respond to all these questions if they don't trigger any change (for the better). We'll just keep tracking this and see if other collaborators/users chime in. Regards!
@carloabelli commented on GitHub (Jan 28, 2020):
@glitsj16 Yup looks to be the same issue. Sway does have Xwayland support. I am running the hardened arch kernel so maybe that could be it. Stock GIMP. Also pretty stumped what this could be. When I have more time I'll try running with the stock kernel and also X11 to see if that helps and report back. Thanks for your suggestions!
@carloabelli commented on GitHub (Feb 1, 2020):
Tried with stock kernel and i3 (X11) and still no luck with mbind disabled.
@ghost commented on GitHub (Feb 3, 2020):
@carloabelli Thanks for the feedback. Still stumped on what might cause this for you. I've retested GIMP on all machines I have access to and the full seccomp filter works just fine. So I'm going to revert #3178 for now. You can add the 'seccomp !mbind' to your gimp.local to keep it going. If you ever find out what exactly causes this for you, please keep us informed.
@carloabelli commented on GitHub (Feb 3, 2020):
@glitsj16 Sounds good to me. I will update this if anything changes.