firefox-68.0-4.fc30.x86_64 plugin-container crashes when loading the Widevine plugin when this plugin has been installed through Firefox itself, due to SELinux refusing to load the file. I could replicate this going either to Prime Video or Netflix. Jul 18 18:02:33 classic audit[26922]: AVC avc: denied { execute } for pid=26922 comm="plugin-containe" path="/home/hadess/.mozilla/firefox/giyttnoj.default/gmp-widevinecdm/4.10.1196.0/libwidevinecdm.so" dev=> Jul 18 18:02:33 classic audit[26922]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 pid=26922 comm="plugin-containe" exe="/usr/lib64/firefox/plugin-> Jul 18 18:02:33 classic kernel: plugin-containe[26922]: segfault at 0 ip 00007fad59cca826 sp 00007ffd33e55f20 error 6 in libxul.so[7fad588e1000+36bd000] Jul 18 18:02:33 classic kernel: Code: 00 00 00 00 00 00 00 0f 0b 4c 8d 05 3c 45 7d 02 4c 89 00 c7 04 25 00 00 00 00 00 00 00 00 0f 0b 48 8d 3d 55 45 7d 02 48 89 38 <c7> 04 25 00 00 00 00 00 00 00 00 0f 0b 48 8d> Jul 18 18:02:33 classic firefox.desktop[1741]: ###!!! [Parent][MessageChannel::Call] Error: Channel error: cannot send/recv Process 26922 (plugin-containe) of user 1000 dumped core. Stack trace of thread 26922: #0 0x00007fad59cca826 n/a (libxul.so) #1 0x00007fad5a8852c3 n/a (libxul.so) #2 0x00007fad5a7f2bbb n/a (libxul.so) #3 0x00007fad5a8873c5 n/a (libxul.so) #4 0x00007fad58a52551 n/a (libxul.so) #5 0x00007fad5af5fa81 n/a (libxul.so) #6 0x00007fad5af967cc n/a (libxul.so) #7 0x00007fad5aa8eba9 n/a (libxul.so) #8 0x00007fad5901150e n/a (libxul.so) #9 0x000055ee2bd68e8c n/a (plugin-container) #10 0x00007fad57bdbf33 __libc_start_main (libc.so.6) #11 0x000055ee2bd54fee _start (plugin-container) Stack trace of thread 26925: #0 0x00007fad57cadfad syscall (libc.so.6) #1 0x00007fad5aa8f72b epoll_wait (libxul.so) #2 0x00007fad5aa8f65b n/a (libxul.so) #3 0x00007fad5aa8f4b9 n/a (libxul.so) #4 0x00007fad5aa8ec73 n/a (libxul.so) #5 0x00007fad5aa8eba9 n/a (libxul.so) #6 0x00007fad5aa8da8e n/a (libxul.so) #7 0x00007fad5aa8d98b n/a (libxul.so) #8 0x00007fad5e0795a2 start_thread (libpthread.so.0) #9 0x00007fad57cb3303 __clone (libc.so.6) I can't gather a useful backtrace because running gdb on this backtrace eats through 16GB of RAM and leaves my machine unusable for ours. Running restorecon on ~/.mozilla fixes the problem. See: https://bazile.org/writing/2019/watching_hulu_and_prime_video_in_firefox_on_fedora.html (is there a bug open about ~/.mozilla being used rather than ~/.local/share or ~/.config?)
This message is a reminder that Fedora 30 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '30'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 30 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
I can replicate this completely and it took me a whole week to figure this out. And I didn't check, but I am sure I had the very same issue on F31. Shouldn't someone be able to address this somehow? Can I help somehow?
Frankly I have no idea. Adding selinux keyword to make it visible to SELinux folks.
I copied my firefox from a F31 box to a freshly installed F32 box, but as the plugin is installed afterwards I would think there should be no correlation, right?
(In reply to John Smith from comment #4) > I copied my firefox from a F31 box to a freshly installed F32 box, but as > the plugin is installed afterwards I would think there should be no > correlation, right? Do you have any SELinux error messages? Can you: - create a new profile? - try Mozilla binaries? See https://fedoraproject.org/wiki/How_to_debug_Firefox_problems?rd=Bug_info_Firefox for more info.
(In reply to Martin Stransky from comment #5) > (In reply to John Smith from comment #4) > > I copied my firefox from a F31 box to a freshly installed F32 box, but as > > the plugin is installed afterwards I would think there should be no > > correlation, right? > > Do you have any SELinux error messages? > > Can you: > > - create a new profile? > - try Mozilla binaries? > > See > https://fedoraproject.org/wiki/ > How_to_debug_Firefox_problems?rd=Bug_info_Firefox for more info. Hi Martin, sorry for the confusion. I meant to write 'Firefox Profile" not hust "Firefox. I installed Firefox from the official Fedora repos. I had the exact same issue as Bastien descibed in the original issue and I already solved it using his hint with restorecon. But yes, I saw the very same "AVC denied" message he described. New profile didn't work though, for me it was definitely SELinux. I just thought I would give a heads up, as this might an issue for users. Hope my information is helpful.
Okay, Thanks.
(In reply to Martin Stransky from comment #7) > Okay, Thanks. Unless I'm mistaken, it's still broken, so reopening.
+1 Bastien, as long as we can not pinpoint this to be a user error this should be addressed.
Hm I suspect that's about wrong SELinux label of files which are downloaded by Firefox itself (the widevine plugin). the files are downloaded to user profile, like the one from Bastien's example: /home/hadess/.mozilla/firefox/giyttnoj.default/gmp-widevinecdm/4.10.1196.0/libwidevinecdm.so but I'm not sure how to handle that.
I think it may be possible to run restorecon on a specified directory (gmp-widevinecdm from current profile) and it should be run after the plugin download. Not sure if restorecon can be launched from Firefox itself.
So this might be a task for the Firefox devs? @Martin Stransky is there a line of communication between Fedora and Mozilla that could be facilitated? Or should someone just open an issue with them?
(In reply to John Smith from comment #12) > So this might be a task for the Firefox devs? @Martin Stransky is there a > line of communication between Fedora and Mozilla that could be facilitated? > Or should someone just open an issue with them? Mozilla does not do any system integration and SELinux fixes. This is Fedora specific issue and SELinux issue. The user profile needs to be re-labeled somehow.
I wonder if we can run SELinux relabel for the whole ~/.mozilla/firefox directory in ff startup script?
Added to firefox-81.0-6.
Whoever added the call to `restorecon ... &` to /usr/bin/firefox: this is leaving zombie processes around since the shell that started it isn't around to reap it. Change it from # When Firefox is not running, restore SELinux labels for profile files # (rhbz#1731371) if [ $MOZILLA_DOWN -ne 0 ]; then if [ `getenforce` != "Disabled" ]; then restorecon -vr ~/.mozilla/firefox/* & fi fi to # When Firefox is not running, restore SELinux labels for profile files # (rhbz#1731371) if [ $MOZILLA_DOWN -ne 0 ]; then if [ `getenforce` != "Disabled" ]; then (restorecon -vr ~/.mozilla/firefox/* &) fi fi
This comment was flagged a spam, view the edit history to see the original text if required.
Guys, I'm not very skilled in the SELinux stuff so I'd use any help here. Thanks.
I am neither great with SELinux nor have I ever packaged software. But as far as I understand the last anwers the fix from Noah should address the situation with the zombies and although I see el reportos point I think it might not be the worst problem, as a system with enabled SELinux probably also has getenforce?
I added the () to 82.0-2 builds, Thanks. I also added a check if getneforce is present and the relabel is performed in that case only.
Thanks. Regarding el reporto's comment, there is a supported way to run restorecond in user sessions, and /etc/selinux/restorecond_user.conf includes ~/.config/* by default, but firefox still uses ~/.mozilla. Considering that the cache files moved to $XDG_CACHE_HOME quite some time ago, it seems like the firefox profiles should move to $XDG_CONFIG_HOME too, but in the meantime maybe best practice would be to add ~/.mozilla to restorecond_user.conf and to advise running restorecond in user mode (restorecond -u) when a new session starts. I don't think applications were really meant to be responsible for handling relabeling on their own.
restorecond is provided by policycoreutils-restorecond package. Is that supposed to be installed by default? Because I don't have it on my system (Fedora 32) and I use a default workspace installation. Anyway, let's report that against policycoreutils-restorecond to include ~/.mozilla there. Thanks for the advice!
(In reply to Martin Stransky from comment #22) > restorecond is provided by policycoreutils-restorecond package. Is that > supposed to be installed by default? Because I don't have it on my system > (Fedora 32) and I use a default workspace installation. Anyway, let's report > that against policycoreutils-restorecond to include ~/.mozilla there. Thanks > for the advice! Filed as Bug 1888994.
FEDORA-2020-aba1d14e9e has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-aba1d14e9e
FEDORA-2020-de83d27335 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-de83d27335
Not sure it is a good idea to restorecon stuff behind the admin’s back, but anyway $ firefox /usr/bin/firefox: ligne 186: [Enforcing : commande introuvable Your shell test is missing a space
FEDORA-2020-c82e86cde0 has been pushed to the Fedora 33 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-c82e86cde0` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-c82e86cde0 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-de83d27335 has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-de83d27335` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-de83d27335 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-aba1d14e9e has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-aba1d14e9e` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-aba1d14e9e See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
Created attachment 1723287 [details] Missing space in test Seconding comment 26, there is a missing space in shell test.
FEDORA-2020-aba1d14e9e has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-c82e86cde0 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-de83d27335 has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-f0988ea008 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-f0988ea008
FEDORA-2022-f0988ea008 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.