Bug 1938563

Summary: SELinux is preventing accounts-daemon from 'getattr' accesses on the filesystem /sys/fs/cgroup.
Product: [Fedora] Fedora Reporter: Pat Kelly <pmkellly72>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 34CC: dwalsh, grepl.miroslav, jeremy.linton, lvrabec, mmalik, omosnace, plautrba, vmojzis, zpytela
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:07cd9abce1391e381094bd01d10ba2c624f3dd28845bda6c307fe8be605474f3;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-34.2-1.fc34 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-24 19:45:25 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 Pat Kelly 2021-03-14 15:12:13 UTC
Description of problem:
SELinux is preventing accounts-daemon from 'getattr' accesses on the filesystem /sys/fs/cgroup.

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

If you believe that accounts-daemon should be allowed getattr access on the cgroup filesystem 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 'accounts-daemon' --raw | audit2allow -M my-accountsdaemon
# semodule -X 300 -i my-accountsdaemon.pp

Additional Information:
Source Context                system_u:system_r:accountsd_t:s0
Target Context                system_u:object_r:cgroup_t:s0
Target Objects                /sys/fs/cgroup [ filesystem ]
Source                        accounts-daemon
Source Path                   accounts-daemon
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.7-25.fc34.noarch
Local Policy RPM              selinux-policy-targeted-3.14.7-25.fc34.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.11.6-300.fc34.x86_64 #1 SMP Thu
                              Mar 11 17:58:00 UTC 2021 x86_64 x86_64
Alert Count                   1
First Seen                    2021-03-14 11:02:57 EDT
Last Seen                     2021-03-14 11:02:57 EDT
Local ID                      db44b41d-0ee2-4cf8-9bbe-27317df4c767

Raw Audit Messages
type=AVC msg=audit(1615734177.275:897): avc:  denied  { getattr } for  pid=737 comm="accounts-daemon" name="/" dev="cgroup2" ino=1 scontext=system_u:system_r:accountsd_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=filesystem permissive=0


Hash: accounts-daemon,accountsd_t,cgroup_t,filesystem,getattr

Version-Release number of selected component:
selinux-policy-targeted-3.14.7-25.fc34.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.14.0
hashmarkername: setroubleshoot
kernel:         5.11.6-300.fc34.x86_64
type:           libreport

Comment 1 Pat Kelly 2021-03-19 14:04:29 UTC
Similar problem has been detected:

I added a user and the notification came up. The user was set as Admin and a  password was filled in.

hashmarkername: setroubleshoot
kernel:         5.11.3-300.fc34.x86_64
package:        selinux-policy-targeted-3.14.7-25.fc34.noarch
reason:         SELinux is preventing accounts-daemon from 'getattr' accesses on the filesystem /sys/fs/cgroup.
type:           libreport

Comment 2 Zdenek Pytela 2021-04-06 17:15:19 UTC
Merged in rawhide:
commit abfd3b7df84b312d834491e31b4b65d7f65eb2cc
Author: Zdenek Pytela <zpytela>
Date:   Tue Apr 6 18:21:48 2021 +0200

    Allow accounts-daemon get attributes of cgroup filesystems

    Resolves: rhbz#1938563

Comment 3 Fedora Update System 2021-04-07 08:10:29 UTC
FEDORA-2021-79ef7c5af6 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-79ef7c5af6

Comment 4 Fedora Update System 2021-04-07 18:16:14 UTC
FEDORA-2021-79ef7c5af6 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-79ef7c5af6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-79ef7c5af6

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

Comment 5 Fedora Update System 2021-04-24 19:45:25 UTC
FEDORA-2021-79ef7c5af6 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2021-04-24 20:05:48 UTC
FEDORA-2021-79ef7c5af6 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.