]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: fix wrong signingkey creation when encryption is AES256
authorNamjae Jeon <linkinjeon@kernel.org>
Mon, 18 Dec 2023 15:33:38 +0000 (00:33 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Dec 2023 09:41:54 +0000 (10:41 +0100)
commit289b46fd11dd63ca147aa7f4f9267b25306fb01c
tree7f8e3eb19a8403648136cf845a03c26da3497bf4
parentbfe8372ef2dbdce97f13b21d76e2080ddeef5a79
ksmbd: fix wrong signingkey creation when encryption is AES256

[ Upstream commit 7a891d4b62d62566323676cb0e922ded4f37afe1 ]

MacOS and Win11 support AES256 encrytion and it is included in the cipher
array of encryption context. Especially on macOS, The most preferred
cipher is AES256. Connecting to ksmbd fails on newer MacOS clients that
support AES256 encryption. MacOS send disconnect request after receiving
final session setup response from ksmbd. Because final session setup is
signed with signing key was generated incorrectly.
For signging key, 'L' value should be initialized to 128 if key size is
16bytes.

Cc: stable@vger.kernel.org
Reported-by: Miao Lihua <441884205@qq.com>
Tested-by: Miao Lihua <441884205@qq.com>
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/ksmbd/auth.c