mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4-smb2: check for invalid SMB2 lock ranges
This commit is contained in:
parent
aa4c516023
commit
04f235a9eb
@ -1116,6 +1116,12 @@ NTSTATUS ntvfs_map_lock(struct ntvfs_module_context *ntvfs,
|
||||
isunlock = false;
|
||||
}
|
||||
for (i=0;i<lck->smb2.in.lock_count;i++) {
|
||||
if (lck->smb2.in.locks[i].length > 1 &&
|
||||
lck->smb2.in.locks[i].offset +
|
||||
lck->smb2.in.locks[i].length <
|
||||
lck->smb2.in.locks[i].offset) {
|
||||
return NT_STATUS_INVALID_LOCK_RANGE;
|
||||
}
|
||||
if (lck->smb2.in.locks[i].flags == SMB2_LOCK_FLAG_NONE) {
|
||||
return NT_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user