nvme-pci: fix mempool alloc size
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:
nvme-pci: fix mempool alloc size
Convert the max size to bytes to match the units of the divisor that calculates the worst-case number of PRP entries.
The result is used to determine how many PRP Lists are required. The code was previously rounding this to 1 list, but we can require 2 in the worst case. In that scenario, the driver would corrupt memory beyond the size provided by the mempool.
While unlikely to occur (you'd need a 4MB in exactly 127 phys segments on a queue that doesn't support SGLs), this memory corruption has been observed by kfence.
From the CVE record · Linux
The Linux kernel’s nvme-pci driver can allocate too little memory for PRP lists, causing memory corruption. This can occur with a 4 MB I/O request in exactly 127 physical segments on a queue that does not support SGLs. The input does not establish whether an attacker can trigger this remotely or locally, or whether authentication or user interaction is needed.
Engineers running Linux kernels with the nvme-pci driver should check their versions; affected versions were not specified.