irqchip/gic-v2m: Prevent use after free of gicv2m_get_fwnode()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0644b3daca28dcb320373ae20069c269c9386304 · < 3939d6f29d34cdb60e3f68b76e39e00a964a1d51| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
irqchip/gic-v2m: Prevent use after free of gicv2m_get_fwnode()
With ACPI in place, gicv2m_get_fwnode() is registered with the pci subsystem as pci_msi_get_fwnode_cb(), which may get invoked at runtime during a PCI host bridge probe. But, the call back is wrongly marked as __init, causing it to be freed, while being registered with the PCI subsystem and could trigger:
Unable to handle kernel paging request at virtual address ffff8000816c0400 gicv2m_get_fwnode+0x0/0x58 (P) pci_set_bus_msi_domain+0x74/0x88 pci_register_host_bridge+0x194/0x548
This is easily reproducible on a Juno board with ACPI boot.
Retain the function for later use.
From the CVE record · Linux
The Linux kernel can free gicv2m_get_fwnode() even though the PCI subsystem may call it later. With ACPI enabled, a runtime PCI host bridge probe can trigger a kernel paging fault; the input does not describe an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernels with ACPI and GIC-v2m should check their systems; affected versions are not specified.