]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
HID: alps: fix NULL pointer dereference in alps_raw_event()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Apr 2026 14:03:25 +0000 (16:03 +0200)
committerJiri Kosina <jkosina@suse.com>
Thu, 9 Apr 2026 15:37:39 +0000 (17:37 +0200)
commit1badfc4319224820d5d890f8eab6aa52e4e83339
tree1766d6657eef7042ebc971483713c9e90602e064
parentb6a57912854e7ea36f3b270032661140cc4209cd
HID: alps: fix NULL pointer dereference in alps_raw_event()

Commit ecfa6f34492c ("HID: Add HID_CLAIMED_INPUT guards in raw_event
callbacks missing them") attempted to fix up the HID drivers that had
missed the previous fix that was done in 2ff5baa9b527 ("HID: appleir:
Fix potential NULL dereference at raw event handle"), but the alps
driver was missed.

Fix this up by properly checking in the hid-alps driver that it had been
claimed correctly before attempting to process the raw event.

Fixes: 73196ebe134d ("HID: alps: add support for Alps T4 Touchpad device")
Cc: stable <stable@kernel.org>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <bentiss@kernel.org>
Cc: Masaki Ota <masaki.ota@jp.alps.com>
Cc: linux-input@vger.kernel.org
Assisted-by: gregkh_clanker_t1000
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-alps.c