ksmbd: fix racy issue from session lookup and expire

commit b95629435b upstream.

Increment the session reference count within the lock for lookup to avoid
racy issue with session expire.

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-25737
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>
This commit is contained in:
Namjae Jeon 2024-12-05 21:38:47 +09:00 • committed by Greg Kroah-Hartman
commit 37a0e2b362
4 changed files with 23 additions and 16 deletions