]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: Prevent integer overflow in calculation of deadtime
authorDenis Arefev <arefev@swemel.ru>
Wed, 9 Apr 2025 09:04:49 +0000 (12:04 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:49 +0000 (10:45 +0200)
commit160935d81f2c577984cb684af8decb5090f73b28
treec51532dd663130719d511845ce750d15e2b6aa76
parent296cb5457cc6f4a754c4ae29855f8a253d52bcc6
ksmbd: Prevent integer overflow in calculation of deadtime

commit a93ff742820f75bf8bb3fcf21d9f25ca6eb3d4c6 upstream.

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@vger.kernel.org
Signed-off-by: Denis Arefev <arefev@swemel.ru>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/server/transport_ipc.c