Re: [PATCH v4 0/6] HID: wacom: guard against NULL input devices on successful probe

From: Jiri Kosina

Date: Fri Nov 20 2026 - 08:42:04 EST


On Thu, 19 Nov 2026, Jiri Kosina 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.

I am dropping this now, as I am not sure against this tree the patchset
was generated.

"HID: wacom: add NULL input guards to wacom_intuos_irq() and its helpers"
adds check for !input into wacom_intuos_irq(), but there is no 'input' in
that context neither in hid.git nor in Linus' tree.

Please resping against something up to date and resend, thanks.

--
Jiri Kosina
SUSE Labs