]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
SMB3: incorrect file id in requests compounded with open
authorSteve French <stfrench@microsoft.com>
Sat, 15 May 2021 14:52:22 +0000 (09:52 -0500)
committerSteve French <stfrench@microsoft.com>
Wed, 19 May 2021 15:10:58 +0000 (10:10 -0500)
See MS-SMB2 3.2.4.1.4, file ids in compounded requests should be set to
0xFFFFFFFFFFFFFFFF (we were treating it as u32 not u64 and setting
it incorrectly).

Signed-off-by: Steve French <stfrench@microsoft.com>
Reported-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
fs/cifs/smb2pdu.c

index a8bf431847730298c4da9f3a311d612337d1ee28..9f24eb88297a82e2e765fe17ef6aaf2a9c8e1bfd 100644 (file)
@@ -3900,10 +3900,10 @@ smb2_new_read_req(void **buf, unsigned int *total_len,
                         * Related requests use info from previous read request
                         * in chain.
                         */
-                       shdr->SessionId = 0xFFFFFFFF;
+                       shdr->SessionId = 0xFFFFFFFFFFFFFFFF;
                        shdr->TreeId = 0xFFFFFFFF;
-                       req->PersistentFileId = 0xFFFFFFFF;
-                       req->VolatileFileId = 0xFFFFFFFF;
+                       req->PersistentFileId = 0xFFFFFFFFFFFFFFFF;
+                       req->VolatileFileId = 0xFFFFFFFFFFFFFFFF;
                }
        }
        if (remaining_bytes > io_parms->length)