From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD1C41E0B75; Fri, 13 Dec 2024 19:34:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734118471; cv=none; b=I08yJUpWn9iMrqbcl2/v21XRThxyO43SdCq1pYTSDfZ9iWgAcB8zkd/4dsSSre6JnxTYJi18OU05TWhsdlYqtw1sK7vmtN5UZiDKHRAfog9g5SAmpLOpy3coQIghBEL0/1O56pqeY44NML3kSF0yM6ZVKqRw7/wEldQL0utUjh8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734118471; c=relaxed/simple; bh=uazp8q3I6dRTgBXIMOo6n/VQO98UXytUK4cybDD7kcc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gKytqFj2vVQGJ4Xw/AFoYtBO2WvuLXHgVNLfz3y2Sxf0GwVqobR9+9bNwhXu+vskv4LmUd9hR8Qk34iN9RhWIsbUGvWdK9D+Y00oZPE3wjWXkcNwPxUc7bMwiu62Z9/Teb8N6iYzzGiHrXgrJNqqU/MY8eGmRTmFhctsedxXggw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EQ3Kyszb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EQ3Kyszb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6021C4CED0; Fri, 13 Dec 2024 19:34:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734118471; bh=uazp8q3I6dRTgBXIMOo6n/VQO98UXytUK4cybDD7kcc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EQ3Kyszb66u4VFirEw7paQAkGi12s8Z/lWCax6qsas82QKyma0JQgYxzaVjfdEQmG agrIgdhjPbUICT9CEHskftVKB4fHC9GepalJTv4d3zpc0JzCW92cy3MX+fwrEq0ckB f7hA4Mb/d0yrx1kMiFi6LYwaShsD0nBI3dfZkTnkUZnEfNtopE7hiqIF2btlfFwqWD 9B29StxKyNIMtCzmJLkc1QkdTIHIxnN1Dg//14iIbBzIsWGf0Fnem8jdZd4NNTwjY3 fpfw9E/oP25OpzogBX0TebFhb8Panua8wC886MLDP/CCp5gDeH4K8rKTPiFC2rfX6I H38ozCO7OpUnA== Date: Fri, 13 Dec 2024 19:34:26 +0000 From: Simon Horman To: Dan Carpenter Cc: Atul Gupta , Ayush Sawal , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexander Zubkov , Michael Werner , Casey Leedom , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Jason Gunthorpe Subject: Re: [PATCH net] chelsio/chtls: prevent potential integer overflow on 32bit Message-ID: <20241213193426.GE561418@kernel.org> References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Dec 13, 2024 at 12:47:27PM +0300, Dan Carpenter wrote: > The "gl->tot_len" variable is controlled by the user. It comes from > process_responses(). On 32bit systems, the "gl->tot_len + > sizeof(struct cpl_pass_accept_req) + sizeof(struct rss_header)" addition > could have an integer wrapping bug. Use size_add() to prevent this. > > Fixes: a08943947873 ("crypto: chtls - Register chtls with net tls") > Cc: stable@vger.kernel.org > Signed-off-by: Dan Carpenter > --- > I fixed a similar bug earlier: > https://lore.kernel.org/all/86b404e1-4a75-4a35-a34e-e3054fa554c7@stanley.mountain Thanks Dan, Reviewed-by: Simon Horman