CVE-2022-50756
Description
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A mempool size miscalculation in the Linux kernel's nvme-pci driver can cause a heap buffer overflow when PRP allocation exceeds one list, leading to memory corruption exploitable under specific conditions.
Root
Cause
The nvme-pci driver in the Linux kernel contains a mempool allocation size bug when computing the number of PRP (Physical Region Page) entries needed for I/O [1]. The calculation converted the maximum transfer size to bytes incorrectly, causing the divisor to undercount the worst-case number of PRP entries [1]. This miscalculation led the driver to allocate space for only one PRP list when two could be required, resulting in a heap buffer overflow beyond the mempool's provided memory [1].
Exploitation
Conditions
The vulnerability is unlikely to be triggered under typical workloads. It requires a 4MB I/O that is split across exactly 127 physical segments on a queue that does not support SGL (Scatter Gather List) [1]. In such a scenario, the driver's PRP list count would be off by one, writing past the allocated mempool region [1]. No special privileges are needed; an unprivileged user or process that can submit large, physically fragmented block I/O could trigger the condition.
Impact
When triggered, the overflow corrupts kernel heap memory beyond the intended mempool buffer [1]. This memory corruption has been observed by KFENCE (Kernel Electric-Fence) during testing [1]. An attacker who can reliably create the required I/O pattern could leverage the corruption to crash the system (denial of service) or potentially escalate privileges, depending on adjacent heap layout.
Mitigation
The fix converts the maximum size to bytes before division, ensuring the worst-case PRP count is correctly computed and that enough mempool entries are allocated [1]. The patch has been applied to the stable kernel tree [1]. Users should update to a kernel version containing the commit c89a529e823d or the equivalent backport.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
5dfb6d54893d59141144b37f3e1777b4286e5b1814724e0d7c89a529e823dVulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- git.kernel.org/stable/c/9141144b37f30e3e7fa024bcfa0a13011e546ba9nvd
- git.kernel.org/stable/c/b1814724e0d7162bdf4799f2d565381bc2251c63nvd
- git.kernel.org/stable/c/c89a529e823d51dd23c7ec0c047c7a454a428541nvd
- git.kernel.org/stable/c/dfb6d54893d544151e7f480bc44cfe7823f5ad23nvd
- git.kernel.org/stable/c/e1777b4286e526c58b4ee699344b0ad85aaf83a0nvd
News mentions
0No linked articles in our index yet.