Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 66988dc4 authored by Steve French's avatar Steve French Committed by Greg Kroah-Hartman
Browse files

SMB3: incorrect file id in requests compounded with open



[ Upstream commit c0d46717b95735b0eacfddbcca9df37a49de9c7a ]

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: default avatarSteve French <stfrench@microsoft.com>
Reported-by: default avatarStefan Metzmacher <metze@samba.org>
Reviewed-by: default avatarShyam Prasad N <sprasad@microsoft.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 210768d0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3124,10 +3124,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)