Skip to content

Commit

Permalink
Allow virtqemud manage nfs dirs when virt_use_nfs boolean is on
Browse files Browse the repository at this point in the history
This is a follow-up to 40017f3 ("Allow virtqemud manage nfs files
when virt_use_nfs boolean is on") as additional permissionsfor virtqemud
are needed, too. The permission set is now the same as it previously was
for virtd_t.

The commit addresses the following AVC denial example:
type=PROCTITLE msg=audit(12/12/2024 04:31:01.442:783) : proctitle=/usr/sbin/virtqemud --timeout 120
type=PATH msg=audit(12/12/2024 04:31:01.442:783) : item=1 name=/var/lib/libvirt/swtpm/311bdd21-5945-4928-ab14-b258acfba1e4/tpm2 inode=29363572 dev=00:31 mode=dir,700 ouid=tss ogid=tss rdev=00:00 obj=system_u:object_r:nfs_t:s0 nametype=DELETE cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(12/12/2024 04:31:01.442:783) : item=0 name=/var/lib/libvirt/swtpm/311bdd21-5945-4928-ab14-b258acfba1e4/ inode=25170736 dev=00:31 mode=dir,711 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:nfs_t:s0 nametype=PARENT cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=SYSCALL msg=audit(12/12/2024 04:31:01.442:783) : arch=x86_64 syscall=rmdir success=yes exit=0 a0=0x7f598c091d60 a1=0x7f598c0aa120 a2=0x40000 a3=0x4002 items=2 ppid=1 pid=6537 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(12/12/2024 04:31:01.442:783) : avc:  denied  { rmdir } for  pid=6537 comm=rpc-virtqemud name=tpm2 dev="0:49" ino=29363572 scontext=system_u:system_r:virtqemud_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=dir permissive=1
type=AVC msg=audit(12/12/2024 04:31:01.442:783) : avc:  denied  { remove_name } for  pid=6537 comm=rpc-virtqemud name=tpm2 dev="0:49" ino=29363572 scontext=system_u:system_r:virtqemud_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=dir permissive=1

Resolves: RHEL-71068
  • Loading branch information
zpytela committed Jan 2, 2025
1 parent 1a22a5a commit 6cf9059
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions policy/modules/contrib/virt.te
Original file line number Diff line number Diff line change
Expand Up @@ -2267,7 +2267,10 @@ tunable_policy(`virtqemud_use_execmem',`
')

tunable_policy(`virt_use_nfs',`
fs_manage_nfs_dirs(virtqemud_t)
fs_manage_nfs_files(virtqemud_t)
fs_read_nfs_symlinks(virtqemud_t)
fs_mmap_nfs_files(virtqemud_t)
')

optional_policy(`
Expand Down

0 comments on commit 6cf9059

Please sign in to comment.