Re: [BUG] netdevsim: nsim_start_peer_tx_queue() indexes the peer's TX queues with an RX queue index

From: netdev-bot+sashiko

Date: Sun Nov 22 2026 - 22:49:51 EST


Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 0

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] The commit message for 7bdc53e966c0 is the raw multipart MIME
email.

--

netdevsim: nsim_start_peer_tx_queue() indexes the peer's TX queues with an RX queue index

This commit adds a check to nsim_start_peer_tx_queue() in
drivers/net/netdevsim/netdev.c. The peer's TX queue is now woken only when
rq->napi.index is below peer_dev->real_num_tx_queues.

This fixes a KASAN slab-out-of-bounds read in nsim_poll(). The read happens
when a device is relinked to a peer that has fewer TX queues while its RX
queues still hold traffic from the old peer.

> netdevsim: nsim_start_peer_tx_queue() indexes the peer's TX queues with an RX queue index
>
> --===============8293946977515997899==
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: 7bit
>
> Hi Jakub,

[Severity: Medium]
It looks like the cover email was applied here instead of the attached
patch. The subject is the title of the bug report. The attached
format-patch has its own subject:

netdevsim: bound the peer TX queue index in nsim_start_peer_tx_queue()

The changelog body is the raw multipart MIME message. It includes the MIME
boundary lines, the per-part Content-Type, Content-Transfer-Encoding and
Content-Disposition headers, and the full repro.c source. It also includes
the base64-encoded config.gz attachment:

> --===============8293946977515997899==
> Content-Type: application/gzip
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment; filename="config.gz"
> MIME-Version: 1.0
>
[ ... ]

The real changelog and its trailers come at the very end, inside the
embedded attachment, after a nested format-patch header:

> >>From 0a9629d8c7c93ef16dd000ab4cf04e9792044987 Mon Sep 17 00:00:00 2001
> From: Kyuwon Cho <kyuwoncho18@xxxxxxxxx>
> Date: Thu, 19 Nov 2026 11:36:52 +0900
> Subject: [PATCH net] netdevsim: bound the peer TX queue index in
> nsim_start_peer_tx_queue()
[ ... ]
> Fixes: ff2ac4df58ad ("netdevsim: implement peer queue flow control")
> Signed-off-by: Kyuwon Cho <kyuwoncho18@xxxxxxxxx>

Could this be re-applied from
0001-netdevsim-bound-the-peer-TX-queue-index-in-nsim_star.patch? Then the
subject and body would be the patch's own changelog, with the Fixes: and
Signed-off-by: tags kept. The reproducer and kernel config could stay in
the mail thread and be referenced with a Link: tag.

--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/179505710275.3511681.13434978152402269948%40gmail.com