]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: fix integer overflows on 32 bit systems
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 15 Jan 2025 00:28:35 +0000 (09:28 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Feb 2025 09:05:06 +0000 (10:05 +0100)
commitb4b902737746c490258de5cb55cab39e79927a67
treec0220cd4cbd25c4a0ec1c3dae678bdaa7f23d69a
parent5b199733b90137975ad1966250cfc4b18260b1eb
ksmbd: fix integer overflows on 32 bit systems

commit aab98e2dbd648510f8f51b83fbf4721206ccae45 upstream.

On 32bit systems the addition operations in ipc_msg_alloc() can
potentially overflow leading to memory corruption.
Add bounds checking using KSMBD_IPC_MAX_PAYLOAD to avoid overflow.

Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers")
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-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