linux/fs/smb/server/mgmt
Namjae Jeon 76e98a158b ksmbd: fix race condition between destroy_previous_session() and smb2 operations()
If there is ->PreviousSessionId field in the session setup request,
The session of the previous connection should be destroyed.
During this, if the smb2 operation requests in the previous session are
being processed, a racy issue could happen with ksmbd_destroy_file_table().
This patch sets conn->status to KSMBD_SESS_NEED_RECONNECT to block
incoming  operations and waits until on-going operations are complete
(i.e. idle) before desctorying the previous session.

Fixes: c8efcc7861 ("ksmbd: add support for durable handles v1/v2")
Cc: stable@vger.kernel.org # v6.6+
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-25040
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2024-08-18 17:02:36 -05:00
..
ksmbd_ida.c ksmbd: Remove usage of the deprecated ida_simple_xx() API 2024-01-09 12:52:33 -06:00
ksmbd_ida.h
share_config.c ksmbd: override fsids for share path check 2024-08-08 22:54:09 -05:00
share_config.h ksmbd: override fsids for share path check 2024-08-08 22:54:09 -05:00
tree_connect.c ksmbd: override fsids for share path check 2024-08-08 22:54:09 -05:00
tree_connect.h ksmbd: override fsids for share path check 2024-08-08 22:54:09 -05:00
user_config.c
user_config.h ksmbd: Remove unused field in ksmbd_user struct 2023-10-22 19:06:27 -05:00
user_session.c ksmbd: fix race condition between destroy_previous_session() and smb2 operations() 2024-08-18 17:02:36 -05:00
user_session.h ksmbd: mark SMB2_SESSION_EXPIRED to session when destroying previous session 2024-03-12 00:36:39 -05:00