Commit b5e5f9d
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>1 parent 18e39fb commit b5e5f9d
1 file changed
Lines changed: 17 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7700 | 7700 | | |
7701 | 7701 | | |
7702 | 7702 | | |
7703 | | - | |
| 7703 | + | |
7704 | 7704 | | |
7705 | 7705 | | |
7706 | 7706 | | |
| |||
7717 | 7717 | | |
7718 | 7718 | | |
7719 | 7719 | | |
7720 | | - | |
7721 | | - | |
7722 | | - | |
| 7720 | + | |
| 7721 | + | |
| 7722 | + | |
| 7723 | + | |
7723 | 7724 | | |
7724 | 7725 | | |
7725 | 7726 | | |
7726 | | - | |
7727 | | - | |
| 7727 | + | |
| 7728 | + | |
| 7729 | + | |
| 7730 | + | |
| 7731 | + | |
| 7732 | + | |
| 7733 | + | |
7728 | 7734 | | |
7729 | | - | |
7730 | | - | |
7731 | | - | |
7732 | | - | |
| 7735 | + | |
| 7736 | + | |
| 7737 | + | |
| 7738 | + | |
| 7739 | + | |
7733 | 7740 | | |
7734 | 7741 | | |
7735 | 7742 | | |
| |||
0 commit comments