Bug 1286329 - svirt_t can't read udev_var_run_t and apparently needs to for usb passthrough to work on device in use by host
svirt_t can't read udev_var_run_t and apparently needs to for usb passthrough...
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-28 00:40 EST by sorasl
Modified: 2016-12-20 11:22 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 11:22:15 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description sorasl 2015-11-28 00:40:11 EST
Description of problem:
After adding a usb host device in virt-manager to a VM, it fails to attach because of the current policy with svirt_t unable to read udev_var_run_t.

I don't know if libvirt should change how it's handling something or the policy needs to change.

Note that this is a device currently in use by the host. Tested with USB mouse.

Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.13.1-155.fc23.noarch

How reproducible:
Always

Steps to Reproduce:
Note that in the case of the mouse, you'll lose access to it unless you prepare a virsh line to detach it from the guest
1. Create a VM
2. Add Hardware -> Add UsbHost Device (Choose the usb mouse currently being used by host)
3. Start VM

Actual results:
Device isn't accessible by the guest.

Expected results:
Device is seen and is useable on the guest, with the ability to detatch and attach usb devices at will.

Additional info:
Audit log when vm starts
type=AVC msg=audit(1448686042.379:2999): avc:  denied  { read } for  pid=32397 comm="qemu-system-x86" name="c189:6" dev="tmpfs" ino=6901406 scontext=system_u:system_r:svirt_t:s0:c450,c616 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=0
type=AVC msg=audit(1448686042.379:3000): avc:  denied  { read } for  pid=32397 comm="qemu-system-x86" name="c189:2" dev="tmpfs" ino=15679 scontext=system_u:system_r:svirt_t:s0:c450,c616 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=0
type=AVC msg=audit(1448686042.379:3001): avc:  denied  { read } for  pid=32397 comm="qemu-system-x86" name="c189:3" dev="tmpfs" ino=16750 scontext=system_u:system_r:svirt_t:s0:c450,c616 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=0
type=AVC msg=audit(1448686042.379:3002): avc:  denied  { read } for  pid=32397 comm="qemu-system-x86" name="c189:4" dev="tmpfs" ino=16746 scontext=system_u:system_r:svirt_t:s0:c450,c616 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=0
type=AVC msg=audit(1448686042.379:3003): avc:  denied  { read } for  pid=32397 comm="qemu-system-x86" name="c189:0" dev="tmpfs" ino=14213 scontext=system_u:system_r:svirt_t:s0:c450,c616 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=0
type=AVC msg=audit(1448686042.379:3004): avc:  denied  { read } for  pid=32397 comm="qemu-system-x86" name="c189:128" dev="tmpfs" ino=16417 scontext=system_u:system_r:svirt_t:s0:c450,c616 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=0
type=AVC msg=audit(1448686042.379:3005): avc:  denied  { read } for  pid=32397 comm="qemu-system-x86" name="+usb:1-0:1.0" dev="tmpfs" ino=14214 scontext=system_u:system_r:svirt_t:s0:c450,c616 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=0
type=AVC msg=audit(1448686042.379:3006): avc:  denied  { read } for  pid=32397 comm="qemu-system-x86" name="+usb:1-3:1.0" dev="tmpfs" ino=6901410 scontext=system_u:system_r:svirt_t:s0:c450,c616 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=0
type=AVC msg=audit(1448686042.380:3007): avc:  denied  { read } for  pid=32397 comm="qemu-system-x86" name="+usb:1-13:1.0" dev="tmpfs" ino=16751 scontext=system_u:system_r:svirt_t:s0:c450,c616 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=0
type=AVC msg=audit(1448686042.380:3008): avc:  denied  { read } for  pid=32397 comm="qemu-system-x86" name="+usb:1-14:1.0" dev="tmpfs" ino=16747 scontext=system_u:system_r:svirt_t:s0:c450,c616 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=0
type=AVC msg=audit(1448686042.380:3009): avc:  denied  { read } for  pid=32397 comm="qemu-system-x86" name="+usb:2-0:1.0" dev="tmpfs" ino=15627 scontext=system_u:system_r:svirt_t:s0:c450,c616 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=0
Comment 1 Fedora End Of Life 2016-11-24 08:48:06 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 2 Fedora End Of Life 2016-12-20 11:22:15 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.