]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ksmbd: fix encryption failure issue for session logoff response
authorNamjae Jeon <linkinjeon@kernel.org>
Thu, 22 Sep 2022 14:36:34 +0000 (23:36 +0900)
committerSteve French <stfrench@microsoft.com>
Wed, 5 Oct 2022 06:15:44 +0000 (01:15 -0500)
commitaf705ef2b0ded0d8f54c238fdf3c17a1d47ad924
treebc61c27e0dc14e62b584bc8dc9c60bc25cc992ba
parent360c8ee6fefdb496fffd2c18bb9a96a376a1a804
ksmbd: fix encryption failure issue for session logoff response

If client send encrypted session logoff request on seal mount,
Encryption for that response fails.

ksmbd: Could not get encryption key
CIFS: VFS: cifs_put_smb_ses: Session Logoff failure rc=-512

Session lookup fails in ksmbd_get_encryption_key() because sess->state is
set to SMB2_SESSION_EXPIRED in session logoff. There is no need to do
session lookup again to encrypt the response. This patch change to use
ksmbd_session in ksmbd_work.

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