2023-03-07 13:09 GMT+09:00, Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>: > On (23/03/05 21:34), Namjae Jeon wrote: >> +++ b/fs/ksmbd/smb2pdu.c >> @@ -7457,6 +7457,11 @@ static int fsctl_query_allocated_ranges(struct >> ksmbd_work *work, u64 id, >> start = le64_to_cpu(qar_req->file_offset); >> length = le64_to_cpu(qar_req->length); >> >> + if (start < 0 || length < 0) { >> + ksmbd_fd_put(work, fp); >> + return -EINVAL; >> + } > > Can we do sanity checking before we ksmbd_lookup_fd_fast()? We can:), will update it on v2. Thanks! >