+3
−0
Loading
mainline inclusion from mainline-v6.12-rc3 commit 4c16e1cadcbcaf3c82d5fc310fbd34d0f5d0db7c category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBIQXA CVE: CVE-2024-57925 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4c16e1cadcbcaf3c82d5fc310fbd34d0f5d0db7c -------------------------------- In the smb2_send_interim_resp(), if ksmbd_alloc_work_struct() fails to allocate a node, it returns a NULL pointer to the in_work pointer. This can lead to an illegal memory write of in_work->response_buf when allocate_interim_rsp_buf() attempts to perform a kzalloc() on it. To address this issue, incorporating a check for the return value of ksmbd_alloc_work_struct() ensures that the function returns immediately upon allocation failure, thereby preventing the aforementioned illegal memory access. Fixes: 041bba44 ("ksmbd: fix wrong interim response on compound") Signed-off-by:Wentao Liang <liangwentao@iscas.ac.cn> Acked-by:
Namjae Jeon <linkinjeon@kernel.org> Signed-off-by:
Steve French <stfrench@microsoft.com> Signed-off-by:
Yongjian Sun <sunyongjian1@huawei.com>