CVE-2026-138858: soc: fsl: dpio: Free the IRQ before releasing the I/O object
In the Linux kernel, the following vulnerability has been resolved:
soc: fsl: dpio: Free the IRQ before releasing the I/O object
The DPIO interrupt handler accesses priv->io, but dpaa2dpioremove() releases that object before tearing down the interrupts. The IRQ was requested with devmrequestirq(), and unregisterdpioirqhandlers() only clears its affinity hint. fslmcfreeirqs() returns IRQ resources to the MC resource pool without freeing the handler. An interrupt can therefore access the freed I/O object before devres releases the IRQ.
Explicitly free the managed IRQ in unregisterdpioirqhandlers() before returning its resource to the pool, and perform IRQ teardown before releasing the I/O object. This also waits for an in-flight handler while the object is still valid.
This issue was identified during our ongoing static-analysis research while reviewing kernel code.
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.275 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.226 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.63 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.4-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1Fixed in 7.3.4-1 - Compensating control
In unregister_dpio_irq_handlers(), explicitly free the managed IRQ and complete IRQ teardown before releasing the I/O object, so any in-flight handler finishes while the object is still valid.
Event History
Frequently Asked Questions
What condition is required for the use-after-free to occur?
The DPIO device removal path must run while an interrupt handler can still execute. The handler accesses priv->io after the I/O object has been released because the IRQ handler has not yet been freed.
Does returning IRQ resources to the MC resource pool stop the interrupt handler?
No. fsl_mc_free_irqs() returns IRQ resources to the MC resource pool but does not free the handler, leaving a window in which an interrupt can access the freed I/O object.
How can I verify that a kernel includes the fix?
Check that the DPIO IRQ teardown explicitly frees the managed IRQ in unregister_dpio_irq_handlers() before the IRQ resource is returned to the pool, and that IRQ teardown occurs before the I/O object is released. The corrected ordering also waits for any in-flight handler while the object remains valid.