]> git.baikalelectronics.ru Git - kernel.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)
commit6bb7e7110cb31cf1e7d09bdb1aaf65da21a080f1
treebc61c27e0dc14e62b584bc8dc9c60bc25cc992ba
parenta5f3592e39d3a80f38e4245cd8ed50fcf5266d80
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