CVE-2026-99657: mm/mmu_notifier: set ->mm only after mmgrab()
In the Linux kernel, the following vulnerability has been resolved:
mm/mmunotifier: set ->mm only after mmgrab()
Radeon uses a non-NULL notifier->mm to decide whether to call mmuintervalnotifierremove() when freeing a buffer object. mmuintervalnotifierinsert() 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 ]
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.118 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.5-1 - Compensating control
In __mmu_interval_notifier_insert(), set ->mm only after mmgrab(), once insertion can no longer fail.
Event History
Frequently Asked Questions
What condition triggers the faulty cleanup path?
A wrapping userptr range causes __mmu_interval_notifier_insert() to fail after notifier->mm has been set. Radeon buffer-object cleanup can then interpret the non-NULL mm pointer as evidence of a registered notifier and call mmu_interval_notifier_remove().
Which systems are most relevant to triage?
The described affected path involves the Linux kernel's MMU notifier handling and Radeon buffer-object cleanup. Systems using Radeon functionality with userptr ranges are the relevant exposure area described by the available data.
How can this be mitigated if the kernel fix cannot be applied immediately?
The provided information does not specify a configuration workaround. The triggering condition is a wrapping userptr range, so avoiding workloads or inputs that create wrapping userptr ranges avoids the described failed-insertion cleanup path.