lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iKTB2w+Dh-Aka1o5bs9WKkUGo7RqraPYJ+3gpDzzS3fQw@mail.gmail.com>
Date: Tue, 13 Jan 2026 09:33:21 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Simon Schippers <simon.schippers@...dortmund.de>
Cc: oneukum@...e.com, andrew+netdev@...n.ch, davem@...emloft.net, 
	kuba@...nel.org, pabeni@...hat.com, dnlplm@...il.com, netdev@...r.kernel.org, 
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Bard Liao <yung-chuan.liao@...ux.intel.com>
Subject: Re: [PATCH net] usbnet: fix crash due to missing BQL accounting after resume

On Tue, Jan 13, 2026 at 8:51 AM Simon Schippers
<simon.schippers@...dortmund.de> wrote:
>
> In commit 7ff14c52049e ("usbnet: Add support for Byte Queue Limits
> (BQL)"), it was missed that usbnet_resume() may enqueue SKBs using
> __skb_queue_tail() without reporting them to BQL. As a result, the next
> call to netdev_completed_queue() triggers a BUG_ON() in dql_completed(),
> since the SKBs queued during resume were never accounted for.
>
> This patch fixes the issue by adding a corresponding netdev_sent_queue()
> call in usbnet_resume() when SKBs are queued after suspend. Because
> dev->txq.lock is held at this point, no concurrent calls to
> netdev_sent_queue() from usbnet_start_xmit() can occur.
>
> The crash can be reproduced by generating network traffic
> (e.g. iperf3 -c ... -t 0), suspending the system, and then waking it up
> (e.g. rtcwake -m mem -s 5).
>
> When testing USB2 Android tethering (cdc_ncm), the system crashed within
> three suspend/resume cycles without this patch. With the patch applied,
> no crashes were observed after 90 cycles. Testing with an AX88179 USB
> Ethernet adapter also showed no crashes.
>
> Reported-by: Bard Liao <yung-chuan.liao@...ux.intel.com>
> Tested-by: Bard Liao <yung-chuan.liao@...ux.intel.com>
> Tested-by: Simon Schippers <simon.schippers@...dortmund.de>
> Signed-off-by: Simon Schippers <simon.schippers@...dortmund.de>
> ---

We request/need Fixes: tag for net patches, in the footer.
And we prefer it to be the first tag.

Fixes: 7ff14c52049e ("usbnet: Add support for Byte Queue Limits (BQL)")
...
Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Thanks !

>  drivers/net/usb/usbnet.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
> index 36742e64cff7..35789ff4dd55 100644
> --- a/drivers/net/usb/usbnet.c
> +++ b/drivers/net/usb/usbnet.c
> @@ -1984,6 +1984,7 @@ int usbnet_resume(struct usb_interface *intf)
>                         } else {
>                                 netif_trans_update(dev->net);
>                                 __skb_queue_tail(&dev->txq, skb);
> +                               netdev_sent_queue(dev->net, skb->len);
>                         }
>                 }
>
> --
> 2.43.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ