clocksource/drivers/nxp-pit: Fix IRQ leak on cpuhp_setup_state error path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.507.2.47.3In the Linux kernel, the following vulnerability has been resolved:
clocksource/drivers/nxp-pit: Fix IRQ leak on cpuhp_setup_state error path
When cpuhp_setup_state fails after pit_clockevent_per_cpu_init has successfully called request_irq, the error handling jumps directly to out_pit_clocksource_unregister 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 dev_id, potentially leading to a use-after-free if the IRQ fires afterwards.
Fix it by calling pit_clockevent_per_cpu_exit to properly release the IRQ before falling through to the existing cleanup chain.
From the CVE record · Linux
The nxp-pit clocksource driver can leave an IRQ registered with a dangling handler pointer if cpuhp_setup_state fails after IRQ registration. If that IRQ later fires, it could cause a use-after-free. The input does not establish an attacker route, authentication requirement, or user-interaction requirement.
Engineers running Linux kernels with the nxp-pit clocksource driver should check whether their kernel includes the fix; affected versions were not specified.