mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1736] transmission-qt freezes on opening dialogs #1176
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#1176
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 @hubiqs on GitHub (Jan 16, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1736
When trying to open dialogs in transmission-qt, the interface freezes and the application becomes a zombie. This includes using buttons Open, Open URL, and any dialog from the menues. The application must then be terminated manually.
This happens using the default profiles with no changes or .local-files. Running transmission-qt without firejail works fine. This behaviour has been confirmed on two separate systems running Arch, using basically the same config.
I believe this problem came about when KDE Frameworks was upgraded to 5.41.0, but I'm not certain. Might have happened on Qt upgrade to 5.10.0. Downgrading to test is troublesome for me running Arch, I'd rather not mess up my install, as I'm not an expert user. On that note, I'm not sure how to generate any meaningful logs. Nothing appears in the terminal, nor anything in the syslog that I can see.
This is all I get when it freezes and then manually TERMd:
If there's any more information I can supply, let me know, it's been quite a while now since I could use transmission-qt in firejail normally. For now I've been starting it outside firejail, adding the URLs I need, closing it, and then doing the downloads inside firejail (while making sure not to open any dialogs.)
firejail 0.9.52-1
transmission-qt 2.92-8
KDE Plasma 5.11.5
KDE Frameworks 5.42.0
Qt 5.10.0
Kernel 4.14.13-1 with CONFIG_USER_NS=y
Edit: Adding that
$ firejail --noprofile /usr/bin/transmission-qtworks fine, so the problem is the profile?Edit 2: Sometimes when I click a button, it spits out an error in the console as it freezes:
UdevQt: unable to create udev monitor connection@hubiqs commented on GitHub (Jan 16, 2018):
Commenting out
memory-deny-write-executein transmission-qt.profile seems to solve the problem. Any ideas what could be wrong?@chiraag-nataraj commented on GitHub (Jan 17, 2018):
Might be the QT bug again. Try the thing here.
@hubiqs commented on GitHub (Jan 17, 2018):
Oh I should have mentioned that I've tried that, I need
env QML_DISABLE_DISK_CACHE=1in order to fix okular anyway. Might still be related perhaps? The okular problems showed up at the same time as the transmission-qt ones.@chiraag-nataraj commented on GitHub (Jan 17, 2018):
Hmmm, that's weird.
memory-deny-write-executebreaking it implies thattransmissionis doing some truly weird stuff imo...maybe use a different torrent client? 😜[Edit]
memory-deny-write-executeseems to breakdarktableas well, which is a favorite program of mine...I guess I'll have to revise my statement above 😜@hubiqs commented on GitHub (Jan 17, 2018):
Haha, maybe. But, it seems
memory-deny-write-executewas added in August totransmission-qt.profilewhich means it has been like that since September's firejail 0.9.50 at least, and I definitely haven't had the problem that long, and transmission-qt was not updated during this time. Since okular and transmission-qt started misbehaving at the same time, I would still suspect Qt...@netblue30 commented on GitHub (Jan 18, 2018):
Doing QML_DISABLE_DISK_CACHE=1 and QTWEBENGINE_DISABLE_SANDBOX=1 by default (hardcoded).
commit:
1e7045b55c@hubiqs - grab the latest from git and give it a try. Try also darktable. Do we still need to remove memory-deny-write-execute? Thanks.
@chiraag-nataraj commented on GitHub (Jan 18, 2018):
@netblue30 I think you misunderstood. I added
memory-deny-write-executein my localdarktableprofile just to see if it worked. It's not in the default profile.@hubiqs commented on GitHub (Jan 18, 2018):
@netblue30 I tried the latest version from master, and the problem with transmission-qt remains. Removing
memory-deny-write-executefrom transmission-qt.profile is still necessary.Please note that
env QML_DISABLE_DISK_CACHE=1is still present here:a28fc4b2cd/etc/disable-common.inc (L347)I commented it out, and tested okular, the hard-coded fix works fine for okular.
As far as darktable goes, it works fine in 0.9.52 and master. Adding
memory-deny-write-executedoesn't break it for me (what specific breakage are you seeing @chiraag-nataraj?) but it is probably best left out at this time, since something's going on... But darktable isn't connected to anything Qt, is it?@chiraag-nataraj commented on GitHub (Jan 18, 2018):
@hubiqs
darktablefails to start if I include it. Namely, SECCOMP killsdarktableafter it attempts to usemprotect. Regardless, that's a separate bug, so let's not pollute this issue with that 🙂@vn971 commented on GitHub (Jan 18, 2018):
Are there other Qt applications that explicitly need
QML_DISABLE_DISK_CACHE=1andQTWEBENGINE_DISABLE_SANDBOX=1for them to work in firejail?If not, I'd say it makes sense to add the rules to transmission-qt profile specifically, instead of disabling qt webengine sandboxing globally for all apps without warning.
@hubiqs commented on GitHub (Jan 19, 2018):
@vn971 okular and viber seem to need
QML_DISABLE_DISK_CACHE=1. Probably connected to this bug.I'm not aware of any applications that need
QTWEBENGINE_DISABLE_SANDBOX=1to function. It was suggested in the viber-issue, but never reported to have any effect...?1e7045b55cmight have been a bit premature.transmission-qt doesn't seem to be affected by these options, only negatively by the presence of
memory-deny-write-execute, perhaps due to the above Qt bug.@netblue30 commented on GitHub (Jan 19, 2018):
Removed meomory-deny-execute from transmission-qt profile:
5cf5ec2636Removed QTWEBENGINE_DISABLE_SANDBOX=1 from the code:
5e0daa3cd6Adding QTWEBENGINE_DISABLE_SANDBOX=1 to Viber profile:
edc49d389eI moved the discussion from #1709 here on this page.
@smitsohu commented on GitHub (Mar 7, 2018):
Temporarily reopened for discussion of Qupzilla profile (also relevant for Falkon probably #1794).
Firejailed Qupzilla is broken on a number of distros because Qt webengine is running at its core (just confirmed on Fedora), and I would like to extend the approach taken in KMail and Qutebrowser profiles to Qupzilla, rather than adding QTWEBENGINE_DISABLE_SANDBOX=1 only to preserve the chroot seccomp filter.
While Firejail is modeled after the Chromium sandbox, it cannot replace it.... for users on a distro like Fedora, the security implications of disabling the built-in sandbox (with its tightly constrained renderer processes) and replacing everything with Firejail are non-trivial.
But also users on distros like Debian, where significant parts of the built-in webengine sandbox are not available because of missing support for unprivileged user namespaces, are not left out in the rain. They still have
caps.drop sys_admin,sys_chrootandnorootand indeed don't need the chroot seccomp filter that much, precisely because there are no unprivileged user namespaces.I'd like to propose to move on, at least for browsers and the like, with dropping the chroot seccomp filter instead of replacing the Qt webengine sandbox altogether. Personally the feeling is rather that firejailing an app should always be a no-brainer, independent of the distribution used.
Do I miss something? Other opinions?
@Vincent43 commented on GitHub (Mar 7, 2018):
When user namespaces aren't available chromium uses SUID Sandbox (which has same effect but needs setuid binary), you can check it in
chrome://sandbox/. Does Qt webengine do the same?@smitsohu commented on GitHub (Mar 7, 2018):
No, there is no SUID sandbox in Qt webengine, only seccomp and unprivileged namespaces (and a chroot).
When the distro doesn't support unpriv user ns, there is still seccomp, IIRC.
@vn971 commented on GitHub (Mar 7, 2018):
@Vincent43 also binaries are not SUID if you have
--norootworking.@Vincent43 commented on GitHub (Mar 7, 2018):
That's why we don't use
norootin chromium profile 😀@smitsohu Maybe it's worth to open new issue as this isn't related to transmission?
@smitsohu commented on GitHub (Mar 13, 2018):
@Vincent43 you're right, I will change my approach the next time