Bug 1303533

Summary: SELinux is preventing fwupd from 'open' accesses on the file /etc/pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service.
Product: [Fedora] Fedora Reporter: Vít Ondruch <vondruch>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 24CC: dominick.grift, dwalsh, jfrieben, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:2a7270beef78abd111c33c325ea8fcd95b7de96cf9363ae8c5aaf707b2b4a3be;
Fixed In Version: selinux-policy-3.13.1-170.fc24 selinux-policy-3.13.1-179.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-23 16:57:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vít Ondruch 2016-02-01 08:32:24 UTC
Description of problem:
SELinux is preventing fwupd from 'open' accesses on the file /etc/pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that fwupd should be allowed open access on the GPG-KEY-Linux-Vendor-Firmware-Service 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 fwupd /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:cert_t:s0
Target Objects                /etc/pki/fwupd-metadata/GPG-KEY-Linux-Vendor-
                              Firmware-Service [ file ]
Source                        fwupd
Source Path                   fwupd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           fwupd-0.6.1-1.fc24.x86_64
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                      6066a9ed-3bb6-4865-9bf5-64d6f5633cb8

Raw Audit Messages
type=AVC msg=audit(1454315458.941:5136): avc:  denied  { open } for  pid=9351 comm="fwupd" path="/etc/pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service" dev="dm-1" ino=2098079 scontext=system_u:system_r:fwupd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cert_t:s0 tclass=file permissive=1


Hash: fwupd,fwupd_t,cert_t,file,open

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

Comment 1 Lukas Vrabec 2016-02-08 13:04:10 UTC
commit 046fd1a1cc5dc6de646876c3780ce78dbaa89e54
Author: Lukas Vrabec <lvrabec>
Date:   Mon Feb 8 13:57:49 2016 +0100

    Create new type fwupd_cert_t
    Label /etc/pki/(fwupd|fwupd-metadata) dirs as fwupd_cert_t
    Allow fwupd_t domain to read fwupd_cert_t files|lnk_files
    rhbz#1303533
    
    This patch fixes following AVCs:
    type=AVC msg=audit(1454936239.422:564): avc:  denied  { getattr } for
    pid=13535 comm="fwupd"
    path="/etc/pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service"
    dev="vda1" ino=8196 scontext=system_u:system_r:fwupd_t:s0-s0:c0.c1023
    tcontext=system_u:object_r:cert_t:s0 tclass=file permissive=1
    
    type=AVC msg=audit(1454936239.422:565): avc:  denied  { read } for
    pid=13535 comm="fwupd" name="GPG-KEY-Linux-Vendor-Firmware-Service"
    dev="vda1" ino=8196 scontext=system_u:system_r:fwupd_t:s0-s0:c0.c1023
    tcontext=system_u:object_r:cert_t:s0 tclass=file permissive=1
    
    type=AVC msg=audit(1454936239.421:563): avc:  denied  { read } for
    pid=13535 comm="fwupd" name="fwupd-metadata" dev="vda1" ino=49662
    scontext=system_u:system_r:fwupd_t:s0-s0:c0.c1023
    tcontext=system_u:object_r:cert_t:s0 tclass=dir permissive=1
    
    type=AVC msg=audit(1454936239.422:566): avc:  denied  { open } for
    pid=13535 comm="fwupd"
    path="/etc/pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service"
    dev="vda1" ino=8196 scontext=system_u:system_r:fwupd_t:s0-s0:c0.c1023
    tcontext=system_u:object_r:cert_t:s0 tclass=file permissive=1

Comment 2 Jan Kurik 2016-02-24 15:52:25 UTC
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

Comment 3 Fedora Update System 2016-03-11 09:56:47 UTC
selinux-policy-3.13.1-178.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1350c96015

Comment 4 Fedora Update System 2016-03-11 19:26:24 UTC
selinux-policy-3.13.1-178.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1350c96015

Comment 5 Fedora Update System 2016-03-16 13:43:12 UTC
selinux-policy-3.13.1-179.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8f142bb969

Comment 6 Fedora Update System 2016-03-18 14:59:15 UTC
selinux-policy-3.13.1-179.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8f142bb969

Comment 7 Fedora Update System 2016-03-23 16:55:21 UTC
selinux-policy-3.13.1-179.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.