Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: Launched virt-manager. SELinux is preventing daemon-init from 'watch' accesses on the directory /etc/mdevctl.d/scripts.d. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that daemon-init should be allowed watch access on the scripts.d 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 'daemon-init' --raw | audit2allow -M my-daemoninit # semodule -X 300 -i my-daemoninit.pp Additional Information: Source Context system_u:system_r:virtnodedevd_t:s0 Target Context system_u:object_r:mdevctl_conf_t:s0 Target Objects /etc/mdevctl.d/scripts.d [ dir ] Source daemon-init Source Path daemon-init Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages SELinux Policy RPM selinux-policy-targeted-41.18-1.fc41.noarch Local Policy RPM selinux-policy-targeted-41.18-1.fc41.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 6.11.0-63.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Sep 15 17:48:54 UTC 2024 x86_64 Alert Count 33 First Seen 2024-09-26 16:22:25 AEST Last Seen 2024-09-26 16:24:33 AEST Local ID 531cf96c-2c4b-4d6f-b580-308737a507e4 Raw Audit Messages type=AVC msg=audit(1727331873.951:1167): avc: denied { watch } for pid=254281 comm="gmain" path="/etc/mdevctl.d/scripts.d" dev="sdc3" ino=10149729 scontext=system_u:system_r:virtnodedevd_t:s0 tcontext=system_u:object_r:mdevctl_conf_t:s0 tclass=dir permissive=0 Hash: daemon-init,virtnodedevd_t,mdevctl_conf_t,dir,watch Version-Release number of selected component: selinux-policy-targeted-41.18-1.fc41.noarch Additional info: reporter: libreport-2.17.15 reason: SELinux is preventing daemon-init from 'watch' accesses on the directory /etc/mdevctl.d/scripts.d. package: selinux-policy-targeted-41.18-1.fc41.noarch component: selinux-policy hashmarkername: setroubleshoot type: libreport kernel: 6.11.0-63.fc41.x86_64 comment: Launched virt-manager. component: selinux-policy
Created attachment 2048767 [details] File: description
Created attachment 2048768 [details] File: os_info
*** Bug 2316391 has been marked as a duplicate of this bug. ***
FEDORA-2024-97e0eb13c3 (selinux-policy-41.20-1.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2024-97e0eb13c3
FEDORA-2024-97e0eb13c3 has been pushed to the Fedora 41 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-97e0eb13c3` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-97e0eb13c3 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2024-97e0eb13c3 (selinux-policy-41.20-1.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.
*** Bug 2317134 has been marked as a duplicate of this bug. ***
*** Bug 2317726 has been marked as a duplicate of this bug. ***
I'm still seeing this with 41.20. SELinux is preventing daemon-init from watch access on the directory /etc/mdevctl.d. ***** Plugin catchall_labels (83.8 confidence) suggests ******************* If you want to allow daemon-init to have watch access on the mdevctl.d directory Then you need to change the label on /etc/mdevctl.d Do # semanage fcontext -a -t FILE_TYPE '/etc/mdevctl.d' where FILE_TYPE is one of the following: mdevctl_conf_t, virt_cache_t, virt_common_var_run_t, virt_etc_rw_t, virt_var_run_t, virtnodedevd_t, virtnodedevd_var_run_t. Then execute: restorecon -v '/etc/mdevctl.d' ***** Plugin catchall (17.1 confidence) suggests ************************** If you believe that daemon-init should be allowed watch access on the mdevctl.d 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 'daemon-init' --raw | audit2allow -M my-daemoninit # semodule -X 300 -i my-daemoninit.pp Additional Information: Source Context system_u:system_r:virtnodedevd_t:s0 Target Context system_u:object_r:etc_t:s0 Target Objects /etc/mdevctl.d [ dir ] Source daemon-init Source Path daemon-init Port <Unknown> Host xps13a.happyassassin.net Source RPM Packages Target RPM Packages mdevctl-1.3.0-6.fc41.x86_64 SELinux Policy RPM selinux-policy-targeted-41.20-1.fc41.noarch Local Policy RPM selinux-policy-targeted-41.20-1.fc41.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name xps13a.happyassassin.net Platform Linux xps13a.happyassassin.net 6.11.2-300.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Oct 4 16:44:08 UTC 2024 x86_64 Alert Count 21 First Seen 2024-10-09 11:31:27 PDT Last Seen 2024-10-11 12:36:57 PDT Local ID f511b329-0e18-4f0f-8b4f-9dfe0e42102c Raw Audit Messages type=AVC msg=audit(1728675417.18:522): avc: denied { watch } for pid=31634 comm="gmain" path="/etc/mdevctl.d" dev="dm-0" ino=365 scontext=system_u:system_r:virtnodedevd_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=dir permissive=1 Hash: daemon-init,virtnodedevd_t,etc_t,dir,watch
Found by one of our automated tests: ---- type=PROCTITLE msg=audit(10/18/2024 12:46:24.957:1780) : proctitle=/usr/sbin/virtnodedevd --timeout 120 type=PATH msg=audit(10/18/2024 12:46:24.957:1780) : item=0 name=/etc/mdevctl.d inode=89317 dev=00:28 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:etc_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 type=CWD msg=audit(10/18/2024 12:46:24.957:1780) : cwd=/ type=SYSCALL msg=audit(10/18/2024 12:46:24.957:1780) : arch=x86_64 syscall=inotify_add_watch success=no exit=EACCES(Permission denied) a0=0x16 a1=0x555f33249820 a2=0x1002fce a3=0x4 items=1 ppid=1 pid=14697 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=daemon-init exe=/usr/sbin/virtnodedevd subj=system_u:system_r:virtnodedevd_t:s0 key=(null) type=AVC msg=audit(10/18/2024 12:46:24.957:1780) : avc: denied { watch } for pid=14697 comm=daemon-init path=/etc/mdevctl.d dev="nvme0n1p4" ino=89317 scontext=system_u:system_r:virtnodedevd_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=dir permissive=0 ---- # rpm -qa seli\* selinux-policy-41.21-1.fc42.noarch selinux-policy-targeted-41.21-1.fc42.noarch #
I believe v41.22 build addresses the issue with /etc/mdevctl.d label. type=PATH msg=audit(10/18/2024 12:46:24.957:1780) : item=0 name=/etc/mdevctl.d inode=89317 dev=00:28 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:etc_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
FEDORA-2024-626c699a72 (selinux-policy-41.23-1.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2024-626c699a72
FEDORA-2024-626c699a72 has been pushed to the Fedora 41 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-626c699a72` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-626c699a72 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2024-626c699a72 (selinux-policy-41.23-1.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.