Bug 1775780

Summary: SELinux is preventing systemd from 'setattr' accesses on the file LoaderSystemToken-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f.
Product: [Fedora] Fedora Reporter: Roma Hicks <roma.hicks>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 31CC: dwalsh, lvrabec, plautrba, zpytela
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:4a3905c63f23653701185b680dd46332e4f70ffd7733bec3cf0f5f5a30d064bf;VARIANT_ID=matecompiz;
Fixed In Version: selinux-policy-3.14.4-54.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-12 16:36:57 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 Roma Hicks 2019-11-22 19:09:23 UTC
Description of problem:
Fresh install on a Dell Latitude E6230, and upgraded the system shortly thereafter.  No knowlingly changes to systemd or called services by user.
SELinux is preventing systemd from 'setattr' accesses on the file LoaderSystemToken-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f.

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

If you believe that systemd should be allowed setattr access on the LoaderSystemToken-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f 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 'systemd' --raw | audit2allow -M my-systemd
# semodule -X 300 -i my-systemd.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:object_r:efivarfs_t:s0
Target Objects                LoaderSystemToken-4a67b082-0a4c-41cf-b6c7-440b29bb
                              8c4f [ file ]
Source                        systemd
Source Path                   systemd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.4-40.fc31.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.3.7-301.fc31.x86_64 #1 SMP Mon
                              Oct 21 19:18:58 UTC 2019 x86_64 x86_64
Alert Count                   1
First Seen                    2019-11-22 12:26:46 CST
Last Seen                     2019-11-22 12:26:46 CST
Local ID                      b301306b-95e1-4387-9f61-739a2d668af8

Raw Audit Messages
type=AVC msg=audit(1574447206.601:822): avc:  denied  { setattr } for  pid=1 comm="systemd" name="LoaderSystemToken-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f" dev="efivarfs" ino=13661 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:efivarfs_t:s0 tclass=file permissive=0


Hash: systemd,init_t,efivarfs_t,file,setattr

Version-Release number of selected component:
selinux-policy-3.14.4-40.fc31.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.11.3
hashmarkername: setroubleshoot
kernel:         5.3.7-301.fc31.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2020-07-09 17:13:19 UTC
commit 276970ca785ce2fa8c0fd319f3c259702d2e4415 (HEAD -> f31-setattr-efi, origin/f31-setattr-efi)
Author: Zdenek Pytela <zpytela>
Date:   Thu Jul 2 18:39:45 2020 +0200

    Allow systemd set efivarfs files attributes
    
    Create the fs_setattr_efivarfs_files() interface to allow setting
    the attributes of efivarfs files.
    Allow init_t fs_setattr_efivarfs_files().
    
    Resolves: rhbz#1846298

Comment 2 Fedora Update System 2020-08-27 21:52:18 UTC
FEDORA-2020-b2d6cffc6f has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b2d6cffc6f

Comment 3 Fedora Update System 2020-08-28 15:38:08 UTC
FEDORA-2020-b2d6cffc6f 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-b2d6cffc6f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b2d6cffc6f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2020-09-12 16:36:57 UTC
FEDORA-2020-b2d6cffc6f has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.