From: "jiale yao" <19888972804@163.com>
To: "Ping Cheng" <ping.cheng@wacom.com>,
"Jason Gerecke" <jason.gerecke@wacom.com>,
"Jiri Kosina" <jikos@kernel.org>,
"Benjamin Tissoires" <bentiss@kernel.org>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re:[PATCH] HID: wacom: reject short input reports
Date: Sat, 17 Oct 2026 15:38:20 +0800 (CST) [thread overview]
Message-ID: <400db63d.18c9.1a148cc2351.Coremail.19888972804@163.com> (raw)
In-Reply-To: <20261017061920.3781644-1-yaojiale02@163.com>
At 2026-10-17 14:19:19, "Jiale Yao" <yaojiale02@163.com> wrote:
>wacom_raw_event() passes incoming reports to the pen serial extractor and
>the device-specific IRQ parsers before the HID core validates the declared
>report length. A short report can therefore make either consumer read past
>the valid input data.
>
>Require the complete report described by the HID report descriptor before
>invoking either parser.
>
Fixes: 29b4739134c7 ("Input: wacom - switch from an USB driver to a HID driver")
Fixes: 83417206427b ("HID: wacom: Queue events with missing type/serial data for later processing")
>Signed-off-by: Jiale Yao <yaojiale02@163.com>
>---
> drivers/hid/wacom_sys.c | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
>index 40770affdbde..85e966e80012 100644
>--- a/drivers/hid/wacom_sys.c
>+++ b/drivers/hid/wacom_sys.c
>@@ -175,6 +175,9 @@ static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report,
> if (wacom->wacom_wac.features.type == BOOTLOADER)
> return 0;
>
>+ if (size < hid_report_len(report))
>+ return 0;
>+
> if (wacom_wac_pen_serial_enforce(hdev, report, raw_data, size))
> return -1;
>
>--
>2.34.1
prev parent reply other threads:[~2026-10-17 7:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-17 6:19 [PATCH] " Jiale Yao
2026-10-17 7:38 ` jiale yao [this message]
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=400db63d.18c9.1a148cc2351.Coremail.19888972804@163.com \
--to=19888972804@163.com \
--cc=bentiss@kernel.org \
--cc=jason.gerecke@wacom.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ping.cheng@wacom.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 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®