Skip to content

Commit

Permalink
Allow svirt_t read sysfs files
Browse files Browse the repository at this point in the history
Triggered by:
virt-install --import --disk /var/lib/libvirt/images/image.qcow2 -r 4000 --machine machinetype -n instancename --osinfo generic

The commit addresses the following AVC denial:
type=AVC msg=audit(1733476544.855:6456): avc:  denied  { read } for  pid=369525 comm="qemu-system-x86" name="possible" dev="sysfs" ino=4677 scontext=system_u:system_r:svirt_t:s0:c199,c344 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0

Resolves: rhbz#2330756
  • Loading branch information
zpytela committed Jan 14, 2025
1 parent 97be274 commit c53a237
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions policy/modules/contrib/virt.te
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ corenet_udp_bind_all_ports(svirt_t)
corenet_tcp_bind_all_ports(svirt_t)
corenet_tcp_connect_all_ports(svirt_t)

dev_read_sysfs(svirt_t)
dev_rw_dma_dev(svirt_t)

init_dontaudit_read_state(svirt_t)
Expand Down

0 comments on commit c53a237

Please sign in to comment.