nvme-pci: fix dma mapping leak on data setup error
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.577.0.117.1In the Linux kernel, the following vulnerability has been resolved:
nvme-pci: fix dma mapping leak on data setup error
We're leaking the initial DMA mapping during iteration if we fail to allocate the tracking descriptor for both PRP and SGL. Unmap the iterator directly; we can't use the existing unmap helper because it depends on the tracking descriptor being successfully allocated, so a new one for an in-use iterator is provided.
The mappings were also leaking when the driver detects an invalid bio_vec when mapping PRPs, so fix that too.
From the CVE record · Linux
The Linux kernel's nvme-pci driver can leak DMA mappings if allocation of a PRP or SGL tracking descriptor fails, or if it detects an invalid bio_vec while mapping PRPs. The input does not establish whether an attacker can trigger these conditions or specify any required access or user interaction.
Engineers running Linux kernels with the nvme-pci driver should check their versions; affected versions are not specified.