| Summary: | SELinux is preventing gpg2 from 'write' accesses on the file trustdb.gpg. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Vít Ondruch <vondruch> |
| Component: | fwupd | Assignee: | Richard Hughes <rhughes> |
| Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 24 | CC: | akurtako, dac.override, dominick.grift, dwalsh, jfrieben, jsmith.fedora, lvrabec, mgrepl, plautrba, rhughes, vonbrand |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Unspecified | ||
| Whiteboard: | abrt_hash:5b840da17248cfeff034ad2f20d09f582486a6db0e5a5b820cdf4691aab6e9bc; | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-08 12:43:52 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | |||
| Bug Blocks: | 1310976 | ||
commit b7f12bd37716a3312f943667aab467813a614208
Author: Lukas Vrabec <lvrabec>
Date: Mon Feb 8 13:28:26 2016 +0100
Allow fwupd domain transition to gpg domain. Fwupd signing firmware updates by gpg. rhbz#1303531
Fix above was reverted, we need to find another solution how to fix it. Fwdupd folks, Could you check: https://github.com/fedora-selinux/selinux-policy/commit/b7f12bd37716a3312f943667aab467813a614208 and come up with some solution? Thank you. Yea, and can we also get fwupd to bail out when it is done because currently we have a fwupd and gpg-agent process associated with the root uid dangling long after it has done what it is supposed to do. if you in gnome-software force a refresh it will spawn fwupd, that will spawn gpg, which with spawn gpg-agent. When done they dont quit. Also when fwupd for some reason fails then the refresh procedure will refuse to continue. (should fwupd not be optional in the first place?) So: fwupd should run gpg with $GPG_HOME=/var/lib/fwupd/.gnupg, then when fwupd is done with gpg, it should make sure that it terminates the gpg-agent process that it indirectly spawned, and then when fwupd is done, it should terminate and not sick around indefinetely .. maybe even better run gpg with "-no-use-agent" if possible, as i suspect that this will cause gpg not not spawn a gpg-agent process This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle. Changing version to '24'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase *** Bug 1309998 has been marked as a duplicate of this bug. *** *** Bug 1315028 has been marked as a duplicate of this bug. *** *** Bug 1310979 has been marked as a duplicate of this bug. *** commit 4eb527f873c2fa0a0ba1373defdb88fdddb7fee1
Author: Richard Hughes <richard>
Date: Tue Jun 28 09:17:39 2016 +0100
Use a private gnupg key store
Although it's convenient that you can just log in as root and add another
trusted key, it makes the selinux developers unhappy. Use a private keystore
in /var/lib/fwupd/gnupg to avoid the possibility of a somehow hacked fwupd
being able to export the root gpg secrets if any happened to exist.
If you've trusted keys other than the LVFS for metadata or firmware you'll need
to re-import them into this new location.
See https://github.com/fedora-selinux/selinux-policy/commit/b7f12bd37716a3312f943667aab467813a614208
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1303531
:100644 100644 347bef9... 6891ca8... M contrib/fwupd.spec.in
:100644 100644 265198f... 6eec671... M src/fu-keyring.c
This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. 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 '24'. 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 24 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. Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. |
Description of problem: SELinux is preventing gpg2 from 'write' accesses on the file trustdb.gpg. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that gpg2 should be allowed write access on the trustdb.gpg file by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # grep gpg2 /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context system_u:system_r:fwupd_t:s0-s0:c0.c1023 Target Context system_u:object_r:gpg_secret_t:s0 Target Objects trustdb.gpg [ file ] Source gpg2 Source Path gpg2 Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.13.1-168.fc24.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 4.4.0-1.fc24.x86_64 #1 SMP Mon Jan 11 16:48:24 UTC 2016 x86_64 x86_64 Alert Count 1 First Seen 2016-02-01 09:30:58 CET Last Seen 2016-02-01 09:30:58 CET Local ID c2c4013f-d3c1-48cf-8576-9a4217c5e3eb Raw Audit Messages type=AVC msg=audit(1454315458.961:5137): avc: denied { write } for pid=9894 comm="gpg2" name="trustdb.gpg" dev="dm-1" ino=1312688 scontext=system_u:system_r:fwupd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:gpg_secret_t:s0 tclass=file permissive=1 Hash: gpg2,fwupd_t,gpg_secret_t,file,write Version-Release number of selected component: selinux-policy-3.13.1-168.fc24.noarch Additional info: reporter: libreport-2.6.3 hashmarkername: setroubleshoot kernel: 4.4.0-1.fc24.x86_64 type: libreport