CVE-2026-74379: dax/kmem: account for partial discontiguous resource upon removal

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026081504-CVE-2026-74379-afe7@gregkh>
From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

dax/kmem: account for partial discontiguous resource upon removal

When dev_dax_kmem_probe() partially succeeds (at least one range is
mapped) but a subsequent range fails request_mem_region() or
add_memory_driver_managed(), the probe silently continues, ultimately
returning success, but with the corresponding range resource NULL'ed out.

dev_dax_kmem_remove() iterates over all dax_device ranges regardless of if
the underlying resource exists.  When remove_memory() is called later, it
returns 0 because the memory was never added which causes
dev_dax_kmem_remove() to incorrectly assume the (nonexistent) resource can
be removed and attempts cleanup on a NULL pointer.

Fix this by skipping these ranges altogether, noting that these cases are
considered success, such that the cleanup is still reached when all
actually-added ranges are successfully removed.

The Linux kernel CVE team has assigned CVE-2026-74379 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 5.10 with commit 60e93dc097f7f13a16a7e4b75b8803eb2adbb721 and fixed in 5.15.212 with commit ef4fc53898bd6c4d0119cc6d419ebef7f2560f31
	Issue introduced in 5.10 with commit 60e93dc097f7f13a16a7e4b75b8803eb2adbb721 and fixed in 6.1.178 with commit 5d3139abb9d1671fa5e42c3d6d8cb3b05479c5bb
	Issue introduced in 5.10 with commit 60e93dc097f7f13a16a7e4b75b8803eb2adbb721 and fixed in 6.6.145 with commit d47b0b8a69a13e06afafa54723f3e8c99b0c788f
	Issue introduced in 5.10 with commit 60e93dc097f7f13a16a7e4b75b8803eb2adbb721 and fixed in 6.12.97 with commit 799e54c510a03a65a57627018a817838d72f35bd
	Issue introduced in 5.10 with commit 60e93dc097f7f13a16a7e4b75b8803eb2adbb721 and fixed in 6.18.40 with commit 598ed7393a639c7547b28ff3e14db9f1ac37c132
	Issue introduced in 5.10 with commit 60e93dc097f7f13a16a7e4b75b8803eb2adbb721 and fixed in 7.1.5 with commit 30ea97affbcce236c57287c82dc6ef7a29c63b76
	Issue introduced in 5.10 with commit 60e93dc097f7f13a16a7e4b75b8803eb2adbb721 and fixed in 7.2-rc1 with commit 8aa442cfce79e2d69e72fc8e0c0864ac2971149d

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-2026-74379
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/dax/kmem.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/ef4fc53898bd6c4d0119cc6d419ebef7f2560f31
	https://git.kernel.org/stable/c/5d3139abb9d1671fa5e42c3d6d8cb3b05479c5bb
	https://git.kernel.org/stable/c/d47b0b8a69a13e06afafa54723f3e8c99b0c788f
	https://git.kernel.org/stable/c/799e54c510a03a65a57627018a817838d72f35bd
	https://git.kernel.org/stable/c/598ed7393a639c7547b28ff3e14db9f1ac37c132
	https://git.kernel.org/stable/c/30ea97affbcce236c57287c82dc6ef7a29c63b76
	https://git.kernel.org/stable/c/8aa442cfce79e2d69e72fc8e0c0864ac2971149d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.