CVE-2026-143398: Input: destroy force-feedback device on input unregistration
In the Linux kernel, the following vulnerability has been resolved:
Input: destroy force-feedback device on input unregistration
When an input device is unregistered while userspace holds an open file descriptor to its event node, inputdevrelease() is deferred until the last file descriptor is closed. Because inputffdestroy() was only called from inputdevrelease(), force-feedback teardown (ff->destroy and freeing ff->private) could run after the parent driver had already unbound, freed its device state, or even been unloaded via rmmod, causing use-after-free errors or page faults in unmapped module text.
Commit ef166ce08801 ("Input: stop force-feedback timer when unregistering input devices") added a separate ff->stop callback for ff-memless, but left ff->destroy invoked from inputdevrelease().
Once inputunregisterdevice() has disconnected all input handlers (which flushes effects, closes the device, and marks evdev dead) and deleted the device from sysfs, nothing accesses dev->ff anymore. Call inputffdestroy() directly in inputunregisterdevice() so that ff->destroy() always runs synchronously while the driver and its module are still active, and remove the now-redundant ff->stop callback. Keep inputffdestroy() in inputdevrelease() (where it is a no-op once dev->ff is NULL) to handle inputfreedevice() on devices that were never registered.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.276 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.227 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.7-1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch ef166ce08801
Event History
Frequently Asked Questions
Who is exposed to this issue?
Systems using Linux input devices with force-feedback support are exposed when such a device is unregistered while a userspace process still holds an open file descriptor to its event node.
What condition is required to trigger the use-after-free?
An input device must be unregistered before all userspace file descriptors for its event device are closed. The deferred device release can then invoke force-feedback destruction after the parent driver has unbound, freed its state, or been unloaded.
How can I tell whether a system may already be affected?
Look for force-feedback input devices being removed or drivers being unbound or unloaded while applications retain open event-device file descriptors. Failures may appear as use-after-free errors or page faults in unmapped module text during force-feedback teardown.
What is the mitigation if an update cannot be applied immediately?
Avoid unregistering force-feedback input devices, unbinding their drivers, or unloading their modules until userspace applications have closed all file descriptors to the associated event nodes.