linux/drivers/hid/usbhid
Tomasz Pakuła d927909d4d HID: pidff: Fix possible null pointer dereference
As reported by Dan Carpenter, if the axes_enable field wasn't found,
trying to find the axes themselves will result in a null pointer
dereference. This could only occur with a broken PID descriptor, but
it's worth protecting from.

Exit early if the axes_enable wasn't found AND add a gate to the
pidff_find_special_keys to exit early if the passed HID field is null.
This will protect again null dereferencing in the future and properly
return 0 found special keys.

Fixes: 1d72e7bd34 ("HID: pidff: Add support for AXES_ENABLE field")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2025-09-12 17:29:19 +02:00
..
hid-core.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
hid-pidff.c HID: pidff: Fix possible null pointer dereference 2025-09-12 17:29:19 +02:00
hid-pidff.h HID: pidff: Use direction fix only for conditional effects 2025-08-15 15:58:01 +02:00
hiddev.c USB: make devnode() callback in usb_class_driver take a const * 2022-10-20 12:11:56 +02:00
Kconfig HID: intel-thc: fix CONFIG_HID dependency 2025-02-03 10:56:43 +01:00
Makefile
usbhid.h Revert "HID: usbhid: do not sleep when opening device" 2020-08-18 19:54:04 +02:00
usbkbd.c HID: usbkbd: Fix the bit shift number for LED_KANA 2025-02-03 22:52:47 +01:00
usbmouse.c HID: move from strlcpy with unused retval to strscpy 2022-08-25 11:44:27 +02:00