Bug 1731371
Summary: | Downloaded Widevine plugin do have wrong SELinux label | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Bastien Nocera <bnocera> | ||||
Component: | firefox | Assignee: | Martin Stransky <stransky> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 32 | CC: | 0xalen+redhat, fixing-stuff-d-f-crisman-redhat-bugzilla, gecko-bugs-nobody, info, jhorak, john.j5live, kengert, l88629, mvermaes, noah+fedoraproject, pjasicek, rhughes, rstrode, sandmann, stransky | ||||
Target Milestone: | --- | Keywords: | Reopened, SELinux | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | firefox-82.0-4.fc32 firefox-82.0-4.fc33 firefox-82.0-4.fc31 firefox-105.0.2-1.fc38 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2020-10-21 19:58:53 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Bastien Nocera
2019-07-19 09:31:11 UTC
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. |