Description of problem: SELinux is preventing systemd-sleep from 'add_name' accesses on the directory state. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that systemd-sleep should be allowed add_name access on the state directory 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-sleep' --raw | audit2allow -M my-systemdsleep # semodule -X 300 -i my-systemdsleep.pp Additional Information: Source Context system_u:system_r:systemd_sleep_t:s0 Target Context system_u:object_r:sysfs_t:s0 Target Objects state [ dir ] Source systemd-sleep Source Path systemd-sleep Port <Tuntematon> Host (removed) Source RPM Packages Target RPM Packages SELinux Policy RPM selinux-policy-targeted-3.14.7-28.fc34.noarch Local Policy RPM selinux-policy-targeted-3.14.7-28.fc34.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 5.11.9-300.fc34.x86_64 #1 SMP Wed Mar 24 12:06:51 UTC 2021 x86_64 x86_64 Alert Count 2 First Seen 2021-03-28 13:40:23 EEST Last Seen 2021-03-30 09:08:11 EEST Local ID 97c53be1-25f3-494c-9571-3057afe80a4f Raw Audit Messages type=AVC msg=audit(1617084491.30:16617): avc: denied { add_name } for pid=278668 comm="systemd-sleep" name="state" scontext=system_u:system_r:systemd_sleep_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir permissive=0 Hash: systemd-sleep,systemd_sleep_t,sysfs_t,dir,add_name Version-Release number of selected component: selinux-policy-targeted-3.14.7-28.fc34.noarch Additional info: component: selinux-policy reporter: libreport-2.14.0 hashmarkername: setroubleshoot kernel: 5.11.9-300.fc34.x86_64 type: libreport
I've submitted a Fedora PR to address the issue: https://github.com/fedora-selinux/selinux-policy/pull/667
FEDORA-2021-e221a38cfe has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-e221a38cfe
FEDORA-2021-e221a38cfe 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-e221a38cfe` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-e221a38cfe See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
Thank you for working on this. Unfortunately, I have not seen the error on the affected system since the fix became available, so I am unable to test if the fix helps. But since the submitted fix is clear enough and the problem does not reproduce, I am willing to consider the issue fixed. I will install the update anyhow and report if I the problem happens again.
FEDORA-2021-e221a38cfe has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.