]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: add chann_lock to protect ksmbd_chann_list xarray
authorNamjae Jeon <linkinjeon@kernel.org>
Mon, 9 Feb 2026 01:43:19 +0000 (10:43 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Feb 2026 09:19:41 +0000 (10:19 +0100)
commite4a8a96a93d08570e0405cfd989a8a07e5b6ff33
tree38593a3ece15a17f8ea6307e67f0182a716c5b18
parent71b5e7c528315ca360a1825a4ad2f8ae48c5dc16
ksmbd: add chann_lock to protect ksmbd_chann_list xarray

commit 4f3a06cc57976cafa8c6f716646be6c79a99e485 upstream.

ksmbd_chann_list xarray lacks synchronization, allowing use-after-free in
multi-channel sessions (between lookup_chann_list() and ksmbd_chann_del).

Adds rw_semaphore chann_lock to struct ksmbd_session and protects
all xa_load/xa_store/xa_erase accesses.

Cc: stable@vger.kernel.org
Reported-by: Igor Stepansky <igor.stepansky@orca.security>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/server/mgmt/user_session.c
fs/smb/server/mgmt/user_session.h
fs/smb/server/smb2pdu.c