HID: nintendo: register input device after capabilities are set
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 2af16c1f846bd60240745bbd3afa13d5f040c61a · < d723bc1fe2e72b9252234e94c11af644ec477bf7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
HID: nintendo: register input device after capabilities are set
input_register_device() exposes the device to userspace immediately. In joycon_input_create() it was called before joycon_config_rumble() 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 input_register_device() to the end of joycon_input_create(), after all capabilities, the IMU input device and the force-feedback callbacks have been configured.
From the CVE record · Linux
The Nintendo HID driver registers a Joy-Con input device before configuring its force-feedback capability. A local userspace process that issues EVIOCSFF during that window can trigger a NULL pointer dereference; early registration can also cause input managers to miss button and axis information.
Engineers running Linux kernels with the affected Nintendo HID driver should check their kernel version; affected versions were not specified.