]> git.hungrycats.org Git - linux/commit
ksmbd: block asynchronous requests when making a delay on session setup
authorNamjae Jeon <linkinjeon@kernel.org>
Tue, 2 May 2023 23:43:30 +0000 (08:43 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 11:58:55 +0000 (13:58 +0200)
commitff9d4b75d079234ac46f9da88a292ee025a3dac7
treed35f77532573dc24d913f0ebc237ea5ea664cc5e
parentd270631c21e68fb8016d6e231d022d7023a2df6f
ksmbd: block asynchronous requests when making a delay on session setup

[ Upstream commit b096d97f47326b1e2dbdef1c91fab69ffda54d17 ]

ksmbd make a delay of 5 seconds on session setup to avoid dictionary
attacks. But the 5 seconds delay can be bypassed by using asynchronous
requests. This patch block all requests on current connection when
making a delay on sesstion setup failure.

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