Re: [PATCH] HID: magicmouse: Do not crash on missing msc->input

From: Jiri Kosina

Date: Sat Jan 10 2026 - 04:27:49 EST


On Fri, 9 Jan 2026, Günther Noack wrote:

> Fake USB devices can send their own report descriptors for which the
> input_mapping() hook does not get called. In this case, msc->input stays N=
> ULL,
> leading to a crash at a later time.
>
> Detect this condition in the input_configured() hook and reject the device.
>
> This is not supposed to happen with actual magic mouse devices, but can be
> provoked by imposing as a magic mouse USB device.

Applied to hid.git#for-6.19/upstream-fixes, thanks Guenther.

--
Jiri Kosina
SUSE Labs