ksmbd: fix Preauh_HashValue race condition
authorNamjae Jeon <linkinjeon@kernel.org>
Thu, 24 Jul 2025 23:13:31 +0000 (08:13 +0900)
committerSteve French <stfrench@microsoft.com>
Fri, 25 Jul 2025 03:55:29 +0000 (22:55 -0500)
commit44a3059c4c8cc635a1fb2afd692d0730ca1ba4b6
treeface3b90dd941c691af0ad9f01c6c8d76695959f
parentecd9d6bf88ddd64e3dc7beb9a065fd5fa4714f72
ksmbd: fix Preauh_HashValue race condition

If client send multiple session setup requests to ksmbd,
Preauh_HashValue race condition could happen.
There is no need to free sess->Preauh_HashValue at session setup phase.
It can be freed together with session at connection termination phase.

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