CVE-2024-56561

Severity CVSS v4.0:
Pending analysis
Type:
CWE-416 Use After Free
Publication date:
27/12/2024
Last modified:
11/02/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> PCI: endpoint: Fix PCI domain ID release in pci_epc_destroy()<br /> <br /> pci_epc_destroy() invokes pci_bus_release_domain_nr() to release the PCI<br /> domain ID, but there are two issues:<br /> <br /> - &amp;#39;epc-&gt;dev&amp;#39; is passed to pci_bus_release_domain_nr() which was already<br /> freed by device_unregister(), leading to a use-after-free issue.<br /> <br /> - Domain ID corresponds to the EPC device parent, so passing &amp;#39;epc-&gt;dev&amp;#39;<br /> is also wrong.<br /> <br /> Fix these issues by passing &amp;#39;epc-&gt;dev.parent&amp;#39; to<br /> pci_bus_release_domain_nr() and also do it before device_unregister().<br /> <br /> [mani: reworded subject and description]

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.11.4 (including) 6.12.4 (excluding)