In the Linux kernel, the following vulnerability has been resolved:
HID: nintendo: register input device after capabilities are set
inputregisterdevice() exposes the device to userspace immediately. In joyconinputcreate() it was called before joyconconfigrumble() configures the FF_RUMBLE capability and the memless force-feedback device, so a concurrent EVIOCSFF could dereference a NULL dev->ff.
Registering early also means the initial udev event lacks button and axis information, which can make input managers ignore the device.
Move inputregisterdevice() to the end of joyconinputcreate(), after all capabilities, the IMU input device and the force-feedback callbacks have been configured.