Skip to content

usb-host: validate and release configuration descriptors

Junjie Cao qemu-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 3 repliesSuperseded

Changes in v2 from the cover letter

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

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2usb-host: validate interface number before indexing altsettinghw/usb/host-libusb.c+6 -10 replies
2/2usb-host: free configuration descriptors on error pathshw/usb/host-libusb.c+6 -50 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMarc-André Lureau
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

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

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/[email protected]/

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

Signature · 1 line
2.43.0