nvme-pci: handle changing device dma map requirements
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nvme-pci: handle changing device dma map requirements
The initial state of dma_needs_unmap may be false, but change to true while mapping the data iterator. Enabling swiotlb is one such case that can change the result. The nvme driver needs to save the mapped dma vectors to be unmapped later, so allocate as needed during iteration rather than assume it was always allocated at the beginning. This fixes a NULL dereference from accessing an uninitialized dma_vecs when the device dma unmapping requirements change mid-iteration.
From the CVE record · Linux
The Linux kernel’s nvme-pci driver can dereference an uninitialized pointer if a device’s DMA unmapping requirements change while data is being mapped. This can cause a NULL dereference; the input does not specify an attacker path, authentication requirements, or user interaction.
Engineers running Linux kernels with the nvme-pci driver should check their versions against the vendor advisory; affected versions are not specified.