From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] net/i40e: fix out-of-bounds writes during vector Rx Date: Fri, 22 Jul 2016 01:35:20 +0200 Message-ID: <6304169.rKuDhdIg10@xps13> References: <1469099018-31402-1-git-send-email-i.maximets@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Helin Zhang , Jingjing Wu , Zhe Tao , Heetae Ahn To: Ilya Maximets , Sergey Dyasly Return-path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id C38DA5A89 for ; Fri, 22 Jul 2016 01:35:22 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id q128so5711655wma.1 for ; Thu, 21 Jul 2016 16:35:22 -0700 (PDT) In-Reply-To: <1469099018-31402-1-git-send-email-i.maximets@samsung.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-07-21 14:03, Ilya Maximets: > From: Sergey Dyasly > > Rx loop inside _recv_raw_pkts_vec() ignores nb_pkts argument and always > tries to receive RTE_I40E_VPMD_RX_BURST (32) packets. This is a violation > of rte_eth_rx_burst() API and can lead to memory corruption (out-of-bounds > writes to struct rte_mbuf **rx_pkts) if nb_pkts is less than 32. > > Fix this by actually using nb_pkts inside the loop. > > Fixes: 9ed94e5bb04e ("i40e: add vector Rx") > > Signed-off-by: Sergey Dyasly > Acked-by: Ilya Maximets Applied, thanks