]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
HID: core: introduce hid_safe_input_report()
authorBenjamin Tissoires <bentiss@kernel.org>
Mon, 4 May 2026 08:47:23 +0000 (10:47 +0200)
committerJiri Kosina <jkosina@suse.com>
Tue, 12 May 2026 16:03:58 +0000 (18:03 +0200)
commit206342541fc887ae919774a43942dc883161fece
treecd810e3f74b34c20bce0ffddc24afc0b4d5c47d6
parent2c85c61d1332e1e16f020d76951baf167dcb6f7a
HID: core: introduce hid_safe_input_report()

hid_input_report() is used in too many places to have a commit that
doesn't cross subsystem borders. Instead of changing the API, introduce
a new one when things matters in the transport layers:
- usbhid
- i2chid

This effectively revert to the old behavior for those two transport
layers.

Fixes: 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing bogus memset()")
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-core.c
drivers/hid/i2c-hid/i2c-hid-core.c
drivers/hid/usbhid/hid-core.c
include/linux/hid.h