CVE-2026-99645: mm/cma: don't release CMA pages still in use

Published Nov 20, 2026
·
Updated

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

mm/cma: don't release CMA pages still in use

When a driver calls dmafreecontiguous() before quiescing DMA, the page might still have a reference from the device. putpagetestzero() there returns false, WARN fires, but the code proceeds to freecontigfrozenrange() 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 putpage() that drops the last reference between the testzero loop and freecontigfrozenrange() 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 pagereffreeze() to make the semantics clearer and switch to prwarnratelimited().

[ david: use pagereffreeze() + prwarnratelimited() ]

Affected Software

1 affected componentFixes available
linux/kernel>=7.0.0<7.3.5
7.3.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.5
  2. Compensating control

    Do not release a CMA region if any pages inside it are still in use.

Frequently Asked Questions

1

What conditions are required for this issue to occur?

A driver must call dma_free_contiguous() before DMA using the CMA pages has been quiesced, leaving one or more pages still referenced by the device. The problematic behavior also involves a race in which the final put_page() occurs between the reference check and release of the contiguous range.

2

Which systems are realistically exposed?

Systems using the Linux kernel CMA allocator are exposed when a driver releases contiguous DMA memory while hardware can still access or retain references to that memory. The issue depends on faulty driver shutdown or DMA teardown ordering rather than ordinary allocation and release alone.

3

What happens if the affected release path is reached?

Live CMA pages can be returned to the buddy allocator and later allocated to another owner while the original device still references them. The race can also double-queue a page through page->lru, corrupting buddy allocator lists.

4

What is the mitigation if the kernel fix cannot be applied immediately?

Ensure drivers quiesce DMA and release all device references before calling dma_free_contiguous(). Avoid freeing CMA allocations until the hardware can no longer access the associated pages.

5

How does the resolved behavior handle pages that are still in use?

The corrected code does not free a CMA region when any page in that region remains in use. It emits a rate-limited warning indicating that the driver allowed a leak, trading the unsafe release for retained memory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203