[PATCH v2 0/2] usb-host: validate and release configuration descriptors

Junjie Cao posted 2 patches 1 month, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20261005054626.131577-1-junjie.cao@linux.dev
hw/usb/host-libusb.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
[PATCH v2 0/2] usb-host: validate and release configuration descriptors
Posted by Junjie Cao 1 month, 2 weeks ago
The libusb host backend reads interface numbers from the active
configuration descriptor while opening a device. An out-of-range number
can index past USBDevice.altsetting. The backend also leaves an allocated
descriptor behind on endpoint parse and interface claim failures.

Changes in v2:
- Use g_autoptr for configuration descriptors in usb_host_ep_update() and
  usb_host_claim_interfaces() (Marc-André).
- Collected tags from Marc-André.

v1: https://lore.kernel.org/qemu-devel/20261004042722.6937-1-junjie.cao@linux.dev/

Junjie Cao (2):
  usb-host: validate interface number before indexing altsetting
  usb-host: free configuration descriptors on error paths

 hw/usb/host-libusb.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)


base-commit: d7a65d1793d691d356a56833620f7d1e6f5d653b
-- 
2.43.0