CVE-2026-92521: ACPI: PCI: Clear driver_data on all paths that free the acpi_pci_root
In the Linux kernel, the following vulnerability has been resolved:
ACPI: PCI: Clear driverdata on all paths that free the acpipciroot
acpipcirootadd() assigns the freshly allocated root to device->driverdata before dmardeviceadd() and pciacpiscanroot(). Both failure paths reach the end: label where root is kfree()'d, but only the pciacpiscanroot() path clears driverdata first.
When dmardeviceadd() fails during a hot-add, root is freed while device->driverdata still points at it. The ACPI core does not clear driverdata on attach failure, so a later acpipcifindroot() call may dereference this dangling pointer.
acpipcirootremove() has the same problem: it frees root without clearing device->driverdata, leaving a dangling pointer behind after the root bridge is removed.
Move the NULL assignment to the shared end: label so every error path in acpipcirootadd() clears driverdata before freeing root, and clear it in acpipcirootremove() as well, so the object is never left reachable through driverdata after being freed.
Affected Software
Event History
Frequently Asked Questions
When can the dangling pointer be created?
It can be created if dmar_device_add() fails while adding an ACPI PCI root during hot-add, or when an ACPI PCI root bridge is removed. In those cases, the root object is freed while device->driver_data can still reference it.
What subsequent action can trigger use of the stale pointer?
A later acpi_pci_find_root() call may dereference the dangling device->driver_data pointer after the affected failure or removal path.
Is a normal successful root-add path sufficient to cause this issue?
The described issue is tied to the dmar_device_add() failure path during hot-add and to root-bridge removal. The data does not indicate that a successful add path alone leaves a dangling pointer.
What does the fix change?
The fix clears device->driver_data before freeing the ACPI PCI root on every acpi_pci_root_add() error path and in acpi_pci_root_remove(). This prevents freed root objects from remaining reachable through driver_data.