CVE-2026-99645
published high CVSS 3.1 · 7.0mm/cma: don't release CMA pages still in use
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux9bda131c6093e9c4a8739e2eeb65ba4d5fbefc2f to < 485214cc031771fdbd5829b431f4f115e285dc21 · 9bda131c6093e9c4a8739e2eeb65ba4d5fbefc2f to < e8abc61d8a549a91c8fa639f68be2ef13d5fa63b · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux7.0 (affected) · 0 to < 7.0 (unaffected · semver) · 7.3.5 through 7.3.* (unaffected · semver) · 7.4-rc2 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
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() ]
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.0 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - cma_release() runs only when a local caller frees CMA pages: dma_free_contiguous() from dma_direct_free()/iommu_dma_free() after dma_free_attrs(), or cma_heap_dma_buf_release() when a DMA_HEAP_IOCTL_ALLOC buffer is closed. No remote message supplies the refcount that put_page_testzero() tests. AC:H - The corrupt path is put_page_testzero() returning false, after which free_contig_frozen_range() still runs. cma_alloc() sets every page to refcount 1 in set_pages_refcounted(), and a normal free drops that one ref. kernel/dma never get_page()s the buffer, and no in-tree cma_release caller keeps a second ref, so the attacker cannot make refcount!=1. PR:L - vb2_dc_put() calls dma_free_attrs() and cma_heap_dma_buf_release() runs on dma-buf close with no capable() check. On the phone/embedded systems that reserve CMA, an unprivileged process opens the V4L2 node or /dev/dma_heap and reaches cma_release(); vmcp_open()'s CAP_SYS_ADMIN check is a stricter path. UI:N - The caller frees its own buffer: vb2_dc_put() or dma_buf release after DMA_HEAP_IOCTL_ALLOC. No second principal has to mount media or approve the free. S:U - free_contig_frozen_range() corrupts the host buddy freelist (page->lru) in the same kernel that called cma_release(). It does not cross a KVM guest/host or IOMMU boundary. C:H - With refcount still nonzero, free_contig_frozen_range() returns the page to the buddy and cma_clear_bitmap() lets a later cma_alloc() reuse that PFN while the old holder still references it, so the new owner's page contents are aliased to the leftover reference. I:H - That alias lets the leftover holder write the new owner's page, and a put_page() that drops the last extra ref between the put_page_testzero() loop and free_contig_frozen_range() list_adds page->lru a second time, corrupting buddy metadata. A:H - A double queue on page->lru, or allocating a page that is still referenced, oopses the kernel. free_pages_prepare() does not reject a nonzero refcount unless check_pages_enabled() is on, which production kernels leave off.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 9bda131c6093e9c4a8739e2eeb65ba4d5fbefc2f to < 485214cc031771fdbd5829b431f4f115e285dc21 (affected · git)9bda131c6093e9c4a8739e2eeb65ba4d5fbefc2f to < e8abc61d8a549a91c8fa639f68be2ef13d5fa63b (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 7.0 (affected)0 to < 7.0 (unaffected · semver)7.3.5 through 7.3.* (unaffected · semver)7.4-rc2 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
2Provider assertions
1Linux · cna
mm/cma: don't release CMA pages still in use
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 86600aa860eefae0f0f21cfecaa85e83b6c26e1588091730025c0db239c74685
- Ingested
- 23 Nov 2026, 14:37:13 UTC
- Source record
- Official CVE record