nvme-pci: fix freeing of the HMB descriptor table
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 87ad72a59a38d1df217cfd95bc222a2edfe5d399 · < 6d0f599db73b099aa724a12736369c4d4d92849d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nvme-pci: fix freeing of the HMB descriptor table
The HMB descriptor table is sized to the maximum number of descriptors that could be used for a given device, but __nvme_alloc_host_mem could break out of the loop earlier on memory allocation failure and end up using less descriptors than planned for, which leads to an incorrect size passed to dma_free_coherent.
In practice this was not showing up because the number of descriptors tends to be low and the dma coherent allocator always allocates and frees at least a page.
From the CVE record · Linux
The Linux kernel's nvme-pci driver can pass an incorrect size when freeing an HMB descriptor table if memory allocation fails before all planned descriptors are used. The input does not describe an attacker-controlled trigger, an exploit outcome, or any authentication or user-interaction requirements.
Engineers running the Linux kernel with the nvme-pci driver should check their versions; affected versions are not specified.