From: Greg KH <gregkh@linuxfoundation.org>
To: Hyokyung Kim <pulpannie@gmail.com>
Cc: stable@vger.kernel.org, Sasha Levin <sashal@kernel.org>,
"Michael S . Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>
Subject: Re: [PATCH 6.1.y] virtio_net: clamp rss_indir_table_size to VIRTIO_NET_RSS_MAX_TABLE_LEN
Date: Thu, 20 Aug 2026 15:49:10 +0200 [thread overview]
Message-ID: <2026082033-driven-tumbling-f69d@gregkh> (raw)
In-Reply-To: <20260703105256.3884798-1-pulpannie@gmail.com>
On Fri, Jul 03, 2026 at 07:52:56PM +0900, Hyokyung Kim wrote:
> virtnet_probe() reads rss_max_indirection_table_length from the device
> config space into vi->rss_indir_table_size and later uses it as the
> number of entries to write into the fixed-size 128-entry indirection
> table in struct virtio_net_ctrl_rss (in virtnet_init_default_rss(), and
> again in virtnet_set_rxfh()/virtnet_get_rxfh()), without validating it
> against VIRTIO_NET_RSS_MAX_TABLE_LEN. A malicious or buggy device can
> report a length larger than 128 and overflow the array, corrupting
> adjacent slab memory. This is reachable at probe time, before the
> interface is brought up.
>
> This was fixed upstream by commit 86a48a00efdf ("virtio_net: Support
> dynamic rss indirection table size"), which reworks the driver to
> allocate the indirection table dynamically. However that change is too
> large to backport to stable. Instead, clamp the device-advertised length
> to VIRTIO_NET_RSS_MAX_TABLE_LEN: this solves the overflow with minimal
> changes.
Why is it "too large"? Again, we want to keep as close as possible to
upstream as diverging will cause bugs and maintenance problems over
time.
thanks,
greg k-h
next prev parent reply other threads:[~2026-08-20 14:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 0:51 [LTS Backport Request] Fix RSS indirection table OOB write (6.1.y, 6.6.y) Annie Kim
2026-06-30 22:23 ` Sasha Levin
2026-07-03 10:50 ` [PATCH 6.6.y] virtio_net: clamp rss_indir_table_size to VIRTIO_NET_RSS_MAX_TABLE_LEN Hyokyung Kim
2026-07-04 2:05 ` Sasha Levin
2026-07-06 5:48 ` Annie Kim
2026-07-03 10:52 ` [PATCH 6.1.y] " Hyokyung Kim
2026-08-20 13:49 ` Greg KH [this message]
2026-08-21 4:33 ` Sasha Levin
2026-07-10 11:19 ` [PATCH 6.6.y] virtio_net: Support dynamic rss indirection table size Hyokyung Kim
2026-07-10 21:03 ` Sasha Levin
2026-07-10 11:25 ` [PATCH 6.1.y] " Hyokyung Kim
2026-07-10 21:03 ` Sasha Levin
2026-07-10 12:49 ` [PATCH 6.6.y] " Hyokyung Kim
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=2026082033-driven-tumbling-f69d@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=pulpannie@gmail.com \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/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