ZeroHour

CVE-2026-89626

mass

Use-After-Free Risk in Linux Kernel HID Sensor Custom Driver sysfs Cleanup

CVSS 3.1
8.8 high
EPSS
Published
()
Modified
AI analysis

The Linux kernel's HID sensor custom driver (hid-sensor-custom) mishandles failure in hid_sensor_custom_add_attributes(): if sysfs_create_group() fails after some per-field attribute groups were already created, the function returns without removing them, and the driver can free sensor_inst->fields while the previously exposed enable_sensor attribute can still reach pointers into that freed array, creating a use-after-free of kernel memory. The bug is triggered when attribute creation fails partway through enumeration of a custom HID sensor's fields, a condition most plausibly induced by a faulty or malicious HID sensor device (attack vector is adjacent, e.g. HID over Bluetooth/USB). Successful exploitation could yield kernel memory corruption with high confidentiality, integrity, and availability impact, potentially enabling privilege escalation or a system crash. Affected systems are those running kernels that ship the vulnerable code path with the HID sensor custom driver enabled, which is common on laptops and convertibles with HID sensor hubs. No public proof of concept is known, the flaw is not in the CISA KEV catalog, and no in-the-wild exploitation has been reported.

What to do: Update to a kernel release or distro backport containing the fix for hid_sensor_custom_add_attributes() and monitor your vendor's stable kernel advisories. On hardware without HID custom sensors, blacklist or prevent auto-loading of the hid_sensor_custom module (verify with 'lsmod | grep hid_sensor_custom' and the presence of an enable_sensor attribute under /sys) to eliminate the vulnerable path until patched.

Affected
Linux kernel (HID sensor custom driver, hid-sensor-custom)
Estimated exposure
massorder of 10^8 Linux devices ship mainline/distro kernels containing the code, with the driver practically active on the tens of millions of… — The Linux kernel is deployed on the overwhelming majority of servers, desktops, and laptops worldwide, and HID sensor hubs with the custom sensor driver are standard hardware on modern laptops, though the vulnerable code path also requires…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

In the Linux kernel, the following vulnerability has been resolved: HID: sensor: custom: Fix field sysfs group cleanup on failure hid_sensor_custom_add_attributes() creates one sysfs group for each custom sensor field. If sysfs_create_group() fails after some groups have already been created, the function returns the error without removing the previously created groups. Add a local unwind path to remove the groups that were already created. With enable_sensor exposed only after the field attributes are ready, this path can free sensor_inst->fields without leaving enable_sensor able to access pointers into that array.

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

In the news

No ingested article mentions this CVE yet.