Skip to content

Commit 6d2f84e

Browse files
darkrain42Steve French
authored andcommitted
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 7af929d ("smb3: fix lease break problem introduced by compounding") CC: Stable <[email protected]> # 4.19+ Fixes: b24df3e ("cifs: update receive_encrypted_standard to handle compounded responses") Signed-off-by: Paul Aurich <[email protected]> Tested-by: Yves-Alexis Perez <[email protected]> Signed-off-by: Steve French <[email protected]> Reviewed-by: Ronnie Sahlberg <[email protected]>
1 parent 645ff1e commit 6d2f84e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/cifs/smb2ops.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3472,8 +3472,10 @@ smb3_receive_transform(struct TCP_Server_Info *server,
34723472
}
34733473

34743474
/* TODO: add support for compounds containing READ. */
3475-
if (pdu_length > CIFSMaxBufSize + MAX_HEADER_SIZE(server))
3475+
if (pdu_length > CIFSMaxBufSize + MAX_HEADER_SIZE(server)) {
3476+
*num_mids = 1;
34763477
return receive_encrypted_read(server, &mids[0]);
3478+
}
34773479

34783480
return receive_encrypted_standard(server, mids, bufs, num_mids);
34793481
}

0 commit comments

Comments
 (0)