SMB3: Resolve data corruption of TCP server info fields
authorRohith Surabattula <rohiths@microsoft.com>
Thu, 8 Oct 2020 09:58:41 +0000 (09:58 +0000)
committerSteve French <stfrench@microsoft.com>
Wed, 21 Oct 2020 22:56:23 +0000 (17:56 -0500)
commit62593011247c8a8cfeb0c86aff84688b196727c2
treec4503eb6e1fee404f1bce4a8b793427123c46d24
parent3ece60e3e78e6066b4ea02dea6687e5d373c6a77
SMB3: Resolve data corruption of TCP server info fields

TCP server info field server->total_read is modified in parallel by
demultiplex thread and decrypt offload worker thread. server->total_read
is used in calculation to discard the remaining data of PDU which is
not read into memory.

Because of parallel modification, server->total_read can get corrupted
and can result in discarding the valid data of next PDU.

Signed-off-by: Rohith Surabattula <rohiths@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
CC: Stable <stable@vger.kernel.org> #5.4+
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2ops.c