PCI: Fix reference leak in pci_register_host_bridge()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 37d6a0a6f4700ad3ae7bbf8db38b4557e97b3fe4 · < bbba4c50a2d2a1d3f3bf31cc4b8280cb492bf2c7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
PCI: Fix reference leak in pci_register_host_bridge()
If device_register() fails, call put_device() to give up the reference to avoid a memory leak, per the comment at device_register().
Found by code review.
[bhelgaas: squash Dan Carpenter's double free fix from https://lore.kernel.org/r/db806a6c-a91b-4e5a-a84b-6b7e01bdac85@stanley.mountain]
From the CVE record · Linux
The Linux kernel leaks a device reference in pci_register_host_bridge() if device_register() fails. The input does not describe whether an attacker can trigger the failure or specify any access or interaction requirements.
Engineers running the Linux kernel should check their deployments; affected versions are not specified.