Re: [PATCH] usb: cdc-wdm: fix double submission of URB
From: Oliver Neukum
Date: Thu Dec 03 2026 - 03:44:54 EST
On 02.12.26 22:04, Timo Joannin wrote:
Syzbot found a bug where "URB submitted while active".
This is because service_outstanding_interrupt() doesn't check whether
WDM_RESPONDING is already set and allows it to resubmit an already
active URB triggering the warning.
Hi,
thank you for looking into this.
@@ -491,6 +490,10 @@ static int service_outstanding_interrupt(struct wdm_device *desc)
{
int rv = 0;
+ /* don't submit or consume interrupt if URB already active */
+ if (test_bit(WDM_RESPONDING, &desc->flags))
+ goto out;
Are you sure we can divorce testing and setting the bit?
It seems to me that this leaves the race open the open way
round.
Regards
Oliver