gpio: rockchip: fix generic IRQ chip leak on remove
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
gpio: rockchip: fix generic IRQ chip leak on remove
The driver allocates domain generic chips using irq_alloc_domain_generic_chips() during probe. However, on driver remove/teardown, the generic chips are not automatically freed when the IRQ domain is removed because the domain flags do not include IRQ_DOMAIN_FLAG_DESTROY_GC.
This causes both the domain generic chips structure and the associated generic chips to be leaked. Additionally, the generic chips remain on the global gc_list and may later be visited by generic IRQ chip suspend, resume, or shutdown callbacks after the GPIO bank has been removed, potentially resulting in a use-after-free and kernel crash.
Fix the resource leak by explicitly calling irq_domain_remove_generic_chips() before removing the IRQ domain in rockchip_gpio_remove().
From the CVE record · Linux
The Linux kernel’s Rockchip GPIO driver does not free generic IRQ chips when the driver is removed. The chips can remain on a global list and may be accessed during later suspend, resume, or shutdown callbacks, potentially causing a use-after-free and kernel crash. The input does not specify an attack path, authentication requirement, or user interaction.
Engineers running Linux kernels with the Rockchip GPIO driver should check their versions; affected versions are not specified.