cbcvebase.
CVE-2024-53194
published 2024-12-27

CVE-2024-53194: In the Linux kernel, the following vulnerability has been resolved: PCI: Fix use-after-free of slot->bus on hot remove Dennis reports a boot crash on recent…

PriorityP342high7.8CVSS 3.1
AVLACLPRLUINSUCHIHAH
EPSS
0.23%
13.8th percentile
In the Linux kernel, the following vulnerability has been resolved: PCI: Fix use-after-free of slot->bus on hot remove Dennis reports a boot crash on recent Lenovo laptops with a USB4 dock. Since commit 0fc70886569c ("thunderbolt: Reset USB4 v2 host router") and commit 59a54c5f3dbd ("thunderbolt: Reset topology created by the boot firmware"), USB4 v2 and v1 Host Routers are reset on probe of the thunderbolt driver. The reset clears the Presence Detect State and Data Link Layer Link Active bits at the USB4 Host Router's Root Port and thus causes hot removal of the dock. The crash occurs when pciehp is unbound from one of the dock's Downstream Ports: pciehp creates a pci_slot on bind and destroys it on unbind. The pci_slot contains a pointer to the pci_bus below the Downstream Port, but a reference on that pci_bus is never acquired. The pci_bus is destroyed before the pci_slot, so a use-after-free ensues when pci_slot_release() accesses slot->bus. In principle this should not happen because pci_stop_bus_device() unbinds pciehp (and therefore destroys the pci_slot) before the pci_bus is destroyed by pci_remove_bus_device(). However the stacktrace provided by Dennis shows that pciehp is unbound from pci_remove_bus_device() instead of pci_stop_bus_device(). To understand the significance of this, one needs to know that the PCI core uses a two step process to remove a portion of the hierarchy: It first unbinds all drivers in the sub-hierarchy in pci_stop_bus_device() and then actually removes the devices in pci_remove_bus_device(). There is no precaution to prevent driver binding in-between pci_stop_bus_device() and pci_remove_bus_device(). In Dennis' case, it seems removal of the hierarchy by pciehp races with driver binding by pci_bus_add_devices(). pciehp is bound to the Downstream Port after pci_stop_bus_device() has run, so it is unbound by pci_remove_bus_device() instead of pci_stop_bus_device(). Because the pci_bus has already been destroyed at that point,

Affected

28 ranges· showing 25
VendorProductVersion rangeFixed in
debianlinux< linux 6.1.123-1 (bookworm)linux 6.1.123-1 (bookworm)
debianlinux-6.1< linux 6.1.123-1 (bookworm)linux 6.1.123-1 (bookworm)
linuxlinux
linuxlinux>= f46753c5e354b857b20ab8e0fe7b2579831dc369 < 50473dd3b2a08601a078f852ea05572de9b1f86c50473dd3b2a08601a078f852ea05572de9b1f86c
linuxlinux>= f46753c5e354b857b20ab8e0fe7b2579831dc369 < d0ddd2c92b75a19a37c887154223372b600fed37d0ddd2c92b75a19a37c887154223372b600fed37
linuxlinux>= f46753c5e354b857b20ab8e0fe7b2579831dc369 < da6e6ff1f6c57f16e07af955e0e997fc90dd1e75da6e6ff1f6c57f16e07af955e0e997fc90dd1e75
linuxlinux>= f46753c5e354b857b20ab8e0fe7b2579831dc369 < 41bbb1eb996be1435815aa1fbcc9ffc45b84cc1241bbb1eb996be1435815aa1fbcc9ffc45b84cc12
linuxlinux>= f46753c5e354b857b20ab8e0fe7b2579831dc369 < 20502f0b3f3acd6bee300257556c27a867f80c8b20502f0b3f3acd6bee300257556c27a867f80c8b
linuxlinux>= f46753c5e354b857b20ab8e0fe7b2579831dc369 < e5d5c04aac71bf1476dc44b56f2206a4c2facca8e5d5c04aac71bf1476dc44b56f2206a4c2facca8
linuxlinux>= f46753c5e354b857b20ab8e0fe7b2579831dc369 < c8266ab8e7ccd1d1f5a9c8b29eb2020175048134c8266ab8e7ccd1d1f5a9c8b29eb2020175048134
linuxlinux>= f46753c5e354b857b20ab8e0fe7b2579831dc369 < 69d2ceac11acf8579d58d55c9c5b65fb658f916e69d2ceac11acf8579d58d55c9c5b65fb658f916e
linuxlinux>= f46753c5e354b857b20ab8e0fe7b2579831dc369 < c7acef99642b763ba585f4a43af999fcdbcc3dc4c7acef99642b763ba585f4a43af999fcdbcc3dc4
linuxlinux_kernel< 4.19.3254.19.325
linuxlinux_kernel>= 0 < 5.10.234-15.10.234-1
linuxlinux_kernel>= 0 < 6.1.123-16.1.123-1
linuxlinux_kernel>= 0 < 6.12.3-16.12.3-1
linuxlinux_kernel>= 0 < 6.12.3-16.12.3-1
linuxlinux_kernel>= 0 < 5.4.0-211.2315.4.0-211.231
linuxlinux_kernel>= 0 < 5.15.0-135.1465.15.0-135.146
linuxlinux_kernel>= 0 < 6.8.0-58.606.8.0-58.60
linuxlinux_kernel>= 0 < 6.11.0-18.186.11.0-18.18
linuxlinux_kernel>= 4.20 < 5.4.2875.4.287
linuxlinux_kernel>= 5.11 < 5.15.1745.15.174
linuxlinux_kernel>= 5.16 < 6.1.1206.1.120
linuxlinux_kernel>= 5.5 < 5.10.2315.10.231

CVSS provenance

nvdv3.17.8HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
osv8.8HIGH
vendor_ubuntu8.8HIGH
vendor_debian7.8HIGH
vendor_redhat7.8HIGH
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.