]> git.baikalelectronics.ru Git - kernel.git/commit
ksmbd: throttle session setup failures to avoid dictionary attacks
authorNamjae Jeon <linkinjeon@kernel.org>
Wed, 13 Oct 2021 08:28:31 +0000 (17:28 +0900)
committerSteve French <stfrench@microsoft.com>
Wed, 20 Oct 2021 05:07:10 +0000 (00:07 -0500)
commit2ce4fb1790ca6609ded4583983a7148e4da7488c
treee6d922ce3d5262c34c781768ee51588ce4c80e2e
parent67bd077936db0b4c67071e1e13ba0400258b7fa0
ksmbd: throttle session setup failures to avoid dictionary attacks

To avoid dictionary attacks (repeated session setups rapidly sent) to
connect to server, ksmbd make a delay of a 5 seconds on session setup
failure to make it harder to send enough random connection requests
to break into a server if a user insert the wrong password 10 times
in a row.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/ksmbd_netlink.h
fs/ksmbd/mgmt/user_config.c
fs/ksmbd/mgmt/user_config.h
fs/ksmbd/smb2pdu.c
fs/ksmbd/transport_ipc.c
fs/ksmbd/transport_ipc.h