CVE-2024-42276: nvme-pci: add missing condition check for existence of mapped data
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
nvme-pci: add missing condition check for existence of mapped data
nvme_map_data() is called when request has physical segments, hence the nvme_unmap_data() should have same condition to avoid dereference.
The Linux kernel CVE team has assigned CVE-2024-42276 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.2 with commit 4aedb705437f and fixed in 6.1.103 with commit d135c3352f7c Issue introduced in 5.2 with commit 4aedb705437f and fixed in 6.6.44 with commit 77848b379e9f Issue introduced in 5.2 with commit 4aedb705437f and fixed in 6.10.3 with commit 70100fe72184 Issue introduced in 5.2 with commit 4aedb705437f and fixed in 6.11-rc1 with commit c31fad147038
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2024-42276
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/nvme/host/pci.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/d135c3352f7c947a922da93c8e763ee6bc208b64 https://git.kernel.org/stable/c/77848b379e9f85a08048a2c8b3b4a7e8396f5f83 https://git.kernel.org/stable/c/70100fe721840bf6d8e5abd25b8bffe4d2e049b7 https://git.kernel.org/stable/c/c31fad1470389666ac7169fe43aa65bf5b7e2cfd