{"api_version":"1","generated_at":"2026-11-22T20:39:58+00:00","cve":"CVE-2026-99645","urls":{"html":"https://cve.report/CVE-2026-99645","api":"https://cve.report/api/cve/CVE-2026-99645.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-99645","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-99645"},"summary":{"title":"mm/cma: don't release CMA pages still in use","description":"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() ]","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-20 06:17:58","updated_at":"2026-11-22 11:17:04"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"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","attackVector":"LOCAL","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/e8abc61d8a549a91c8fa639f68be2ef13d5fa63b","name":"https://git.kernel.org/stable/c/e8abc61d8a549a91c8fa639f68be2ef13d5fa63b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/485214cc031771fdbd5829b431f4f115e285dc21","name":"https://git.kernel.org/stable/c/485214cc031771fdbd5829b431f4f115e285dc21","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-99645","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99645","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 9bda131c6093e9c4a8739e2eeb65ba4d5fbefc2f 485214cc031771fdbd5829b431f4f115e285dc21 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 9bda131c6093e9c4a8739e2eeb65ba4d5fbefc2f e8abc61d8a549a91c8fa639f68be2ef13d5fa63b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.0","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.0 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.5 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc2 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"99645","cve":"CVE-2026-99645","epss":"0.001560000","percentile":"0.047550000","score_date":"2026-11-21","updated_at":"2026-11-22 00:14:17"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["mm/cma.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"485214cc031771fdbd5829b431f4f115e285dc21","status":"affected","version":"9bda131c6093e9c4a8739e2eeb65ba4d5fbefc2f","versionType":"git"},{"lessThan":"e8abc61d8a549a91c8fa639f68be2ef13d5fa63b","status":"affected","version":"9bda131c6093e9c4a8739e2eeb65ba4d5fbefc2f","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["mm/cma.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"7.0"},{"lessThan":"7.0","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.5","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc2","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.5","versionStartIncluding":"7.0","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc2","versionStartIncluding":"7.0","vulnerable":true}],"negate":false,"operator":"OR"}]}],"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":{"baseScore":7,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"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."}]}],"providerMetadata":{"dateUpdated":"2026-11-22T11:09:24.276Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"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"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-99645","datePublished":"2026-11-20T05:49:59.909Z","dateReserved":"2026-09-25T10:25:14.426Z","dateUpdated":"2026-11-22T11:09:24.276Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-20 06:17:58","lastModifiedDate":"2026-11-22 11:17:04","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"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","attackVector":"LOCAL","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"99645","Ordinal":"1","Title":"mm/cma: don't release CMA pages still in use","CVE":"CVE-2026-99645","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"99645","Ordinal":"1","NoteData":"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() ]","Type":"Description","Title":"mm/cma: don't release CMA pages still in use"}]}}}