Linux Input/HID development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "David Glushkov" <david.glushkov@sntiq.com>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org
Subject: Re: [PATCH v9] HID: steelseries: Add MSI Raider A18 HX A9WJG RGB support
Date: Fri, 05 Jun 2026 16:54:41 +0000	[thread overview]
Message-ID: <20260605165441.B2E8B1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260605164133.14354-1-david.glushkov@sntiq.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Potential out-of-bounds read in `steelseries_is_vendor_usage_page` when a malicious device provides a tiny report descriptor.
--

commit 45b36559149afdf0789fb9e7119bb71f74c98387
Author: David Glushkov <david.glushkov@sntiq.com>

HID: steelseries: Add MSI Raider A18 HX A9WJG RGB support

This commit adds DMI-gated support for the MSI Raider A18 HX A9WJG internal
SteelSeries USB HID devices for RGB lighting. It exposes them as multicolor
LED class devices and maps the ALC zones.

Closes: https://lore.kernel.org/oe-kbuild-all/202606010709.X0QYNjFZ-lkp@intel.com/

> diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-steelseries.c
> index f98435631aa18..2eaa167455bba 100644
> --- a/drivers/hid/hid-steelseries.c
> +++ b/drivers/hid/hid-steelseries.c
[ ... ]
> @@ -528,6 +552,222 @@ static bool steelseries_is_vendor_usage_page(struct hid_device *hdev, uint8_t us
>  		hdev->rdesc[2] == 0xff;
>  }

[Severity: High]
This is a pre-existing issue, but can this read out of bounds if a malicious
device provides a tiny report descriptor?

The function steelseries_is_vendor_usage_page() unconditionally reads the
first 3 bytes of the report descriptor (hdev->rdesc[0..2]) when handling an
Arctis 9 device. The kernel's HID parsing logic allows report descriptors of
size 1 or 2.

If a malicious USB device supplies a 1- or 2-byte descriptor, the dynamically
allocated hdev->rdesc will be exactly that size. Reading hdev->rdesc[2]
accesses memory past the allocation, which could result in a
slab-out-of-bounds read and panic the kernel.

Could we add a check to verify hdev->rsize >= 3 before accessing the array?

> +
> +static const struct dmi_system_id steelseries_msi_rgb_dmi_table[] = {
[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260605164133.14354-1-david.glushkov@sntiq.com?part=1

  reply	other threads:[~2026-06-05 16:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-31 21:52 [PATCH] HID: steelseries: Add MSI Raider A18 HX A9WJG RGB support David Glushkov
2026-05-31 22:06 ` sashiko-bot
2026-05-31 22:21 ` [PATCH v2] " David Glushkov
2026-05-31 22:34   ` sashiko-bot
2026-05-31 22:53 ` [PATCH v3] " David Glushkov
2026-05-31 23:12   ` sashiko-bot
2026-05-31 23:22 ` [PATCH v4] " David Glushkov
2026-05-31 23:39 ` [PATCH v5] " David Glushkov
2026-06-01  9:04   ` kernel test robot
2026-06-01 12:11 ` [PATCH v6] " David Glushkov
2026-06-01 12:27   ` sashiko-bot
2026-06-01 12:37 ` [PATCH v7] " David Glushkov
2026-06-02 18:57 ` [PATCH v8] " David Glushkov
2026-06-05 16:41 ` [PATCH v9] " David Glushkov
2026-06-05 16:54   ` sashiko-bot [this message]
2026-06-05 17:50 ` [PATCH v10] " David Glushkov

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=20260605165441.B2E8B1F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=david.glushkov@sntiq.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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