]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ksmbd: fix deadlock in ksmbd_find_crypto_ctx()
authorNamjae Jeon <linkinjeon@kernel.org>
Tue, 2 May 2023 23:44:14 +0000 (08:44 +0900)
committerSteve French <stfrench@microsoft.com>
Thu, 4 May 2023 04:03:01 +0000 (23:03 -0500)
commit7b4323373d844954bb76e0e9f39c4e5fc785fa7b
treeaca145f8f84f1145bf6fc91f4e3e5d68d47fef1d
parentb096d97f47326b1e2dbdef1c91fab69ffda54d17
ksmbd: fix deadlock in ksmbd_find_crypto_ctx()

Deadlock is triggered by sending multiple concurrent session setup
requests. It should be reused after releasing when getting ctx for crypto.
Multiple consecutive ctx uses cause deadlock while waiting for releasing
due to the limited number of ctx.

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20591
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/auth.c