CVE-2026-89729: HID: sensor-hub: Fix out-of-bounds write in sensor_hub_get_feature
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
HID: sensor-hub: Fix out-of-bounds write in sensor_hub_get_feature
sensor_hub_get_feature() clamps its return value to the caller's buffer size, but the copy loop still copies field->report_size / 8 bytes for each report value. A malicious HID descriptor can advertise a large feature field size while an IIO caller supplies a small stack buffer, such as a single s32, causing an out-of-bounds write.
HID core stores parsed report values in __s32 slots and clamps extracted values to 32 bits. Reject feature fields that require more than one slot per value, guard the total byte count calculation, and clamp each per-value copy to the remaining caller buffer.
The Linux kernel CVE team has assigned CVE-2026-89729 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.9 with commit 5459ada2b3cd69e6bf1b0c034feb810975d0072b and fixed in 6.12.109 with commit fa95b14198b6c8ea721b4784f466d3c2c2bac83a Issue introduced in 4.9 with commit 5459ada2b3cd69e6bf1b0c034feb810975d0072b and fixed in 6.18.50 with commit 9f43499ce6458a572b781f6bb46c464ab59fa825 Issue introduced in 4.9 with commit 5459ada2b3cd69e6bf1b0c034feb810975d0072b and fixed in 7.2.4 with commit bc3d72c44bff17688dc5f3e5132a53b51dae0f04 Issue introduced in 4.9 with commit 5459ada2b3cd69e6bf1b0c034feb810975d0072b and fixed in 7.3-rc1 with commit c92693f3ed099401d0383ef35ca1fe1e6ba033de
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-89729
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-hub.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/fa95b14198b6c8ea721b4784f466d3c2c2bac83a https://git.kernel.org/stable/c/9f43499ce6458a572b781f6bb46c464ab59fa825 https://git.kernel.org/stable/c/bc3d72c44bff17688dc5f3e5132a53b51dae0f04 https://git.kernel.org/stable/c/c92693f3ed099401d0383ef35ca1fe1e6ba033de