Skip to contentSkip to conversation

CVE-2026-99657: mm/mmu_notifier: set ->mm only after mmgrab()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 20

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

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

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

mm/mmu_notifier: set ->mm only after mmgrab()

Radeon uses a non-NULL notifier->mm to decide whether to call mmu_interval_notifier_remove() when freeing a buffer object. __mmu_interval_notifier_insert() sets ->mm before validating the range, so a wrapping userptr range can leave ->mm set after insertion fails. Cleanup then tries to remove an unregistered notifier for which no mm reference was acquired.

Set ->mm only after mmgrab(), once insertion can no longer fail. While we could fix radeon's code instead, setting ->mm on success only makes the code more robust.

Fix generated by an LLM and sent by Chris Mason in private.

[ david: simplify description ]

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

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

	Issue introduced in 5.5 with commit 3506ff69c3ec725b9c3e7f074fd2d265922f139a and fixed in 6.12.118 with commit fe3b7bf598ba708431d531cfbb1035b8a463eed9
	Issue introduced in 5.5 with commit 3506ff69c3ec725b9c3e7f074fd2d265922f139a and fixed in 6.18.64 with commit 3df451b65b6bc342d9291b1132baf4a4dd3a7b63
	Issue introduced in 5.5 with commit 3506ff69c3ec725b9c3e7f074fd2d265922f139a and fixed in 7.3.5 with commit 0d9450d006506d2af7016afd435b9c1a24985d02
	Issue introduced in 5.5 with commit 3506ff69c3ec725b9c3e7f074fd2d265922f139a and fixed in 7.4-rc2 with commit 5ad9e4b0f1104f5dbfb41125c34bb30ea6dc7a94

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-99657

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:
mm/mmu_notifier.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/fe3b7bf598ba708431d531cfbb1035b8a463eed9
	https://git.kernel.org/stable/c/3df451b65b6bc342d9291b1132baf4a4dd3a7b63
	https://git.kernel.org/stable/c/0d9450d006506d2af7016afd435b9c1a24985d02
	https://git.kernel.org/stable/c/5ad9e4b0f1104f5dbfb41125c34bb30ea6dc7a94