Linux virtualization list
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Weiming Shi" <bestswngs@gmail.com>
Cc: virtualization@lists.linux.dev,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH net] virtio_net: atomically disable rx mode work
Date: Sat, 17 Oct 2026 11:48:33 +0000	[thread overview]
Message-ID: <sashiko-outbox-175498@kernel.org> (raw)
In-Reply-To: <20261017114237.2786302-2-bestswngs@gmail.com>

> virtio-net uses a boolean to gate rx_mode_work during device teardown.
> The flag is changed under RTNL, but ndo_set_rx_mode checks it under the
> address-list lock. A callback can therefore pass the check and enqueue work
> after teardown has flushed it. The work is also enabled before late
> probe operations that can fail, allowing probe unwind to free the netdev
> with work still queued.
> 
> KASAN reports the worker using a virtqueue that probe unwind already freed:
> 
>   BUG: KASAN: slab-use-after-free in virtqueue_add_split
>   Workqueue: events virtnet_rx_mode_work
>   Call Trace:
>    virtqueue_add_split (drivers/virtio/virtio_ring.c:706)
>    virtqueue_add_sgs (drivers/virtio/virtio_ring.c:2839)
>    virtnet_send_command_reply (drivers/net/virtio_net.c:3565)
> [ ... ]
> Fixes: b9f7425239a0 ("virtio-net: convert rx mode setting to use workqueue")
> Cc: stable@vger.kernel.org
> Reported-by: <co+d17c2bc750a9cbbb@bugs.sh>
> Assisted-by: LLM
> Signed-off-by: Weiming Shi <bestswngs@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261017114237.2786302-2-bestswngs@gmail.com?part=1


      reply	other threads:[~2026-10-17 11:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-17 11:42 [PATCH net] virtio_net: atomically disable rx mode work Weiming Shi
2026-10-17 11:48 ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-175498@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bestswngs@gmail.com \
    --cc=eperezma@redhat.com \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=virtualization@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox