From: HyeongJun An <sammiee5311@gmail.com>
To: even.xu@intel.com
Cc: jikos@kernel.org, bentiss@kernel.org,
srinivas.pandruvada@linux.intel.com, rui1.zhang@intel.com,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2] HID: intel-thc-hid: intel-quickspi: validate GET REPORT response size
Date: Tue, 27 Oct 2026 18:41:24 +0900 [thread overview]
Message-ID: <20261027094124.223069-1-sammiee5311@gmail.com> (raw)
In-Reply-To: <20261027025820.3085067-1-even.xu@intel.com>
Hello Even,
Thank you for picking this up, and thanks to Rui for testing it.
On Tue, Oct 27, 2026 at 10:58:20AM +0800, Even Xu wrote:
> - qsdev->report_len = sizeof(body_hdr->content_id) + input_len;
> + report_len = sizeof(body_hdr->content_id) + input_len;
> + if (report_len > qsdev->report_buf_size) {
One question about this bound. The DATA case accepts a content_len up
to max_input_len, and the GET response adds the content ID on top of
that. A GET_FEATURE or GET_INPUT_REPORT response of the same size then
gives report_len = max_input_len + 1, which this version rejects when
max_input_len is the larger of the two lengths. v1 compared against the
allocation, which has the output report header to spare.
Can a response that large happen? If it can, comparing input_len would
keep the same limit as the DATA case:
if (input_len > qsdev->report_buf_size) {
Best regards,
HyeongJun
next prev parent reply other threads:[~2026-10-27 9:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 2:58 Even Xu
2026-10-27 9:41 ` HyeongJun An [this message]
2026-10-28 7:24 ` Xu, Even
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=20261027094124.223069-1-sammiee5311@gmail.com \
--to=sammiee5311@gmail.com \
--cc=bentiss@kernel.org \
--cc=even.xu@intel.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rui1.zhang@intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=stable@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®