Commit 676af10d authored by Li Nan's avatar Li Nan Committed by Greg Kroah-Hartman
Browse files

ksmbd: validate the zero field of packet header

[ Upstream commit 516b3eb8 ]

The SMB2 Protocol requires that "The first byte of the Direct TCP
transport packet header MUST be zero (0x00)"[1]. Commit 1c1bcf2d
("ksmbd: validate smb request protocol id") removed the validation of
this 1-byte zero. Add the validation back now.

[1]: [MS-SMB2] - v20230227, page 30.
https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-SMB2/%5bMS-SMB2%5d-230227.pdf



Fixes: 1c1bcf2d ("ksmbd: validate smb request protocol id")
Signed-off-by: default avatarLi Nan <linan122@huawei.com>
Acked-by: default avatarTom Talpey <tom@talpey.com>
Acked-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 222618b7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment