]> git.baikalelectronics.ru Git - kernel.git/commit
ksmbd: disable SMB2_GLOBAL_CAP_ENCRYPTION for SMB 3.1.1
authorMarcos Del Sol Vives <marcos@orca.pet>
Thu, 16 Dec 2021 10:37:22 +0000 (11:37 +0100)
committerSteve French <stfrench@microsoft.com>
Sat, 18 Dec 2021 01:19:45 +0000 (19:19 -0600)
commit3a9295c27db24e52ae1061101ef03a381a887aff
tree53552547f6c86463b97c9cfe3d42b815e46e09a2
parented91a85e89b3d11c4dde2d9fa0b9dbf1e15cc64f
ksmbd: disable SMB2_GLOBAL_CAP_ENCRYPTION for SMB 3.1.1

According to the official Microsoft MS-SMB2 document section 3.3.5.4, this
flag should be used only for 3.0 and 3.0.2 dialects. Setting it for 3.1.1
is a violation of the specification.

This causes my Windows 10 client to detect an anomaly in the negotiation,
and disable encryption entirely despite being explicitly enabled in ksmbd,
causing all data transfers to go in plain text.

Fixes: 9445e1eebdb7 ("cifsd: add server-side procedures for SMB3")
Cc: stable@vger.kernel.org # v5.15
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Marcos Del Sol Vives <marcos@orca.pet>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/smb2ops.c
fs/ksmbd/smb2pdu.c