AZL-118721: CVE-2026-143398 affecting package kernel 6.6.161.1-1
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
Event History
Frequently Asked Questions
What conditions are required to trigger the unsafe teardown?
An input device with force-feedback support must be unregistered while userspace still holds an open file descriptor to its event node. The deferred device release can then invoke force-feedback destruction after the parent driver has already been unbound or its state freed.
Which systems are most exposed to this issue?
Systems using force-feedback input devices are relevant, particularly where their drivers or modules may be unbound or unloaded while applications retain open event-device file descriptors. The affected software identified here is the azure-linux/kernel package version 6.6.161.1-1.
How might an affected system behave?
The issue can produce use-after-free errors or page faults in unmapped module text during force-feedback teardown. These failures would be associated with input-device unregistration and a still-open userspace event-node descriptor.