From a49d7cff061bd4fd1b0009c426cac488e06db994 Mon Sep 17 00:00:00 2001 From: Zdenek Pytela Date: Tue, 14 Jan 2025 19:15:22 +0100 Subject: [PATCH] Allow virtqemud domain transition to nbdkit The commit addresses the following AVC denial: type=PROCTITLE msg=audit(11/27/2024 02:11:06.515:615) : proctitle=/usr/sbin/virtqemud --timeout 120 type=PATH msg=audit(11/27/2024 02:11:06.515:615) : item=0 name=/usr/sbin/nbdkit inode=12677518 dev=fd:02 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:nbdkit_exec_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 type=SYSCALL msg=audit(11/27/2024 02:11:06.515:615) : arch=x86_64 syscall=access success=yes exit=0 a0=0x7f79c80aa928 a1=X_OK a2=0x9 a3=0x0 items=1 ppid=1 pid=6131 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=rpc-virtqemud exe=/usr/sbin/virtqemud subj=system_u:system_r:virtqemud_t:s0 key=(null) type=AVC msg=audit(11/27/2024 02:11:06.515:615) : avc: denied { execute } for pid=6131 comm=rpc-virtqemud name=nbdkit dev="vda2" ino=12677518 scontext=system_u:system_r:virtqemud_t:s0 tcontext=system_u:object_r:nbdkit_exec_t:s0 tclass=file permissive=1 Resolves: RHEL-69118 --- policy/modules/contrib/virt.te | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/policy/modules/contrib/virt.te b/policy/modules/contrib/virt.te index 3dfd6373d7..ebfcc8a28c 100644 --- a/policy/modules/contrib/virt.te +++ b/policy/modules/contrib/virt.te @@ -2285,6 +2285,10 @@ optional_policy(` dnsmasq_filetrans_named_content_fromdir(virtqemud_t, virtqemud_var_run_t) ') +optional_policy(` + nbdkit_domtrans(virtqemud_t) +') + optional_policy(` numad_domtrans(virtqemud_t) ')