Re: [PATCH net] chelsio/chtls: prevent potential integer overflow on 32bit
From: Simon Horman
Date: Fri Dec 13 2024 - 14:34:47 EST
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@xxxxxxxxxxxxxxx
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---
> I fixed a similar bug earlier:
> https://lore.kernel.org/all/86b404e1-4a75-4a35-a34e-e3054fa554c7@stanley.mountain
Thanks Dan,
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>