Hide Forgot
Description of problem: With the virDomainOpenGraphics() API, a client app running unconfined creates a UNIX domain socket (using socketpair()). These socket FDs are label unconfined. It then passes one of these sockets to libvirtd using virDomainOpenGraphics, which passes the socket onto QEMU. Before passing the socket to QEMU, libvirt must relabel it to svirt_image_t to allow QEMU the ability to use the socket - otherwise it gets silently dropped by sendmsg/recvmsg with an AVC type=AVC msg=audit(1377167900.795:1188): avc: denied { getattr } for pid=6642 comm="qemu-system-x86" scontext=unconfined_u:system_r:svirt_t:s0:c264,c560 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_stream_socket The fix to make libvirtd do this relabelling is tracked in bug 999914. When I fix it to do relabelling though, libvirtd itself now triggers an AVC type=AVC msg=audit(1377168984.442:1190): avc: denied { relabelto } for pid=3521 comm="lt-libvirtd" name="UNIX" dev="sockfs" ino=879718 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:svirt_image_t:s0:c264,c560 tclass=unix_stream_socket IIUC, the problem is the virt.te policy has the following rule allow virtd_t self:unix_stream_socket { connectto create_stream_socket_perms }; whereas I believe it should be allow virtd_t self:unix_stream_socket { relabelto connectto create_stream_socket_perms }; Version-Release number of selected component (if applicable): selinux-policy-3.7.19-211 How reproducible: Always
Could you re-test it with https://brewweb.devel.redhat.com/buildinfo?buildID=291782
More fixes have been added during RHEL6.5 cycle related to libvirt and this bug should be fixed. If no, please re-open the bug and it will be addressed in RHEL6.6.