Re: [PATCH] ksmbd: Prevent integer overflow in calculation of deadtime

From: Namjae Jeon
Date: Mon Apr 14 2025 - 21:00:41 EST


On Wed, Apr 9, 2025 at 6:05 PM Denis Arefev <arefev@xxxxxxxxx> wrote:
>
> The user can set any value for 'deadtime'. This affects the arithmetic
> expression 'req->deadtime * SMB_ECHO_INTERVAL', which is subject to
> overflow. The added check makes the server behavior more predictable.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Denis Arefev <arefev@xxxxxxxxx>
Applied it to #ksmbd-for-next-next.
Thanks!