CVE-2026-68361: hwmon: (corsair-psu) Stop device IO before calling hid_hw_stop

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026081041-CVE-2026-68361-832b@gregkh>
From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

hwmon: (corsair-psu) Stop device IO before calling hid_hw_stop

hid_hw_stop() does not stop the device IO.

This results in a race condition between hid_input_report() and the point
immediately following the execution of hid_device_io_start() within
corsairpsu_probe(). If the probe operation fails after "io start" has
been initiated, this race condition will result in a uaf vulnerability
[1].

CPU0				CPU1
====				====
corsairpsu_probe()
 hid_device_io_start()
  ... unlock driver_input_lock
 hid_hw_stop()
  kfree(hidraw)			__hid_input_report()
				 ... acquire driver_input_lock
				 hid_report_raw_event()
				  hidraw_report_event()
				   ... access hidraw's list_lock // trigger uaf

Consequently, when corsairpsu_probe() fails and hid_hw_stop() needs to
be executed, the io_started flag is first cleared while holding the
driver_input_lock to prevent potential race conditions involving input
reports.

[1]
BUG: KASAN: slab-use-after-free in rt_spin_lock+0x83/0x400 kernel/locking/spinlock_rt.c:56
Call Trace:
 hidraw_report_event+0x5d/0x3a0 drivers/hid/hidraw.c:577
 hid_report_raw_event+0x311/0x1730 drivers/hid/hid-core.c:2076
 __hid_input_report drivers/hid/hid-core.c:2152 [inline]
 hid_input_report+0x44e/0x580 drivers/hid/hid-core.c:2174
 hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286
 __usb_hcd_giveback_urb+0x3b3/0x5e0 drivers/usb/core/hcd.c:1657
 dummy_timer+0x8a9/0x47d0 drivers/usb/gadget/udc/dummy_hcd.c:2005

Allocated by task 10:
 hidraw_connect+0x57/0x430 drivers/hid/hidraw.c:606
 hid_connect+0x5bf/0x19d0 drivers/hid/hid-core.c:2277
 hid_hw_start+0xa8/0x120 drivers/hid/hid-core.c:2387
 corsairpsu_probe+0xd9/0x3c0 drivers/hwmon/corsair-psu.c:782

Freed by task 10:
 hidraw_disconnect+0x4f/0x60 drivers/hid/hidraw.c:662
 hid_disconnect drivers/hid/hid-core.c:2362 [inline]
 hid_hw_stop+0x101/0x1e0 drivers/hid/hid-core.c:2407
 corsairpsu_probe+0x327/0x3c0 drivers/hwmon/corsair-psu.c:826

Fix the problem by calling hid_device_io_stop() before calling
hid_hw_stop().

[groeck: Updated subject and description;
 call hid_device_io_stop() only if IO has been started]

The Linux kernel CVE team has assigned CVE-2026-68361 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 5.11 with commit d115b51e0e567199c821fc39e13b6af7e78f247d and fixed in 6.6.148 with commit e6e1e0f3050d1a1a3ea1c9d6253363e87fdad67a
	Issue introduced in 5.11 with commit d115b51e0e567199c821fc39e13b6af7e78f247d and fixed in 6.12.101 with commit c0aae8d24f5e52d6910f97d59bc624e131f3ae1a
	Issue introduced in 5.11 with commit d115b51e0e567199c821fc39e13b6af7e78f247d and fixed in 6.18.42 with commit ec477af3a7e8d3964e62fd24ef01cdebb96b8e4e
	Issue introduced in 5.11 with commit d115b51e0e567199c821fc39e13b6af7e78f247d and fixed in 7.1.6 with commit bb25bd980f2d9bd34558e1b1d16636e4945baf14
	Issue introduced in 5.11 with commit d115b51e0e567199c821fc39e13b6af7e78f247d and fixed in 7.2-rc5 with commit 9ab8656548cd737b98d0b19c4253aff8d68e97f4

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2026-68361
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	drivers/hwmon/corsair-psu.c


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/e6e1e0f3050d1a1a3ea1c9d6253363e87fdad67a
	https://git.kernel.org/stable/c/c0aae8d24f5e52d6910f97d59bc624e131f3ae1a
	https://git.kernel.org/stable/c/ec477af3a7e8d3964e62fd24ef01cdebb96b8e4e
	https://git.kernel.org/stable/c/bb25bd980f2d9bd34558e1b1d16636e4945baf14
	https://git.kernel.org/stable/c/9ab8656548cd737b98d0b19c4253aff8d68e97f4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.