From: sashiko-bot@kernel.org
To: "Stuart Hayhurst" <stuart.a.hayhurst@gmail.com>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org
Subject: Re: [PATCH RESEND] HID: corsair-void: Fix firmware event packet description
Date: Tue, 18 Aug 2026 13:29:16 +0000 [thread overview]
Message-ID: <20260818132916.B35EE1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260818130053.45064-2-stuart.a.hayhurst@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [Medium] Missing report size validation in `corsair_void_raw_event` allows out-of-bounds read of the `data` array, leading to processing of uninitialized or stale data.
--
--- Patch [1]: [PATCH RESEND] HID: corsair-void: Fix firmware event packet description ---
commit 80e19492934a593a71b8da5c14d031065a2f1255
Author: Stuart Hayhurst <stuart.a.hayhurst@gmail.com>
HID: corsair-void: Fix firmware event packet description
This commit updates the firmware event packet description in the corsair-void
driver. It corrects the size to 5 bytes to account for the report ID and
updates the byte indices for the firmware version fields.
> diff --git a/drivers/hid/hid-corsair-void.c b/drivers/hid/hid-corsair-void.c
> index 5e9a5b8f7f167..ce92e3a9c0580 100644
> --- a/drivers/hid/hid-corsair-void.c
> +++ b/drivers/hid/hid-corsair-void.c
[ ... ]
> - * 3: Headset firmware minor version
> + * 4: Headset firmware minor version
> * Minor version of the headset's firmware
> */
> /* -------------------------------------------------------------------------- */
[Severity: Medium]
This is a pre-existing issue, but since the documentation correctly notes the
receiver responds with 5 bytes, does the driver need to validate this size
before parsing the packet?
In drivers/hid/hid-corsair-void.c:corsair_void_raw_event(), the data array is
accessed up to index 4 without first validating the report size:
} else if (hid_report->id == CORSAIR_VOID_FIRMWARE_REPORT_ID) {
drvdata->fw_receiver_major = data[1];
drvdata->fw_receiver_minor = data[2];
drvdata->fw_headset_major = data[3];
drvdata->fw_headset_minor = data[4];
}
If an untrusted or misbehaving USB device sends a short report where the size
is less than 5, could this lead to an out-of-bounds read and cause the driver
to process uninitialized or stale data from the HID core's input buffer?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260818130053.45064-2-stuart.a.hayhurst@gmail.com?part=1
prev parent reply other threads:[~2026-08-18 13:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 13:00 [PATCH RESEND] HID: corsair-void: Fix firmware event packet description Stuart Hayhurst
2026-08-18 13:29 ` sashiko-bot [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=20260818132916.B35EE1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=stuart.a.hayhurst@gmail.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