From: sashiko-bot@kernel.org
To: "Fang Xieyan" <fangxy@xiaopeng.com>
Cc: virtualization@lists.linux.dev, kvm@vger.kernel.org,
"Eugenio Perez" <eperezma@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH v2] vringh: reject empty / undersized indirect descriptor tables
Date: Sat, 26 Sep 2026 16:16:01 +0000 [thread overview]
Message-ID: <20260926161601.A4A301F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260926160755.21485-1-fangxy@xiaopeng.com>
> move_to_indirect() validates an indirect descriptor table only with
> "len % sizeof(struct vring_desc)". A descriptor flagged
> VRING_DESC_F_INDIRECT with len == 0 passes that test, so *desc_max is
> set to 0 while *descs points at the empty table. __vringh_iov() then
> copies one struct vring_desc from descs[0] -- 16 bytes past the end of
> the table -- before the "indirect_count > desc_max" loop detection
> aborts the walk. The over-read value is discarded when the walk aborts
> and is never used to map anything, but the access itself is out of
> bounds.
>
> Reject any len smaller than one descriptor, alongside the existing
> stride check, so an empty table is refused with -EINVAL and no
> descriptor is ever fetched from it.
>
> Fixes: f87d0fbb5798 ("vringh: host-side implementation of virtio rings.")
> Cc: stable@vger.kernel.org
> Assisted-by: Hawkeye:GLM-5.3-flash
> Assisted-by: Qoder:Qwen3.8-Max
> Signed-off-by: Fang Xieyan <fangxy@xiaopeng.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260926160755.21485-1-fangxy@xiaopeng.com?part=1
prev parent reply other threads:[~2026-09-26 16:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 3:06 [PATCH] vringh: reject empty / undersized indirect descriptor tables Fang Xieyan
2026-09-24 3:13 ` sashiko-bot
2026-09-24 15:56 ` Michael S. Tsirkin
2026-09-26 16:07 ` [PATCH v2] " Fang Xieyan
2026-09-26 16:16 ` 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=20260926161601.A4A301F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eperezma@redhat.com \
--cc=fangxy@xiaopeng.com \
--cc=kvm@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.