From: Ferruh Yigit Subject: Re: [PATCH 2/2] net/tap: add buffer overflow checks before checksum Date: Thu, 20 Dec 2018 19:08:42 +0000 Message-ID: <7febd358-c8ad-ca1e-f5a1-407e04c05e78@intel.com> References: <20181217155005.13457-1-bruce.richardson@intel.com> <20181217155005.13457-3-bruce.richardson@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, stable@dpdk.org To: Bruce Richardson , Olivier Matz , Keith Wiles Return-path: In-Reply-To: <20181217155005.13457-3-bruce.richardson@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 12/17/2018 3:50 PM, Bruce Richardson wrote: > The checksum calculation APIs take only the packet headers pointers as > parameters, so they assume that the lengths reported in those headers are > correct. However, a malicious packet could claim to be far larger than it > is, so we need to check the header lengths in the driver before calling > the checksum API. > > A better fix would be to allow the lengths to be passed into the API > function, but that would be an API break, so fixing in TAP driver for > now. > > CC: stable@dpdk.org > Fixes: 8ae3023387e9 ("net/tap: add Rx/Tx checksum offload support") > > Signed-off-by: Bruce Richardson Reviewed-by: Ferruh Yigit