patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Xiao Wang <xiao.w.wang@intel.com>,
	chenbo.xia@intel.com, david.marchand@redhat.com
Cc: cheng1.jiang@intel.com, dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH v5] vhost: check header for legacy dequeue offload
Date: Tue, 13 Jul 2021 11:34:18 +0200
Message-ID: <a1c246d2-41fe-1470-0b6f-5b28539f8ebf@redhat.com> (raw)
In-Reply-To: <20210621082104.76733-1-xiao.w.wang@intel.com>

Hi Xiao,

On 6/21/21 10:21 AM, Xiao Wang wrote:
> When parsing the virtio net header and packet header for dequeue offload,
> we need to perform sanity check on the packet header to ensure:
>   - No out-of-boundary memory access.
>   - The packet header and virtio_net header are valid and aligned.
> 
> Fixes: d0cf91303d73 ("vhost: add Tx offload capabilities")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
> ---
> v5:
> - Redefine the function parse_ethernet() to parse_headers(). (David)
> - Use mbuf helpers e.g. rte_pktmbuf_data_len() and rte_pktmbuf_mtod_offset(). (David)
> - Reset mbuf l2_len, l3_len and ol_flags when detecting anything invalid. (David)
> - Improve some check conditions. (David)
> - Move the data_len check for L4 header into parse_headers(), in order to avoid
>   duplicated checks in CSUM and GSO.
> - Use uint8_t instead of uint16_t for l4_proto variable.
> - Detect more invalid corner cases.
> 
> v4:
> - Rebase on head of main branch.
> - Allow empty L4 payload in GSO.
> 
> v3:
> - Check data_len before calling rte_pktmbuf_mtod. (David)
> 
> v2:
> - Allow empty L4 payload for cksum offload. (Konstantin)
> ---
>  lib/vhost/virtio_net.c | 117 +++++++++++++++++++++++++++++++++++++------------
>  1 file changed, 89 insertions(+), 28 deletions(-)
> 

Thanks for the fix, it looks good to me:

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


  reply	other threads:[~2021-07-13  9:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11  6:38 [dpdk-stable] [PATCH] vhost: add header check in " Xiao Wang
2021-03-11 10:38 ` [dpdk-stable] [dpdk-dev] " Ananyev, Konstantin
2021-03-12 15:19   ` Wang, Xiao W
2021-03-15 15:32 ` [dpdk-stable] [PATCH v2] " Xiao Wang
2021-03-15 16:17   ` David Marchand
2021-03-15 18:53     ` Ananyev, Konstantin
2021-03-16  9:13       ` Wang, Xiao W
2021-03-17  6:31 ` [dpdk-stable] [PATCH v3] " Xiao Wang
2021-04-01 12:04   ` David Marchand
2021-04-02  8:38     ` Wang, Xiao W
2021-04-12  9:08       ` Wang, Xiao W
2021-04-12  9:33         ` David Marchand
2021-04-13 14:30           ` Maxime Coquelin
2021-05-08  5:54             ` Wang, Xiao W
2021-06-15  6:35   ` [dpdk-stable] [PATCH v4] vhost: check header for legacy " Xiao Wang
2021-06-15  7:57     ` [dpdk-stable] [dpdk-dev] " David Marchand
2021-06-16 14:33       ` Wang, Xiao W
2021-06-21  8:21   ` [dpdk-stable] [PATCH v5] " Xiao Wang
2021-07-13  9:34     ` Maxime Coquelin [this message]
2021-07-20  2:43     ` Xia, Chenbo

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=a1c246d2-41fe-1470-0b6f-5b28539f8ebf@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=cheng1.jiang@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=xiao.w.wang@intel.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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git