CVE-2026-89626: HID: sensor: custom: Fix field sysfs group cleanup on failure
From: Greg Kroah-Hartman <[email protected]>
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.
The Linux kernel CVE team has assigned CVE-2026-89626 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.1 with commit 4a7de0519df5e8fb89cef6ee062330ffe4b50a4d and fixed in 6.12.109 with commit 79154fad98ee843e5363940841e2d831503c190a Issue introduced in 4.1 with commit 4a7de0519df5e8fb89cef6ee062330ffe4b50a4d and fixed in 6.18.50 with commit f3f37b937a6ea2a00fb5e6189e74f855caa43eb5 Issue introduced in 4.1 with commit 4a7de0519df5e8fb89cef6ee062330ffe4b50a4d and fixed in 7.2.4 with commit d96f8958d4469ac02d9c563686cdd968005b944d Issue introduced in 4.1 with commit 4a7de0519df5e8fb89cef6ee062330ffe4b50a4d and fixed in 7.3-rc1 with commit 3789d0802ddb4b3be04062caf4bfadd23496e9a7
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-89626
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/hid/hid-sensor-custom.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/79154fad98ee843e5363940841e2d831503c190a https://git.kernel.org/stable/c/f3f37b937a6ea2a00fb5e6189e74f855caa43eb5 https://git.kernel.org/stable/c/d96f8958d4469ac02d9c563686cdd968005b944d https://git.kernel.org/stable/c/3789d0802ddb4b3be04062caf4bfadd23496e9a7