Re: [PATCH v4 0/6] HID: wacom: guard against NULL input devices on successful probe
From: Jiri Kosina
Date: Thu Nov 19 2026 - 16:43:53 EST
On Sat, 24 Oct 2026, Jinmo Yang wrote:
> When wacom_setup_{pen,touch,pad}_input_capabilities() returns -ENODEV,
> the corresponding input pointer is set to NULL but probe still succeeds.
> Subsequent irq handlers dereference those pointers unconditionally,
> causing NULL-pointer dereferences reachable from a spoofed HID device.
>
> This series adds per-function NULL guards across all affected handlers.
>
> Changes in v4:
> - wacom_intuos_pad() now returns 2 for the normal path, 1 for the
> NULL-guard path; wacom_intuos_irq() applies "result - 1" uniformly,
> suppressing the spurious input_sync() the old "return 1" would
> trigger (Jason).
> - Added pen_input NULL guard at the top of wacom_intuos_irq() to
> protect its helpers wacom_intuos_inout() and
> wacom_intuos_general() (Jason).
> - Added pen_input NULL guard to wacom_bpt_pen() (Jason).
v4 now in hid.git#for-7.4/upstream-fixes, sorry for the delay.
--
Jiri Kosina
SUSE Labs