Skip to content

Commit

Permalink
Allow virtqemud relabelfrom virt_log_t files
Browse files Browse the repository at this point in the history
This is a follow-up commit to 5749a0a ("Allow virtqemud relabelfrom
virt_log_t files"), as it turned out also relabelfrom is needed.

The commit addresses the following AVC denial:
type=PROCTITLE msg=audit(12/20/2024 09:06:12.607:2598) : proctitle=/usr/sbin/virtqemud --timeout 120
type=AVC msg=audit(12/20/2024 09:06:12.607:2598) : avc:  denied  { relabelto } for  pid=39137 comm=rpc-virtqemud name=rhel-swtpm.log dev="dm-0" ino=202517283 scontext=system_u:system_r:virtqemud_t:s0 tcontext=system_u:object_r:virt_log_t:s0 tclass=file permissive=1
type=SYSCALL msg=audit(12/20/2024 09:06:12.607:2598) : arch=x86_64 syscall=setxattr success=yes exit=0 a0=0x55eb6bf9fa70 a1=0x7ff13bb37197 a2=0x7ff11c06a700 a3=0x20 items=0 ppid=38650 pid=39137 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)

Resolves: RHEL-48236
  • Loading branch information
zpytela committed Jan 2, 2025
1 parent 252c692 commit 1a22a5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion policy/modules/contrib/virt.te
Original file line number Diff line number Diff line change
Expand Up @@ -2151,7 +2151,7 @@ files_lock_filetrans(virtqemud_t, virtqemud_lock_t, file)

allow virtqemud_t virtqemud_var_run_t:dir relabelfrom;
allow virtqemud_t virtqemud_var_run_t:sock_file relabelfrom;
allow virtqemud_t virt_log_t:file relabelfrom;
allow virtqemud_t virt_log_t:file relabel_file_perms;

manage_dirs_pattern(virtqemud_t, virt_var_run_t, virt_var_run_t)
manage_dirs_pattern(virtqemud_t, virtqemud_var_run_t, virtqemud_var_run_t)
Expand Down

0 comments on commit 1a22a5a

Please sign in to comment.