Re: [PATCH v2 7/7] usb: fix UAF when probe runs concurrent to dyn ID removal
From: Danilo Krummrich
Date: Tue Jul 07 2026 - 09:53:10 EST
On 7/7/26 2:26 PM, Gary Guo wrote:
> Dynamic IDs are only guaranteed to be valid when usb_dynids_lock is held,
> as remove_id_store can free the node. Thus, make a copy in
> usb_probe_interface. Clarify the documentation that the id parameter is
> only valid during the probe.
>
> USB serial has the same pattern, but it does not need fixing as the IDs
> cannot be removed via sysfs.
>
> Fixes: 0c7a2b72746a ("USB: add remove_id sysfs attr for usb drivers")
> Signed-off-by: Gary Guo <gary@xxxxxxxxxxx>
Reviewed-by: Danilo Krummrich <dakr@xxxxxxxxxx>