Bug 1836587

Summary: SELinux is preventing systemctl from 'getattr' accesses on the file /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c.
Product: [Fedora] Fedora Reporter: Andrew Turngren <andrew>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: dwalsh, grepl.miroslav, lvrabec, plautrba, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:98de46235a32cefa91764178f1b38dd7f5109c8ef774cc573d030636bbdd2d62;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-18 06:59:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew Turngren 2020-05-17 04:02:20 UTC
Description of problem:
SELinux is preventing systemctl from 'getattr' accesses on the file /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c.

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

If you believe that systemctl should be allowed getattr access on the SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c 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:
# ausearch -c 'systemctl' --raw | audit2allow -M my-systemctl
# semodule -X 300 -i my-systemctl.pp

Additional Information:
Source Context                system_u:system_r:logrotate_t:s0
Target Context                system_u:object_r:efivarfs_t:s0
Target Objects                /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca
                              -11d2-aa0d-00e098032b8c [ file ]
Source                        systemctl
Source Path                   systemctl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.5-38.fc32.noarch
Local Policy RPM              selinux-policy-targeted-3.14.5-38.fc32.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.6.8-300.fc32.x86_64 #1 SMP Wed
                              Apr 29 19:01:34 UTC 2020 x86_64 x86_64
Alert Count                   1
First Seen                    2020-05-17 00:01:01 EDT
Last Seen                     2020-05-17 00:01:01 EDT
Local ID                      976da204-0c28-4915-a7d7-e0e2ec1a6472

Raw Audit Messages
type=AVC msg=audit(1589688061.546:2046): avc:  denied  { getattr } for  pid=345139 comm="systemctl" path="/sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c" dev="efivarfs" ino=125 scontext=system_u:system_r:logrotate_t:s0 tcontext=system_u:object_r:efivarfs_t:s0 tclass=file permissive=1


Hash: systemctl,logrotate_t,efivarfs_t,file,getattr

Version-Release number of selected component:
selinux-policy-targeted-3.14.5-38.fc32.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.12.0
hashmarkername: setroubleshoot
kernel:         5.6.8-300.fc32.x86_64
type:           libreport

Comment 1 Andrew Turngren 2020-05-17 21:38:42 UTC
Similar problem has been detected:

System notification upon boot

hashmarkername: setroubleshoot
kernel:         5.6.12-300.fc32.x86_64
package:        selinux-policy-targeted-3.14.5-38.fc32.noarch
reason:         SELinux is preventing systemctl from 'getattr' accesses on the file /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c.
type:           libreport

Comment 2 Zdenek Pytela 2020-05-18 06:59:00 UTC

*** This bug has been marked as a duplicate of bug 1827972 ***