Skip to content

Input: alps/psmouse: Fix UAF bugs and improve workqueue synchronization

Duoming Zhou linux-input lkml 2 versions – Applied

Status from this message: Applied, thank you.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 7 repliesApplied
  2. v12 patches 2 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2Input: alps - fix use-after-free bugs caused by dev3_register_workdrivers/input/mouse/alps.c+1 -01 reply
2/2Input: psmouse - Replace flush_workqueue() with disable_delayed_work_sync()drivers/input/mouse/psmouse-base.c+1 -16 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 RESEND 0/2] Input: alps/psmouse: Fix UAF bugs and improve workqueue synchronization

This patch series addresses use-after-free bugs in the ALPS touchpad driver and enhances workqueue handling efficiency in the psmouse subsystem.

The first patch fixes a critical use-after-free race condition in the ALPS driver where dev3_register_work could be scheduled after the alps_data structure was already freed. This was caused by insufficient synchronization during device disconnection, where flush_workqueue() couldn't prevent subsequent work item submissions.

The second patch optimizes the psmouse disconnect path by replacing flush_workqueue() with disable_delayed_work_sync() for better efficiency and robustness.

Duoming Zhou (2):
Input: alps - fix use-after-free bugs caused by dev3_register_work
Input: psmouse - Replace flush_workqueue() with
disable_delayed_work_sync()

 drivers/input/mouse/alps.c         | 1 +
 drivers/input/mouse/psmouse-base.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1