android_kernel_motorola_sm6375/drivers/input
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tzung-Bi Shih 7bfd959187 Input: cros_ec_keyb - fix an invalid memory access
commit e08969c4d65ac31297fcb4d31d4808c789152f68 upstream.

If cros_ec_keyb_register_matrix() isn't called (due to
`buttons_switches_only`) in cros_ec_keyb_probe(), `ckdev->idev` remains
NULL.  An invalid memory access is observed in cros_ec_keyb_process()
when receiving an EC_MKBP_EVENT_KEY_MATRIX event in cros_ec_keyb_work()
in such case.

  Unable to handle kernel read from unreadable memory at virtual address 0000000000000028
  ...
  x3 : 0000000000000000 x2 : 0000000000000000
  x1 : 0000000000000000 x0 : 0000000000000000
  Call trace:
  input_event
  cros_ec_keyb_work
  blocking_notifier_call_chain
  ec_irq_thread

It's still unknown about why the kernel receives such malformed event,
in any cases, the kernel shouldn't access `ckdev->idev` and friends if
the driver doesn't intend to initialize them.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://patch.msgid.link/20251104070310.3212712-1-tzungbi@kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-12-03 12:45:19 +01:00
..
gameport
joystick Input: xpad - set correct controller type for Acer NGR200 2025-08-28 16:21:14 +02:00
keyboard Input: cros_ec_keyb - fix an invalid memory access 2025-12-03 12:45:19 +01:00
misc Input: uinput - zero-initialize uinput_ff_upload_compat to avoid info leak 2025-10-29 13:59:50 +01:00
mouse Input: synaptics - enable InterTouch on TUXEDO InfinityBook Pro 14 v5 2025-06-04 14:32:29 +02:00
rmi4 Input: synaptics-rmi - fix crash with unsupported versions of F34 2025-06-27 11:02:49 +01:00
serio Input: i8042 - fix strange behavior of touchpad on Clevo NS70PU 2024-03-15 10:48:18 -04:00
tablet
touchscreen Input: silead - Always support 10 fingers 2024-07-27 10:38:29 +02:00
apm-power.c
evbug.c
evdev.c
ff-core.c Input: ff-core - prefer struct_size over open coded arithmetic 2024-07-18 11:40:48 +02:00
ff-memless.c
input-compat.c
input-compat.h
input-leds.c
input-mt.c Input: MT - limit max slots 2024-09-04 13:15:01 +02:00
input-polldev.c
input-poller.c
input-poller.h
input.c Input: try trimming too long modalias strings 2024-07-05 09:08:16 +02:00
joydev.c
Kconfig
Makefile
matrix-keymap.c
mousedev.c
sparse-keymap.c