From: Maxime Coquelin <mcoqueli@redhat.com>
To: Yunjian Wang <wangyunjian@huawei.com>
Cc: dev@dpdk.org, maxime.coquelin@redhat.com,
jerry.lilijun@huawei.com, stable@dpdk.org
Subject: Re: [PATCH v3] vhost: fix a double fetch when dequeue offloading
Date: Tue, 14 Oct 2025 17:18:19 +0200 [thread overview]
Message-ID: <CAO55cswe4wBEXViTqnSOb9P0EpXKtbEaRwhj9wEEb42XVcJBaA@mail.gmail.com> (raw)
In-Reply-To: <1760085696-35028-1-git-send-email-wangyunjian@huawei.com>
Hi Yunijan,
On Fri, Oct 10, 2025 at 10:41 AM Yunjian Wang <wangyunjian@huawei.com> wrote:
>
> The hdr->csum_start does two successive reads from user space to read a
> variable length data structure. The result overflow if the data structure
> changes between the two reads.
>
> To fix this, we can prevent double fetch issue by copying virtio_hdr to
> the temporary variable.
>
> Fixes: 4dc4e33ffa10 ("net/virtio: fix Rx checksum calculation")
> Cc: stable@dpdk.org
>
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---
> v3: update code styles suggested by Stephen Hemminger
> ---
> lib/vhost/virtio_net.c | 50 ++++++++++++++++++++++--------------------
> 1 file changed, 26 insertions(+), 24 deletions(-)
>
Thanks for spotting this.
The patch looks good to me:
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime
next prev parent reply other threads:[~2025-10-14 15:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 6:38 [PATCH 1/1] " Yunjian Wang
2024-12-19 8:24 ` David Marchand
2024-12-19 11:02 ` Wangyunjian(wangyunjian,TongTu)
2024-12-19 16:15 ` Stephen Hemminger
2024-12-20 2:17 ` Wangyunjian(wangyunjian,TongTu)
2024-12-20 4:59 ` Stephen Hemminger
2024-12-20 3:49 ` [PATCH v2 " Yunjian Wang
2024-12-20 17:10 ` Stephen Hemminger
2025-02-13 12:22 ` Wangyunjian(wangyunjian,TongTu)
2025-10-06 9:37 ` Maxime Coquelin
2025-10-10 8:41 ` [PATCH v3] " Yunjian Wang
2025-10-14 15:18 ` Maxime Coquelin [this message]
2024-12-20 16:35 ` [PATCH 1/1] " Stephen Hemminger
2024-12-23 2:45 ` Wangyunjian(wangyunjian,TongTu)
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=CAO55cswe4wBEXViTqnSOb9P0EpXKtbEaRwhj9wEEb42XVcJBaA@mail.gmail.com \
--to=mcoqueli@redhat.com \
--cc=dev@dpdk.org \
--cc=jerry.lilijun@huawei.com \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
--cc=wangyunjian@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).