]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: fix racy issue under cocurrent smb2 tree disconnect
authorNamjae Jeon <linkinjeon@kernel.org>
Mon, 18 Dec 2023 15:33:52 +0000 (00:33 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Dec 2023 09:41:55 +0000 (10:41 +0100)
commitb36295c17fb97424406f0c3ab321b1ccaabb9be8
tree4aeeed2d2e68f2f8c3c656f2d794e38cab8ae712
parentae06b798f72d6cc792cfa1745490be65da90eb03
ksmbd: fix racy issue under cocurrent smb2 tree disconnect

[ Upstream commit 30210947a343b6b3ca13adc9bfc88e1543e16dd5 ]

There is UAF issue under cocurrent smb2 tree disconnect.
This patch introduce TREE_CONN_EXPIRE flags for tcon to avoid cocurrent
access.

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20592
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/ksmbd/mgmt/tree_connect.c
fs/ksmbd/mgmt/tree_connect.h
fs/ksmbd/smb2pdu.c