From: sashiko-bot@kernel.org
To: "Sriman Achanta" <srimanachanta@gmail.com>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org
Subject: Re: [PATCH v6 1/9] HID: steelseries: Fix ARCTIS_1_X device mislabeling
Date: Thu, 09 Jul 2026 03:36:01 +0000 [thread overview]
Message-ID: <20260709033601.B50B81F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260709032316.1908460-2-68172138+srimanachanta@users.noreply.github.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Pre-existing issues:
- [High] The probe function leaks hardware state and input devices if `hid_hw_open()` fails, leading to Use-After-Free.
- [High] Failure to register the power supply leaves an ERR_PTR and an uninitialized delayed_work, causing kernel panics on incoming events or device removal.
--
--- Patch [1]: [PATCH v6 1/9] HID: steelseries: Fix ARCTIS_1_X device mislabeling ---
commit c38516edb3d8e3340b9141595b245b3a3b7f06a6
Author: Sriman Achanta <srimanachanta@gmail.com>
HID: steelseries: Fix ARCTIS_1_X device mislabeling
The SteelSeries Arctis 1 Wireless for Xbox (0x12b6) was labelled as the
plain Arctis 1 Wireless. Rename USB_DEVICE_ID_STEELSERIES_ARCTIS_1 to
USB_DEVICE_ID_STEELSERIES_ARCTIS_1_X, along with the matching quirk flag
and device table entry. The device ID value is unchanged.
> diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-steelseries.c
> index f98435631aa18..fd38ee3ea6fcb 100644
> --- a/drivers/hid/hid-steelseries.c
> +++ b/drivers/hid/hid-steelseries.c
[ ... ]
> @@ -638,7 +638,7 @@ static int steelseries_headset_raw_event(struct hid_device *hdev,
> if (hdev->product == USB_DEVICE_ID_STEELSERIES_SRWS1)
> return 0;
>
> - if (hdev->product == USB_DEVICE_ID_STEELSERIES_ARCTIS_1) {
> + if (hdev->product == USB_DEVICE_ID_STEELSERIES_ARCTIS_1_X) {
> hid_dbg(sd->hdev,
> "Parsing raw event for Arctis 1 headset (%*ph)\n", size, read_buf);
[Severity: High]
This is a pre-existing issue, but I noticed a potential problem in how
headset events are handled if battery registration fails.
Looking at steelseries_probe(), if the battery registration fails it logs an
error but returns success:
drivers/hid/hid-steelseries.c:steelseries_probe() {
...
if (steelseries_headset_battery_register(sd) < 0)
hid_err(sd->hdev,
"Failed to register battery for headset\n");
return ret;
}
This leaves sd->battery containing an error pointer, and skips initializing
the battery_work structure. When an event is received later, the headset raw
event handler proceeds to use these uninitialized members:
drivers/hid/hid-steelseries.c:steelseries_headset_raw_event() {
...
power_supply_changed(sd->battery);
...
schedule_delayed_work(&sd->battery_work,
msecs_to_jiffies(STEELSERIES_HEADSET_BATTERY_TIMEOUT_MS));
}
Could this cause a panic from dereferencing the error pointer in
power_supply_changed(), and trigger an oops when schedule_delayed_work()
runs on the uninitialized work structure?
[Severity: High]
This is another pre-existing issue, but does steelseries_probe() properly
clean up resources if hardware open fails?
drivers/hid/hid-steelseries.c:steelseries_probe() {
...
ret = hid_hw_open(hdev);
if (ret)
return ret;
...
}
If hid_hw_open() fails, the function returns directly. Would this bypass
calling hid_hw_stop() to unregister the devices allocated by the earlier
call to hid_hw_start()?
Could this leak the input devices and cause a use-after-free when the
parent device is subsequently removed?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260709032316.1908460-1-68172138+srimanachanta@users.noreply.github.com?part=1
next prev parent reply other threads:[~2026-07-09 3:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 3:23 [PATCH v6 0/9] HID: steelseries: split out Arctis driver and add Nova 5X/Nova 7 support Sriman Achanta
2026-07-09 3:23 ` [PATCH v6 1/9] HID: steelseries: Fix ARCTIS_1_X device mislabeling Sriman Achanta
2026-07-09 3:36 ` sashiko-bot [this message]
2026-07-09 3:23 ` [PATCH v6 2/9] HID: steelseries: Split Arctis headset driver into separate module Sriman Achanta
2026-07-09 3:34 ` sashiko-bot
2026-07-09 3:23 ` [PATCH v6 3/9] HID: steelseries: Inline and simplify SRWS1 wheel driver Sriman Achanta
2026-07-09 3:23 ` [PATCH v6 4/9] HID: steelseries: Refactor Arctis driver to use device_info framework Sriman Achanta
2026-07-09 3:33 ` sashiko-bot
2026-07-09 3:23 ` [PATCH v6 5/9] HID: steelseries: Report POWER_SUPPLY_STATUS_FULL when full Sriman Achanta
2026-07-09 3:23 ` [PATCH v6 6/9] HID: steelseries: Correct Arctis 9 battery calibration range Sriman Achanta
2026-07-09 3:23 ` [PATCH v6 7/9] HID: steelseries: Manage battery lifetime with refcounting Sriman Achanta
2026-07-09 3:38 ` sashiko-bot
2026-07-09 3:23 ` [PATCH v6 8/9] HID: steelseries: Add async status interface support Sriman Achanta
2026-07-09 3:37 ` sashiko-bot
2026-07-09 3:23 ` [PATCH v6 9/9] HID: steelseries: Add support for Arctis Nova 5X and Nova 7 families Sriman Achanta
2026-07-10 12:02 ` [PATCH v6 0/9] HID: steelseries: split out Arctis driver and add Nova 5X/Nova 7 support Bastien Nocera
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=20260709033601.B50B81F000E9@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=srimanachanta@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