{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2026-99645", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2026-09-25T10:25:14.426Z", "datePublished": "2026-11-20T05:49:59.909Z", "dateUpdated": "2026-11-22T11:09:24.276Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-11-22T11:09:24.276Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/cma: don't release CMA pages still in use\n\nWhen a driver calls dma_free_contiguous() before quiescing DMA, the\npage might still have a reference from the device.\nput_page_testzero() there returns false, WARN fires, but the code proceeds\nto free_contig_frozen_range() putting a live page onto buddy and clearing\nthe bitmap. A subsequent allocation can hand the same PFN to a new\nowner while the original holder still references it.\n\nA concurrent put_page() that drops the last reference between the\ntestzero loop and free_contig_frozen_range() can double-queue the page\nvia page->lru, corrupting buddy lists.\n\nAvoid the corruption by not freeing a CMA region if any of the\npages inside are still in use.\n\nMake it explicit in the warning that the driver allowed a leak.\n\nWhile at it, use page_ref_freeze() to make the semantics clearer and\nswitch to pr_warn_ratelimited().\n\n[ david: use page_ref_freeze() + pr_warn_ratelimited() ]" } ], "metrics": [ { "cvssV3_1": { "version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7, "baseSeverity": "HIGH" }, "scenarios": [ { "lang": "en", "value": "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.\nAC: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.\nPR: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.\nUI: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.\nS: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.\nC: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.\nI: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.\nA: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." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "mm/cma.c" ], "versions": [ { "version": "9bda131c6093e9c4a8739e2eeb65ba4d5fbefc2f", "lessThan": "485214cc031771fdbd5829b431f4f115e285dc21", "status": "affected", "versionType": "git" }, { "version": "9bda131c6093e9c4a8739e2eeb65ba4d5fbefc2f", "lessThan": "e8abc61d8a549a91c8fa639f68be2ef13d5fa63b", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "mm/cma.c" ], "versions": [ { "version": "7.0", "status": "affected" }, { "version": "0", "lessThan": "7.0", "status": "unaffected", "versionType": "semver" }, { "version": "7.3.5", "lessThanOrEqual": "7.3.*", "status": "unaffected", "versionType": "semver" }, { "version": "7.4-rc2", "lessThanOrEqual": "*", "status": "unaffected", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.0", "versionEndExcluding": "7.3.5" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.0", "versionEndExcluding": "7.4-rc2" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/485214cc031771fdbd5829b431f4f115e285dc21" }, { "url": "https://git.kernel.org/stable/c/e8abc61d8a549a91c8fa639f68be2ef13d5fa63b" } ], "title": "mm/cma: don't release CMA pages still in use", "x_generator": { "engine": "bippy-1.2.0" } } } }