]> git.hungrycats.org Git - linux/commit
HID: roccat: konepure: reject short button reports
authorJiale Yao <yaojiale02@163.com>
Thu, 24 Sep 2026 14:29:13 +0000 (22:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Nov 2026 17:10:51 +0000 (12:10 -0500)
commitab7282fa4d956cba0da12bc12fdf3c38886939b2
tree501472877a83750eb9b0cdab2984a0940ccc774f
parent2265963373b820d70de3c4397dda5495b70fae35
HID: roccat: konepure: reject short button reports

commit 1590b7c9bea0abe7a5d25dbfe06287c48c238a6f upstream.

The raw event callback runs before HID core validates and zero-pads the
report.  It reads the report number without checking the received length
and passes matching data to roccat_report_event(), which copies a complete
struct konepure_mouse_report_button.  A truncated report can therefore
cause an out-of-bounds read and expose adjacent data through the Roccat
character device.

Require a complete button report before inspecting or forwarding it.
Commit 47669bec44fe ("HID: asus: refactor the two workqueues and init
sequence") added the same kind of raw-event length validation to hid-asus.

Fixes: 8936aa31cd5f ("HID: roccat: add support for Roccat Kone Pure gaming mouse")
Cc: stable@vger.kernel.org
Signed-off-by: Jiale Yao <yaojiale02@163.com>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-roccat-konepure.c