From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org, smfrench@gmail.com,
senozhatsky@chromium.org, tom@talpey.com,
atteh.mailbox@gmail.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH 2/2] ksmbd: add low bound validation to FSCTL_QUERY_ALLOCATED_RANGES
Date: Tue, 7 Mar 2023 13:09:52 +0900 [thread overview]
Message-ID: <20230307040952.GF5231@google.com> (raw)
In-Reply-To: <20230305123443.21509-2-linkinjeon@kernel.org>
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()?
next prev parent reply other threads:[~2023-03-07 4:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-05 12:34 [PATCH 1/2] ksmbd: add low bound validation to FSCTL_SET_ZERO_DATA Namjae Jeon
2023-03-05 12:34 ` [PATCH 2/2] ksmbd: add low bound validation to FSCTL_QUERY_ALLOCATED_RANGES Namjae Jeon
2023-03-07 4:09 ` Sergey Senozhatsky [this message]
2023-03-07 7:10 ` Namjae Jeon
2023-03-07 4:11 ` [PATCH 1/2] ksmbd: add low bound validation to FSCTL_SET_ZERO_DATA Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230307040952.GF5231@google.com \
--to=senozhatsky@chromium.org \
--cc=atteh.mailbox@gmail.com \
--cc=error27@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=smfrench@gmail.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.