diff options
author | Marcos Del Sol Vives <marcos@orca.pet> | 2021-12-16 11:37:22 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-12-17 19:19:45 -0600 |
commit | 83912d6d55be10d65b5268d1871168b9ebe1ec4b (patch) | |
tree | 53552547f6c86463b97c9cfe3d42b815e46e09a2 /fs/ksmbd/smb2ops.c | |
parent | f2e78affc48dee29b989c1d9b0d89b503dcd1204 (diff) | |
download | linux-83912d6d55be10d65b5268d1871168b9ebe1ec4b.tar.bz2 |
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: e2f34481b24d ("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>
Diffstat (limited to 'fs/ksmbd/smb2ops.c')
-rw-r--r-- | fs/ksmbd/smb2ops.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/ksmbd/smb2ops.c b/fs/ksmbd/smb2ops.c index 0a5d8450e835..02a44d28bdaf 100644 --- a/fs/ksmbd/smb2ops.c +++ b/fs/ksmbd/smb2ops.c @@ -271,9 +271,6 @@ int init_smb3_11_server(struct ksmbd_conn *conn) if (server_conf.flags & KSMBD_GLOBAL_FLAG_SMB2_LEASES) conn->vals->capabilities |= SMB2_GLOBAL_CAP_LEASING; - if (conn->cipher_type) - conn->vals->capabilities |= SMB2_GLOBAL_CAP_ENCRYPTION; - if (server_conf.flags & KSMBD_GLOBAL_FLAG_SMB3_MULTICHANNEL) conn->vals->capabilities |= SMB2_GLOBAL_CAP_MULTI_CHANNEL; |