CVE-2026-99645 in Linux
Summary
by MITRE • 11/20/2026
In the Linux kernel, the following vulnerability has been resolved:
mm/cma: don't release CMA pages still in use
When a driver calls dma_free_contiguous() before quiescing DMA, the page might still have a reference from the device. put_page_testzero() there returns false, WARN fires, but the code proceeds to free_contig_frozen_range() putting a live page onto buddy and clearing the bitmap. A subsequent allocation can hand the same PFN to a new owner while the original holder still references it.
A concurrent put_page() that drops the last reference between the testzero loop and free_contig_frozen_range() can double-queue the page via page->lru, corrupting buddy lists.
Avoid the corruption by not freeing a CMA region if any of the pages inside are still in use.
Make it explicit in the warning that the driver allowed a leak.
While at it, use page_ref_freeze() to make the semantics clearer and switch to pr_warn_ratelimited().
[ david: use page_ref_freeze() + pr_warn_ratelimited() ]
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/20/2026
The Linux kernel contains a critical memory management vulnerability within Contiguous Memory Allocator (CMA) subsystem, specifically in the handling of DMA buffer release operations. This flaw arises when a device driver invokes dma_free_contiguous without first ensuring that all Direct Memory Access transactions have been quiesced and completed by the hardware. In such scenarios, physical pages allocated from the CMA region may still hold active references originating from the peripheral device itself. The kernel's standard procedure involves checking if page reference counts are zero using put_page_testzero before proceeding to free the memory back into the buddy allocator system via free_contig_frozen_range. However, this check is insufficient because it does not account for hardware-held references that persist even after software-side unmapping or release calls. Consequently, when a driver fails to properly synchronize with the device, the kernel incorrectly determines that pages are unused and proceeds to return them to the general memory pool while they remain in active use by the hardware.
This race condition leads to severe data corruption and system instability due to double-freeing logic errors within the page management structures. Specifically, if a concurrent put_page operation drops the last software reference between the initial zero-check loop and the actual freezing of the range for release, the page can be incorrectly queued via its lru list twice. This action corrupts the buddy allocator lists which are fundamental to Linux kernel memory allocation efficiency and integrity. Furthermore, releasing pages that are still mapped or referenced by a DMA-capable device creates a scenario where subsequent allocations may hand over the same physical frame number to a new owner while the original hardware driver continues writing to it. This results in silent data corruption for both the old and new owners of the memory region, potentially leading to kernel panics, privilege escalation if sensitive data is overwritten or leaked, or complete system crashes depending on what critical structures reside in that memory space.
From a classification perspective, this vulnerability aligns with CWE-416 Use After Free, as it involves accessing or releasing resources after they have been made available for reuse without proper synchronization. It also relates to CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization, highlighting the failure to properly coordinate between software drivers and hardware devices regarding resource lifecycle management. In terms of MITRE ATT&CK mapping, this flaw could be exploited in scenarios involving memory corruption attacks or privilege escalation if an attacker can trigger the specific race condition through crafted driver interactions or by manipulating device states to prevent proper DMA quiescing. The lack of strict enforcement for DMA coherence during buffer release represents a significant gap in resource management security controls within the kernel's MM subsystem.
To mitigate this vulnerability, it is imperative that system administrators and developers ensure that affected Linux kernels are updated with patches addressing CMA page reference handling. For developers writing or maintaining device drivers, strict adherence to proper DMA synchronization protocols is required before calling free functions. This includes ensuring all pending DMA transactions have completed using appropriate API calls such as dma_sync_single_for_cpu or dma_sync_sg_for_cpu depending on the mapping type. The kernel fix itself prevents freeing CMA regions if any pages within them are still in use, thereby avoiding the corruption of buddy lists and preventing double-queuing errors. Additionally, the implementation now utilizes page_ref_freeze to clarify semantics regarding reference counting during this critical window and employs pr_warn_ratelimited to provide actionable diagnostic information without flooding logs, helping administrators identify drivers that fail to properly quiesce DMA operations before releasing memory resources.