ksmbd: fix wrong signingkey creation when encryption is AES256
authorNamjae Jeon <linkinjeon@kernel.org>
Tue, 28 Feb 2023 15:01:21 +0000 (00:01 +0900)
committerSteve French <stfrench@microsoft.com>
Wed, 22 Mar 2023 21:32:50 +0000 (16:32 -0500)
commit7a891d4b62d62566323676cb0e922ded4f37afe1
treebb54d7c119dd6aae85c9fb27e5d2747966a4e36e
parente8d018dd0257f744ca50a729e3d042cf2ec9da65
ksmbd: fix wrong signingkey creation when encryption is AES256

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>
fs/ksmbd/auth.c