Skip to content

HID: roccat: bound device-supplied profile index

Michael Bommarito linux-input lkml 1 version Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2HID: roccat: bound device-supplied profile indexdrivers/hid/hid-roccat-kone.c+6 -20 replies
2/2HID: roccat: add KUnit test for kone profile-index boundsdrivers/hid/Kconfig drivers/hid/hid-roccat-kone.c+66 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] HID: roccat: bound device-supplied profile index

The Roccat Kone driver uses an 8-bit value taken straight from a USB HID interrupt report as an index into a fixed 5-element profiles[] array, without any range check. A malicious or counterfeit device that claims the Roccat Kone VID/PID can send a "switch profile" report with an out-of-range value and make the driver read out of bounds; the same unbounded index is also reachable at probe time from a device-supplied startup_profile field. The read result is stored in actual_dpi and exposed to user space through the actual_dpi sysfs attribute.

Michael Bommarito (2):
HID: roccat: bound device-supplied profile index
HID: roccat: add KUnit test for kone profile-index bounds

 drivers/hid/Kconfig           |  9 +++++
 drivers/hid/hid-roccat-kone.c | 65 +++++++++++++++++++++++++++++++++--
 2 files changed, 72 insertions(+), 2 deletions(-)
Signature · 1 line
2.53.0