CVE-2026-99657 in Linuxinfo

Summary

by MITRE • 11/20/2026

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 ]

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/20/2026

The Linux kernel memory management subsystem contains a race condition vulnerability within the mmu_notifier infrastructure that can lead to use-after-free scenarios or invalid pointer dereferences during buffer object cleanup operations. This specific flaw originates from an incorrect ordering of operations in the __mmu_interval_notifier_insert function, where the notifier's member variable representing the associated memory descriptor is assigned before the validity of the specified range has been fully validated and secured. In high-performance graphics drivers such as Radeon, this sequence becomes critical because the driver relies on checking whether the notifier pointer to the memory structure is non-null to determine if it should invoke mmu_interval_notifier_remove during resource deallocation. When a user-space application provides a wrapping or invalid userptr range that fails validation after the initial assignment but before final insertion success, the system leaves the notifier in an inconsistent state where its internal reference points to a valid-looking memory structure despite the registration having failed entirely.

This inconsistency creates a dangerous operational impact because subsequent cleanup routines will observe the non-null pointer and attempt to unregister the interval notifier. However, since the insertion process did not complete successfully, no actual mmgrab operation was performed to increment the reference count on the target memory descriptor. Consequently, when the kernel attempts to remove an unregistered notifier that lacks a corresponding acquired reference, it violates fundamental memory management safety guarantees. This can result in premature freeing of critical data structures if other references expire, or potentially lead to null pointer dereferences and system crashes depending on how subsequent cleanup logic handles this malformed state. The vulnerability is particularly insidious because it exploits the timing gap between initial setup steps and final validation checks, allowing user-space inputs with crafted wrapping ranges to trigger this erroneous code path reliably under specific concurrency conditions.

From a standards perspective, this issue aligns closely with CWE-362 which describes concurrent execution race conditions leading to state inconsistency, as well as CWE-416 concerning use-after-free vulnerabilities arising from improper resource management and reference counting errors. The attack vector is classified within the MITRE ATT&CK framework under T1059 Command and Scripting Interpreter or potentially T1078 Valid Accounts depending on whether local privilege escalation is involved, but more accurately fits into T1203 Exploitation for Defense Evasion if used to crash systems for denial of service. The root cause lies in the lack of atomicity between setting state variables and acquiring necessary resource locks, a common pattern failure in kernel subsystems that handle dynamic memory mappings from untrusted user space inputs without sufficient validation barriers.

The resolution implemented by Chris Mason addresses this flaw by reordering the operations within __mmu_interval_notifier_insert to ensure that mmgrab is called before assigning the notifier's internal pointer to the memory descriptor. This change guarantees that ->mm is only set after it has been established beyond doubt that insertion will succeed and a valid reference count increment has occurred. By deferring the assignment until success, the code ensures that any subsequent cleanup logic attempting to remove the notifier will always operate on a properly registered entity with an acquired reference. While alternative fixes targeting the Radeon driver's specific handling of non-null checks were considered, modifying the core mmu_notifier infrastructure provides broader robustness across all subsystems relying on this mechanism. This approach prevents similar issues in other drivers that might depend on the same notification patterns and eliminates the possibility of unregistering notifiers without proper reference accounting regardless of which kernel component initiates the cleanup process.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!