]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
smb: client: Add check for next_buffer in receive_encrypted_standard()
authorHaoxiang Li <haoxiang_li2024@163.com>
Mon, 17 Feb 2025 07:20:38 +0000 (15:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:51:01 +0000 (12:51 +0100)
commitf618aeb6cad2307e48a641379db610abcf593edf
tree37e6b8bc414624e4b5a5fe3322ad9dbd4b7c0b2f
parenta56a6e8589a9b98d8171611fbcc1e45a15fd2455
smb: client: Add check for next_buffer in receive_encrypted_standard()

[ Upstream commit 860ca5e50f73c2a1cef7eefc9d39d04e275417f7 ]

Add check for the return value of cifs_buf_get() and cifs_small_buf_get()
in receive_encrypted_standard() to prevent null pointer dereference.

Fixes: eec04ea11969 ("smb: client: fix OOB in receive_encrypted_standard()")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/smb2ops.c