CVE-2026-89769: clocksource/drivers/nxp-pit: Fix IRQ leak on cpuhp_setup_state error path
In the Linux kernel, the following vulnerability has been resolved:
clocksource/drivers/nxp-pit: Fix IRQ leak on cpuhpsetupstate error path
When cpuhpsetupstate fails after pitclockeventpercpuinit has successfully called requestirq, the error handling jumps directly to outpitclocksourceunregister without freeing the registered IRQ.
This leaks the IRQ line and, since kfree(pit) follows, leaves a dangling pointer registered as the interrupt handler's devid, potentially leading to a use-after-free if the IRQ fires afterwards.
Fix it by calling pitclockeventpercpuexit to properly release the IRQ before falling through to the existing cleanup chain.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
In clocksource/drivers/nxp-pit, fix the cpuhp_setup_state failure error path to call pit_clockevent_per_cpu_exit to properly release the IRQ before continuing to the existing cleanup chain (to prevent IRQ leak and potential use-after-free via dangling interrupt handler dev_id).
Linux kernel (clocksource/drivers/nxp-pit) IRQ release order on cpuhp_setup_state error path = Call pit_clockevent_per_cpu_exit before falling through to the existing cleanup chain
Event History
Frequently Asked Questions
Under what condition can this issue occur?
It occurs only if cpuhp_setup_state fails after pit_clockevent_per_cpu_init has successfully registered an IRQ with request_irq. The faulty error path then frees the pit allocation without first releasing that IRQ.
What is the practical impact of the leaked IRQ?
The registered interrupt handler retains a dangling dev_id pointer after the associated pit memory is freed. If that IRQ fires afterward, it can result in a use-after-free.
What should be changed to remediate the issue?
The failure path after cpuhp_setup_state must call pit_clockevent_per_cpu_exit before continuing to the existing clocksource cleanup. This releases the registered IRQ and prevents the dangling handler pointer.