Description of problem: As per closed bug https://bugzilla.redhat.com/show_bug.cgi?id=1707756 I have run restorecon -Rv / as root SELinux is preventing restorecon from 'associate' accesses on the filesystem efi. ***** Plugin filesystem_associate (99.5 confidence) suggests ************** If you believe restorecon should be allowed to create efi files Then you need to use a different command. You are not allowed to preserve the SELinux context on the target file system. Do use a command like "cp -p" to preserve all permissions except SELinux context. ***** Plugin catchall (1.49 confidence) suggests ************************** If you believe that restorecon should be allowed associate access on the efi 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 'restorecon' --raw | audit2allow -M my-restorecon # semodule -X 300 -i my-restorecon.pp Additional Information: Source Context system_u:object_r:efivarfs_t:s0 Target Context system_u:object_r:sysfs_t:s0 Target Objects efi [ filesystem ] Source restorecon Source Path restorecon Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.14.3-37.fc30.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 5.1.11-300.fc30.x86_64 #1 SMP Mon Jun 17 19:33:15 UTC 2019 x86_64 x86_64 Alert Count 1 First Seen 2019-06-19 09:33:26 IDT Last Seen 2019-06-19 09:33:26 IDT Local ID 5a0c430b-7771-485d-840a-c8f8d5cf56bb Raw Audit Messages type=AVC msg=audit(1560926006.247:285): avc: denied { associate } for pid=11447 comm="restorecon" name="efi" dev="sysfs" ino=6150 scontext=system_u:object_r:efivarfs_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=filesystem permissive=0 Hash: restorecon,efivarfs_t,sysfs_t,filesystem,associate Version-Release number of selected component: selinux-policy-3.14.3-37.fc30.noarch Additional info: component: selinux-policy reporter: libreport-2.10.0 hashmarkername: setroubleshoot kernel: 5.1.11-300.fc30.x86_64 type: libreport
Hi, Are you able to reproduce it? THanks, Lukas.
Yes, Running restorcon again produces same results: [root@localhost ~]# restorecon -Rv / Relabeled /root/.xauth3tLmLu from unconfined_u:object_r:admin_home_t:s0 to unconfined_u:object_r:xauth_home_t:s0 restorecon: Could not set context for /sys/firmware/efi: Permission denied Relabeled /run/ebtables.lock from system_u:object_r:firewalld_var_run_t:s0 to system_u:object_r:iptables_var_run_t:s0 Relabeled /run/user/1000/gvfs from unconfined_u:object_r:user_tmp_t:s0 to unconfined_u:object_r:fusefs_t:s0 Relabeled /run/user/1000/keyring from unconfined_u:object_r:user_tmp_t:s0 to unconfined_u:object_r:gkeyringd_tmp_t:s0 Relabeled /run/user/1000/keyring/pkcs11 from unconfined_u:object_r:user_tmp_t:s0 to unconfined_u:object_r:gkeyringd_tmp_t:s0 Relabeled /run/user/1000/keyring/ssh from unconfined_u:object_r:user_tmp_t:s0 to unconfined_u:object_r:gkeyringd_tmp_t:s0 Relabeled /run/user/1000/keyring/control from unconfined_u:object_r:user_tmp_t:s0 to unconfined_u:object_r:gkeyringd_tmp_t:s0 And the full setroublshoot text: SELinux is preventing restorecon from associate access on the filesystem efi. ***** Plugin filesystem_associate (99.5 confidence) suggests ************** If you believe restorecon should be allowed to create efi files Then you need to use a different command. You are not allowed to preserve the SELinux context on the target file system. Do use a command like "cp -p" to preserve all permissions except SELinux context. ***** Plugin catchall (1.49 confidence) suggests ************************** If you believe that restorecon should be allowed associate access on the efi 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 'restorecon' --raw | audit2allow -M my-restorecon # semodule -X 300 -i my-restorecon.pp Additional Information: Source Context system_u:object_r:efivarfs_t:s0 Target Context system_u:object_r:sysfs_t:s0 Target Objects efi [ filesystem ] Source restorecon Source Path restorecon Port <Unknown> Host localhost.localdomain Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.14.3-37.fc30.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name localhost.localdomain Platform Linux localhost.localdomain 5.1.11-300.fc30.x86_64 #1 SMP Mon Jun 17 19:33:15 UTC 2019 x86_64 x86_64 Alert Count 2 First Seen 2019-06-19 09:33:26 IDT Last Seen 2019-06-20 12:06:57 IDT Local ID 5a0c430b-7771-485d-840a-c8f8d5cf56bb Raw Audit Messages type=AVC msg=audit(1561021617.270:287): avc: denied { associate } for pid=4249 comm="restorecon" name="efi" dev="sysfs" ino=6150 scontext=system_u:object_r:efivarfs_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=filesystem permissive=0 Hash: restorecon,efivarfs_t,sysfs_t,filesystem,associate Regards, --Dani_L.
commit 3043fa015b6ddde57bc43f5e5531f270caa60634 (HEAD -> rawhide, origin/rawhide) Author: Lukas Vrabec <lvrabec> Date: Thu Jun 20 17:30:09 2019 +0200 Allow associate efivarfs_t on sysfs_t
FEDORA-2019-9c513c4cf8 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-9c513c4cf8
selinux-policy-3.14.3-40.fc30 has been pushed to the Fedora 30 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-2019-9c513c4cf8
selinux-policy-3.14.3-40.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
Seems to work correctly now