Executive brief
A vulnerability in the Linux kernel's Human Interface Device (HID) subsystem could allow a local user to trigger a system warning or kernel panic. This occurs when the system attempts to write data into a field that is too small for the provided value. While the system handles the data correctly by trimming it, the presence of an unnecessary internal check causes the system to report a critical error, which can be used to disrupt operations or crash the system.
Technical details
A reachable assertion (CWE-617) existed in the Linux kernel HID core within the implement() function. When attempting to write a value into an output report field of a smaller size, the code triggered a WARN_ON(1) macro. While the function correctly mitigated the data issue by trimming the value using a bitwise AND operation, the unnecessary warning could be triggered via local ioctl calls (e.g., hiddev_ioctl), leading to kernel warnings or panics depending on the system's 'panic_on_warn' configuration. The fix removes the superfluous WARN_ON() call while retaining the existing hid_warn() log message.
Affected products
- Linux Linux Kernel 4.7 to 4.19.317, 4.20 to 5.4.279, 5.5 to 5.10.221, 5.11 to 5.15.162, 5.16 to 6.1.95, 6.2 to 6.6.35, 6.7 to 6.9.6
Timeline
- 2024-05-17: other: Patch submitted by Nikita Zhandarovich
- 2024-06-04: patched: Mainline kernel patch committed
- 2024-07-12: advisory: NVD publication date
References
- https://git.kernel.org/stable/c/30f76bc468b9b2cbbd5d3eb482661e3e4798893f
- https://git.kernel.org/stable/c/33f6832798dd3297317901cc1db556ac3ae80c24
- https://git.kernel.org/stable/c/4aa2dcfbad538adf7becd0034a3754e1bd01b2b5
- https://git.kernel.org/stable/c/655c6de2f215b61d0708db6b06305eee9bbfeba2
- https://git.kernel.org/stable/c/8bac61934cd563b073cd30b8cf6d5c758ab5ab26
- https://git.kernel.org/stable/c/955b3764671f3f157215194972d9c01a3a4bd316
- https://git.kernel.org/stable/c/bfd546fc7fd76076f81bf41b85b51ceda30949fd