]> 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>
Fri, 21 Feb 2025 12:49:39 +0000 (13:49 +0100)
commit760568c1f62ea874e8fb492f9cfa4f47b4b8391e
treed73a89870cfbb864da49a130a39746e97e70e6de
parent7805d1e745017530481f13ca5961cabf7ac17a9c
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