From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=61PYNwis4sKfacL8HkvMqrfU/Jo2glBBfS8Dv8IhAos=; b=0u7dt90CfmPWuZDYWQG3cowqfnr2iAtwnM9oFN9/If1pjKfzn9C3o2H5hsC33n+WDd PICaxZzQBXcI0iEel3OCH82PXz/af+2KsA4LmDBNRaB9dWlqIntLhAcWhIC7DcfYcmGo M8Yt22c8v789IiBKH1zbv/ItmoQd50N5ot1jE3yX01dS3m53bNYpluZW6qGBRhklhDI4 mYiAn0KS2SeN64p0FggMSpeahq05HsoBtsSmc1/y1G/tXPnvW2taU42gZmpgKLStjFr0 QD11PwgQpBj76/z3OqaNdHRLBnb+5RuWj4jR+FKK2cG2fS49z5B58cH2hhW81DTYKxMh ihPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=61PYNwis4sKfacL8HkvMqrfU/Jo2glBBfS8Dv8IhAos=; b=mknciIgvVyXEBfPSewMhxd5KBg0rVe1RNXoed5bOTgQz7GzGUcW46/9wSZ6MkNlb0r P5SfK/r+BSzxV4em+WVqC67qSM9ODwK89HlBvgLeNRERCSxCxq3nWm4SXWsKsv9cxYFk /iYKkMJDoFzfBtypUIcCGZPnS8aKV3A+4Ivgy2x+gcnKpadOZO+66BZKaYiEMRDJWu/k zyr5NOziPFe4IMsrM3ClHim/rtTEelUjhz+QYXV7kPwDEKNnwc5zfpFvJIDfmnuVUFpb U8I0im7xVwaHiKd7V/+Hq9RuN77gGKYYfgMMHHWgcZEgh+69hO1P9EsCfENIVA4G5uNL wc8A== X-Gm-Message-State: ALyK8tId5VVGVG5zhwN5zuMYtgtk5ilPUALoNxEg04t5NjZu0SP3gsH1GKU+/lcu2QdZ5dk1 X-Received: by 10.28.25.135 with SMTP id 129mr20137897wmz.59.1469144121589; Thu, 21 Jul 2016 16:35:21 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id o142sm8109210wme.20.2016.07.21.16.35.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jul 2016 16:35:21 -0700 (PDT) From: Thomas Monjalon To: Ilya Maximets , Sergey Dyasly Cc: dev@dpdk.org, Helin Zhang , Jingjing Wu , Zhe Tao , Heetae Ahn Date: Fri, 22 Jul 2016 01:35:20 +0200 Message-ID: <6304169.rKuDhdIg10@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1469099018-31402-1-git-send-email-i.maximets@samsung.com> References: <1469099018-31402-1-git-send-email-i.maximets@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix out-of-bounds writes during vector Rx X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2016 23:35:22 -0000 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