All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] HID: alps: fix DualPoint Stick input device lifecycle
@ 2026-08-14  7:06 Chen Changcheng
  2026-08-14  7:06 ` [PATCH 1/2] HID: alps: unregister DualPoint Stick input device on remove Chen Changcheng
  2026-08-14  7:06 ` [PATCH 2/2] HID: alps: fix use-after-free on input2 registration failure Chen Changcheng
  0 siblings, 2 replies; 4+ messages in thread
From: Chen Changcheng @ 2026-08-14  7:06 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires
  Cc: linux-input, linux-kernel, ccc194101, Chen Changcheng

This series fixes two issues in the hid-alps driver related to the
separate input device ("DualPoint Stick", input2) that is allocated in
alps_input_configured() but not registered in hdev->inputs:

  Patch 1: input2 is never unregistered on remove.
           The driver struct has no .remove handler, and input2 is not
           tracked in hdev->inputs, so the default remove path
           (hid_hw_stop -> hidinput_disconnect) skips it.  Result: every
           device removal leaks one struct input_dev.

  Patch 2: data->input2 is stored before registration, and on
           registration failure the dangling pointer is read by
           u1_raw_event() (URBs are already active because
           alps_input_configured() calls hid_hw_open() before
           allocating input2) -> use-after-free.

Both patches apply against linux.git master at 7.2-rc7.

---
Chen Changcheng (2):
  HID: alps: unregister DualPoint Stick input device on remove
  HID: alps: fix use-after-free on input2 registration failure

 drivers/hid/hid-alps.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

Thanks,
Chen Changcheng
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-14  7:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-14  7:06 [PATCH 0/2] HID: alps: fix DualPoint Stick input device lifecycle Chen Changcheng
2026-08-14  7:06 ` [PATCH 1/2] HID: alps: unregister DualPoint Stick input device on remove Chen Changcheng
2026-08-14  7:23   ` sashiko-bot
2026-08-14  7:06 ` [PATCH 2/2] HID: alps: fix use-after-free on input2 registration failure Chen Changcheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.