PCI: mediatek: Fix IRQ domain leak when port fails to enable
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b099631df160ec608cd6147f4d20a8042567a5b8 · < 6e6a529d6f779413379b4404c9ef6a36c0337225| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
PCI: mediatek: Fix IRQ domain leak when port fails to enable
When mtk_pcie_enable_port() fails, mtk_pcie_port_free() removes the port from pcie->ports and frees the port structure. However, the IRQ domains set up earlier by mtk_pcie_init_irq_domain() are never freed.
Fix this by refactoring mtk_pcie_irq_teardown() into a per-port helper, mtk_pcie_irq_teardown_port(), and calling it from mtk_pcie_setup() when mtk_pcie_enable_port() fails. Since the IRQ teardown must only happen in the probe error path (during resume, child devices may have active MSI mappings and the NOIRQ context prohibits sleeping locks), mtk_pcie_enable_port() is changed to return an error code so callers can distinguish the two paths and act accordingly.
This issue was reported by Sashiko while reviewing the EcoNet EN7528 SoC support series.
From the CVE record · Linux
The Linux kernel's MediaTek PCIe driver fails to free IRQ domains when a port cannot be enabled during probe. This leaks kernel resources; the input does not describe an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernels with the MediaTek PCIe driver should check their installations; affected versions were not specified.