ksmbd: check invalid FileOffset and BeyondFinalZero in FSCTL_ZERO_DATA
authorNamjae Jeon <linkinjeon@kernel.org>
Sun, 19 Jun 2022 13:37:17 +0000 (22:37 +0900)
committerSteve French <stfrench@microsoft.com>
Fri, 24 Jun 2022 04:30:46 +0000 (23:30 -0500)
commitb5e5f9dfc915ff05b41dff56181e1dae101712bd
tree7a1b19100bd56cf0b2d562747d8ea2f4a290b79d
parent18e39fb960e6a908ac5230b57e3d0d6c25232368
ksmbd: check invalid FileOffset and BeyondFinalZero in FSCTL_ZERO_DATA

FileOffset should not be greater than BeyondFinalZero in FSCTL_ZERO_DATA.
And don't call ksmbd_vfs_zero_data() if length is zero.

Cc: stable@vger.kernel.org
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/smb2pdu.c