PCI/P2PDMA: Release per-CPU pgmap ref when vm_insert_page() fails
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
PCI/P2PDMA: Release per-CPU pgmap ref when vm_insert_page() fails
When vm_insert_page() fails in p2pmem_alloc_mmap(), p2pmem_alloc_mmap() doesn't invoke percpu_ref_put() to free the per-CPU ref of pgmap acquired after gen_pool_alloc_owner(), and memunmap_pages() will hang forever when trying to remove the PCI device.
Fix it by adding the missed percpu_ref_put().
From the CVE record · Linux
In the Linux kernel's PCI/P2PDMA code, a failed vm_insert_page() call can leave a per-CPU pgmap reference unreleased. Removing the PCI device can then hang indefinitely. The input does not establish an attacker path, authentication requirement, or user-interaction requirement.
Engineers running Linux kernels with PCI/P2PDMA should check whether their kernel includes the fix; affected versions were not provided.