Re: [PATCH v3][next] RDMA/core: Use size_{add,sub,mul}() in calls to struct_size()

From: Leon Romanovsky
Date: Tue Sep 19 2023 - 03:37:55 EST



On Sun, 17 Sep 2023 15:21:36 -0600, Gustavo A. R. Silva wrote:
> If, for any reason, the open-coded arithmetic causes a wraparound,
> the protection that `struct_size()` provides against potential integer
> overflows is defeated. Fix this by hardening calls to `struct_size()`
> with `size_add()`, `size_sub()` and `size_mul()`.
>
>

Applied, thanks!

[1/1] RDMA/core: Use size_{add,sub,mul}() in calls to struct_size()
https://git.kernel.org/rdma/rdma/c/81760bedc65194

Best regards,
--
Leon Romanovsky <leon@xxxxxxxxxx>