]> git.hungrycats.org Git - linux/commit
HID: roccat: savu: reject short special reports
authorJiale Yao <yaojiale02@163.com>
Thu, 24 Sep 2026 14:29:17 +0000 (22:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Nov 2026 17:06:11 +0000 (12:06 -0500)
commitae8c2228af6b7778c10b693bd6c5e103ef9c9451
tree7cb7b271f40e19a8367d0f02d3957d22f94082d9
parentc2e90164acb61217f2b9fdda05d83c80657c963c
HID: roccat: savu: reject short special reports

commit 76c51fdc825a0486f8d88ff896d39acec8f377b4 upstream.

The raw event callback runs before HID core validates and zero-pads the
report.  It passes the buffer to a helper which inspects data[0] and, for a
special report, reads the complete struct savu_mouse_report_special.  A
truncated report can therefore cause an out-of-bounds read.

Require enough data for the special report before calling the helper.
Commit 47669bec44fe ("HID: asus: refactor the two workqueues and init
sequence") added the same kind of raw-event length validation to hid-asus.

Fixes: 6a2a6390cf09 ("HID: roccat: add support for Roccat Savu")
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-savu.c