mirror of
https://github.com/torvalds/linux.git
synced 2026-09-20 19:01:02 +02:00
EHCI and FOTG210 isochronous submits build an ehci_iso_sched before linking the URB to the endpoint queue, and keep the staged schedule in urb->hcpriv until iso_stream_schedule() and the link helpers consume it. If the controller is no longer accessible, or usb_hcd_link_urb_to_ep() fails, submit jumps to done_not_linked before that handoff happens and leaks the staged schedule still attached to urb->hcpriv. Free the staged schedule from done_not_linked when submit fails before the URB is linked and clear urb->hcpriv after the free. The bug was first flagged by an experimental analysis tool we are developing for kernel memory-management bugs while analyzing v6.13-rc1. The tool is still under development and is not yet publicly available. Manual inspection confirms that the bug is still present in v7.1.1. An x86_64 allyesconfig build showed no new warnings. As we do not have an EHCI host controller with a USB isochronous device to test with, no runtime testing was able to be performed. Fixes: |
||
|---|---|---|
| .. | ||
| fotg210-core.c | ||
| fotg210-hcd.c | ||
| fotg210-hcd.h | ||
| fotg210-udc.c | ||
| fotg210-udc.h | ||
| fotg210.h | ||
| Kconfig | ||
| Makefile | ||