2017-04-26 07:32:17 |
Christian Ehrhardt |
bug |
|
|
added bug |
2017-04-26 07:33:00 |
Christian Ehrhardt |
libvirt (Ubuntu): status |
New |
Triaged |
|
2017-04-26 07:33:03 |
Christian Ehrhardt |
libvirt (Ubuntu): importance |
Undecided |
Medium |
|
2017-04-26 07:34:45 |
Christian Ehrhardt |
tags |
|
server-next |
|
2017-04-26 07:35:02 |
Christian Ehrhardt |
bug |
|
|
added subscriber Ubuntu Server Team |
2017-04-26 07:35:27 |
Christian Ehrhardt |
tags |
server-next |
server-next virt-aa-helper |
|
2017-06-13 13:39:05 |
Christian Ehrhardt |
tags |
server-next virt-aa-helper |
virt-aa-helper |
|
2017-09-10 16:32:56 |
RussianNeuroMancer |
bug |
|
|
added subscriber RussianNeuroMancer |
2017-09-14 13:25:45 |
Christian Ehrhardt |
libvirt (Ubuntu): status |
Triaged |
In Progress |
|
2017-10-24 15:33:51 |
Christian Ehrhardt |
description |
Libvirt-aa-helper seems to have a bug when adding usb passthrough devices statically.
On hotplug with:
$ cat sandisk-usb.xml
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<!--
idVendor 0x0781 SanDisk Corp.
idProduct 0x5580 SDCZ80 Flash Drive
-->
<vendor id='0x0781'/>
<product id='0x5580'/>
</source>
</hostdev>
$ virsh attach-device z-test1 sandisk-usb.xml
It generates correctly:
"/dev/bus/usb/003/003" rw,
But if adding the same XML part to the guest xml itself it generates:
"/dev/bus/usb/000/000" rw,
And as a follow on issue the guest start fails with:
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/003/003: Permission denied
Due to:
apparmor="DENIED" operation="open" profile="libvirt-adc578cb-905f-41fc-9be2-9fb81f6a6073" name="/dev/bus/usb/003/003" pid=22879 comm="qemu-system-x86" requested_mask="wr" denied_mask="wr" fsuid=123 ouid=123 |
[Impact]
* USB Host devices fail to add statically
* The reason is that libvirt has not yet initialized usb devices
* Fix by back-porting small upstream change
[Test Case]
* Create a VM Guest (e.g. via uvtool)
* Shut down the guest
* virsh edit <guestname>
* Add a usb hostdev from your System (check lsusb for IDs)
* See the original description below for XML examples
* Starting the guest will create a wrong rule
"/dev/bus/usb/000/000" rw,
And due to that fails to start.
[Regression Potential]
* The change is small and only makes certain values available to libvirt
* The only thing I could think of regressing is if that
virHostdevFindUSBDevice would crash on some systems, but then it would
fail later on in the lifecycle even without the patch - so we should be
safe IMHO.
[Other Info]
* I waited to be accepted upstream to be more confident which is
partially why this took so long but provides some extra confidence.
---
Libvirt-aa-helper seems to have a bug when adding usb passthrough devices statically.
On hotplug with:
$ cat sandisk-usb.xml
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<!--
idVendor 0x0781 SanDisk Corp.
idProduct 0x5580 SDCZ80 Flash Drive
-->
<vendor id='0x0781'/>
<product id='0x5580'/>
</source>
</hostdev>
$ virsh attach-device z-test1 sandisk-usb.xml
It generates correctly:
"/dev/bus/usb/003/003" rw,
But if adding the same XML part to the guest xml itself it generates:
"/dev/bus/usb/000/000" rw,
And as a follow on issue the guest start fails with:
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/003/003: Permission denied
Due to:
apparmor="DENIED" operation="open" profile="libvirt-adc578cb-905f-41fc-9be2-9fb81f6a6073" name="/dev/bus/usb/003/003" pid=22879 comm="qemu-system-x86" requested_mask="wr" denied_mask="wr" fsuid=123 ouid=123 |
|
2017-10-24 18:43:22 |
Andy Whitcroft |
libvirt (Ubuntu Artful): status |
In Progress |
Fix Committed |
|
2017-10-24 18:43:24 |
Andy Whitcroft |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2017-10-24 18:43:27 |
Andy Whitcroft |
bug |
|
|
added subscriber SRU Verification |
2017-10-24 18:43:30 |
Andy Whitcroft |
tags |
virt-aa-helper |
verification-needed verification-needed-artful virt-aa-helper |
|
2017-10-25 06:22:38 |
Christian Ehrhardt |
nominated for series |
|
Ubuntu Zesty |
|
2017-10-25 06:22:38 |
Christian Ehrhardt |
bug task added |
|
libvirt (Ubuntu Zesty) |
|
2017-10-25 06:22:38 |
Christian Ehrhardt |
nominated for series |
|
Ubuntu Xenial |
|
2017-10-25 06:22:38 |
Christian Ehrhardt |
bug task added |
|
libvirt (Ubuntu Xenial) |
|
2017-10-25 12:23:21 |
Christian Ehrhardt |
tags |
verification-needed verification-needed-artful virt-aa-helper |
verification-done verification-done-artful virt-aa-helper |
|
2017-11-01 00:27:49 |
Launchpad Janitor |
libvirt (Ubuntu Artful): status |
Fix Committed |
Fix Released |
|
2017-11-01 00:28:03 |
Chris Halse Rogers |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2017-11-05 09:41:40 |
Launchpad Janitor |
libvirt (Ubuntu): status |
Fix Committed |
Fix Released |
|
2021-11-04 10:54:09 |
Christian Ehrhardt |
libvirt (Ubuntu Xenial): status |
New |
Won't Fix |
|
2021-11-04 10:54:11 |
Christian Ehrhardt |
libvirt (Ubuntu Zesty): status |
New |
Won't Fix |
|
2021-11-04 10:54:32 |
Christian Ehrhardt |
removed subscriber Ubuntu Server |
|
|
|