serial: pch: Fix PCI device refcount leak in pch_request_dma()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3c6a483275f47a2ef7119309ad3d791c10cf30da · < 6f7d82380fbeaed3a940efc33c23f0c4bbd0fc02| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
serial: pch: Fix PCI device refcount leak in pch_request_dma()
As comment of pci_get_slot() says, it returns a pci_device with its refcount increased. The caller must decrement the reference count by calling pci_dev_put().
Since 'dma_dev' is only used to filter the channel in filter(), we can call pci_dev_put() before exiting from pch_request_dma(). Add the missing pci_dev_put() for the normal and error path.
From the CVE record · Linux
The Linux kernel's pch serial driver fails to release a PCI device reference in pch_request_dma(), on both normal and error paths. The input does not specify an attacker action or whether access, authentication, or user interaction is required.
Engineers running Linux kernels with the pch serial driver should check their versions; affected versions are not specified.