mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4406] Electron apps segfault in libglib when trying to upload files #2653
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#2653
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 @haarp on GitHub (Jul 16, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4406
Initially discussed in https://github.com/netblue30/firejail/discussions/4405
Hello,
so I've been having this problem for a while now. I run a few Electron apps (MS Teams, Discord, Signal) with firejail. All of them work fine for the most part, but will crash shortly after attempting to upload files.
$HOME/Downloads)There doesn't seem to be anyone else having this problem, or at least my Google-Fu failed me. The behavior is very similar across all three of these apps. They work fine when run directly without firejail
Here's some log from Discord:
and from syslog:
It seems to be related to the GTK file picker, which makes use of libglib. libglib originates from my system and is not part of the Discord distribution. Recompiling libglib did not help.
Gentoo Linux, firejail-0.9.64.4, using mostly the default profiles (at least nothing that should cause such problems).
Any ideas? It msut be firejail, but I don't understand how or why. Thanks!
@smitsohu commented on GitHub (Jul 17, 2021):
From a distance this looks rather like a bug somewhere in Electron/Glib that is merely triggered by the sandbox.
Can you please try
firejail --noprofile discordandfirejail --noprofile --tracelog discord? With the latter there might be additional messages in the syslog.@rusty-snake commented on GitHub (Jul 17, 2021):
The latter don't work with chrom*.
How do you run the AI?
firejail --proifle=discord --appimage ./path/to/the/appimage.AppImage?@haarp commented on GitHub (Jul 17, 2021):
Thanks for your replies!
I've already tried. This still crashes, but shifts the segfault from libglib to libc. In my tests, I've also sometimes seen libgobject.
Sorry, I am not comfortable running it completely unsandboxed. But I did try a minimal sandbox, see below.
--tracelogunfortunately doesn't work, firejail will just stall.It's installed via ebuild, which extracts the upstream .deb into
/opt/discordand symlinks the binary to/usr/bin/discord. Then I runfirejail --profile=discord discord.I've been testing a minimal profile and I can track the crashes down to whitelisting. This crashes:
This doesn't:
@haarp commented on GitHub (Jul 17, 2021):
Oh boy, I found it! 🎉
It's
~/.local/share/recently-used.xbel. If I add it to the whitelist, no more crashes.whitelist ${HOME}/.local/share/recently-used.xbelCome to think of it, the log did mention that file, but I disregarded it as a harmless message. Curiously, it's not a symlink, but a regular file.
Gtk-WARNING **: Symlink resolution failed: Failed to read the symbolic link “/home/haarp/.local/share/recently-used.xbel”: No such file or directoryNow with that file whitelisted, it still has complaints (as it tries to clone-modify-replace it), but no crashes:
Gtk-WARNING **: Attempting to store changes into '/home/haarp/.local/share/recently-used.xbel', but failed: Failed to rename file “/home/haarp/.local/share/recently-used.xbel.PVC460” to “/home/haarp/.local/share/recently-used.xbel”: g_rename() failed: Device or resource busy@rusty-snake commented on GitHub (Oct 9, 2021):
Can we close here?
@haarp commented on GitHub (Oct 10, 2021):
Yup.