KernelScan.io

HIGH Introduced in 2.6.12

hid HwStop UAF

CVE-2026-93189

CVSS 8.8 / 10.0 NVD

CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

KernelScan AI6.4MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: HID: core: quiesce input in hid_hw_stop() to prevent use-after-free A driver's probe calls hid_device_io_start() to enable input delivery, then fails at a later initialization step and unwinds via hid_hw_stop(). The unwind frees struct hidraw via hidraw_disconnect() while in-flight HID reports may still be running on another CPU, dereferencing the freed object through hidraw_report_event(). syzbot reports the resulting use-after-free for the corsair-psu HID driver. Edward Adam Davis posted a per-driver fix for corsair-psu that adds an explicit hid_device_io_stop() before hid_hw_stop() in the probe error path ("hwmon: prevent packets from going to driver for probe", 2026-04-28). Auditing the tree shows 15 drivers call hid_device_io_start(); 7 also call hid_device_io_stop() and 8 do not: drivers calling hid_device_io_start() without a matching hid_device_io_stop() before hid_hw_stop(): drivers/hwmon/corsair-psu.c (fix posted by Edward) drivers/hwmon/corsair-cpro.c drivers/hwmon/nzxt-kraken3.c drivers/hwmon/nzxt-smart2.c drivers/hwmon/gigabyte_waterforce.c drivers/hid/hid-logitech-dj.c drivers/hid/hid-nintendo.c drivers/hid/hid-mcp2221.c Roughly half of all callers of the API are exposed. Centralize the quiesce in hid_hw_stop() so callers do not have to remember the matching stop: if a driver has left hdev->io_started true on entry, call hid_device_io_stop() before hid_disconnect(). For the 7 drivers that already call hid_device_io_stop() correctly, hdev->io_started is false on entry, the guard short-circuits, and behavior is unchanged. No Fixes: tag because the affected drivers gained their hid_device_io_start() calls independently over years; the bug is a class-wide API misuse rather than a regression from one commit.

02

Engine v0.6.0

Risk summary

A use-after-free in the HID core subsystem occurs when a driver probe fails after enabling input delivery, allowing in-flight HID reports to access freed memory during cleanup. An attacker with physical access to a USB port can trigger this by connecting a crafted HID device matching one of eight affected drivers. The race condition can lead to kernel memory corruption, potentially resulting in code execution or a system crash.

Affecteddrivers/hid/hid-core.c (HID core)

Vulnerability analysis

When a HID driver enables input delivery early in device initialization but then fails at a later step, the error-cleanup path frees memory while HID reports may still be processing on another CPU. Those in-flight operations can then access the freed memory, causing a use-after-free. The fix ensures that input delivery is stopped before any teardown and freeing occurs during cleanup. An attacker can trigger this by physically connecting a crafted USB HID device that matches one of the affected drivers; no user account or special privileges are required, only physical access to a USB port.

03

BranchIntroducedFixed inPatch commit
5.102.6.125.10.2700744cb9520aa
5.152.6.125.15.221c876c437d188
6.12.6.126.1.1886787f1828f56
6.182.6.126.18.52544ebb25bd58
7.22.6.127.2.60fecd89f979a
mainline2.6.127.3-rc1a4bc41504690
6.122.6.126.12.11002246d8b462f
6.62.6.126.6.15792cca302a4ea