summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Aurich <paul@darkrain42.org>2018-12-31 23:13:34 +0100
committerSteve French <stfrench@microsoft.com>2019-01-03 06:03:56 +0100
commit6d2f84eee098540ae857998fe32f29b9e2cd9613 (patch)
tree7355a175aa07e44d2ef68fb482d1e09f66cc008d
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dto... (diff)
downloadlinux-6d2f84eee098540ae857998fe32f29b9e2cd9613.tar.xz
linux-6d2f84eee098540ae857998fe32f29b9e2cd9613.zip
smb3: fix large reads on encrypted connections
When passing a large read to receive_encrypted_read(), ensure that the demultiplex_thread knows that a MID was processed. Without this, those operations never complete. This is a similar issue/fix to lease break handling: commit 7af929d6d05ba5564139718e30d5bc96bdbc716a ("smb3: fix lease break problem introduced by compounding") CC: Stable <stable@vger.kernel.org> # 4.19+ Fixes: b24df3e30cbf ("cifs: update receive_encrypted_standard to handle compounded responses") Signed-off-by: Paul Aurich <paul@darkrain42.org> Tested-by: Yves-Alexis Perez <corsac@corsac.net> Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
-rw-r--r--fs/cifs/smb2ops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 33100ef74d7f..cf7eb891804f 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -3472,8 +3472,10 @@ smb3_receive_transform(struct TCP_Server_Info *server,
}
/* TODO: add support for compounds containing READ. */
- if (pdu_length > CIFSMaxBufSize + MAX_HEADER_SIZE(server))
+ if (pdu_length > CIFSMaxBufSize + MAX_HEADER_SIZE(server)) {
+ *num_mids = 1;
return receive_encrypted_read(server, &mids[0]);
+ }
return receive_encrypted_standard(server, mids, bufs, num_mids);
}