Bug 801284

Summary: usb-host accepting out-of-range values for various parameters ending an invalid usb device occupy an ehci port
Product: Red Hat Enterprise Linux 7 Reporter: Shaolong Hu <shu>
Component: qemu-kvm-rhevAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.0CC: bsarathy, huding, juzhang, knoel, michen, mkenneth, rbalakri, virt-maint
Target Milestone: rc   
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu 2.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 09:41:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Shaolong Hu 2012-03-08 07:44:31 UTC
Description of problem:
------------------------
Usb-host accepting out-of-range values for various parameters, and the invalid usb device occupies an echi port. 


Version-Release number of selected component (if applicable):
--------------------------------------------------------------
qemu-kvm-0.12.1.2-2.238.el6.x86_64


How reproducible:
-----------------
100%

Steps to Reproduce:
--------------------
1.boot guest with "-device usb-ehci"
(qemu) device_add usb-host,hostbus=423,hostaddr=432,id=u4
(qemu) device_add usb-host,vendorid=21231,productid=11231333,id=test-3

  
Actual results:
----------------
  Device 1.0, Port 1, Speed 1.5 Mb/s, Product USB Host Device
  Device 1.0, Port 2, Speed 1.5 Mb/s, Product USB Host Device


Expected results:
-----------------
Parameter range check, host usb device existing check.

Comment 5 Ronen Hod 2013-10-30 09:52:51 UTC
Needs to be fixed. After upstream.

Comment 6 Gerd Hoffmann 2013-12-12 13:49:22 UTC
http://patchwork.ozlabs.org/patch/300664/

Comment 10 huiqingding 2014-08-04 07:00:19 UTC
Reproduce this bug using the following version:
qemu-kvm-rhev-2.0.0-3.el7ev.x86_64
kernel-3.10.0-140.el7.x86_64

Steps to Reproduce:
1. boot a vm with "-device usb-ehci"
# /usr/libexec/qemu-kvm -device usb-ehci -monitor stdio

2. add two usb device with error parameters
(qemu) device_add usb-host,hostbus=423,hostaddr=432,id=u4
(qemu) device_add usb-host,vendorid=21231,productid=11231333,id=test-3

Results:
after step2, no error info is output and the devices can be added as following:
(qemu) info usb
  Device 0.0, Port 1, Speed 1.5 Mb/s, Product USB Host Device
  Device 0.0, Port 2, Speed 1.5 Mb/s, Product USB Host Device

Comment 11 huiqingding 2014-08-04 07:03:36 UTC
Test this bug on an intel host using the following version:
qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64
kernel-3.10.0-140.el7.x86_64

Steps to Reproduce:
1. boot a vm with "-device usb-ehci"
# /usr/libexec/qemu-kvm -device usb-ehci -monitor stdio

2. add two usb device with error parameters
(qemu) device_add usb-host,hostbus=423,hostaddr=432,id=u4
(qemu) device_add usb-host,vendorid=21231,productid=11231333,id=test-3

Results:
after step2, the devices cannot be added as following:
(qemu) device_add usb-host,hostbus=423,hostaddr=432,id=u4
hostaddr out of range
Device initialization failed.
Device 'usb-host' could not be initialized
(qemu) device_add usb-host,vendorid=21231,productid=11231333,id=test-3
productid out of range
Device initialization failed.
Device 'usb-host' could not be initialized
(qemu) info usb
(qemu)

Comment 12 huiqingding 2014-08-04 07:04:18 UTC
Test this bug on an amd host using the following version:
qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64
kernel-3.10.0-140.el7.x86_64

Steps to Reproduce:
1. boot a vm with "-device usb-ehci"
# /usr/libexec/qemu-kvm -device usb-ehci -monitor stdio

2. add two usb device with error parameters
(qemu) device_add usb-host,hostbus=423,hostaddr=432,id=u4
(qemu) device_add usb-host,vendorid=21231,productid=11231333,id=test-3

Results:
after step2, the devices cannot be added as following:
(qemu) device_add usb-host,hostbus=423,hostaddr=432,id=u4
hostaddr out of range
Device initialization failed.
Device 'usb-host' could not be initialized
(qemu) device_add usb-host,vendorid=21231,productid=11231333,id=test-3
productid out of range
Device initialization failed.
Device 'usb-host' could not be initialized
(qemu) info usb
(qemu)

Comment 14 huiqingding 2014-08-26 01:37:26 UTC
Test this bug on an amd host using the following version:
qemu-kvm-rhev-2.1.0-2.el7.x86_64
kernel-3.10.0-145.el7.x86_64

Steps to Reproduce:
1. boot a vm with "-device usb-ehci"
# /usr/libexec/qemu-kvm -device usb-ehci -monitor stdio

2. add two usb device with error parameters
(qemu) device_add usb-host,hostbus=423,hostaddr=432,id=u4
(qemu) device_add usb-host,vendorid=21231,productid=11231333,id=test-3

Results:
after step2, the devices cannot be added as following:
(qemu) device_add usb-host,hostbus=423,hostaddr=432,id=u4
hostaddr out of range
Device initialization failed.
Device 'usb-host' could not be initialized
(qemu) device_add usb-host,vendorid=21231,productid=11231333,id=test-3
productid out of range
Device initialization failed.
Device 'usb-host' could not be initialized
(qemu) info usb
(qemu)

Comment 15 huiqingding 2014-08-26 01:38:38 UTC
Test this bug on an intel host using the following version:
qemu-kvm-rhev-2.1.0-2.el7.x86_64
kernel-3.10.0-145.el7.x86_64

Steps to Reproduce:
1. boot a vm with "-device usb-ehci"
# /usr/libexec/qemu-kvm -device usb-ehci -monitor stdio

2. add two usb device with error parameters
(qemu) device_add usb-host,hostbus=423,hostaddr=432,id=u4
(qemu) device_add usb-host,vendorid=21231,productid=11231333,id=test-3

Results:
after step2, the devices cannot be added as following:
(qemu) device_add usb-host,hostbus=423,hostaddr=432,id=u4
hostaddr out of range
Device initialization failed.
Device 'usb-host' could not be initialized
(qemu) device_add usb-host,vendorid=21231,productid=11231333,id=test-3
productid out of range
Device initialization failed.
Device 'usb-host' could not be initialized
(qemu) info usb
(qemu)

Comment 16 huiqingding 2014-08-26 01:39:37 UTC
Based on the test result of comment 14 and comment 15, I think this bug has been fixed.

Comment 19 errata-xmlrpc 2015-03-05 09:41:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0624.html