{"id":"CVE-2026-138895","aliases":["CVE-2026-138895"],"related":[],"kind":"vulnerability","state":"published","title":"mm: hugetlb: drop refcount before freeing on memcg charge failure","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: hugetlb: drop refcount before freeing on memcg charge failure\n\nWhen mem_cgroup_charge_hugetlb(folio, gfp) returns -ENOMEM, the folio has\nits refcount set to 1 via folio_ref_unfreeze(folio, 1).\n\nThe error path calls free_huge_folio(folio) directly, which expects a\nrefcount of 0.  Hence, VM_BUG_ON_FOLIO(folio_ref_count(folio), folio) is\ntriggered.\n\nEven with CONFIG_DEBUG_VM disabled, returning a folio with refcount 1 to\nthe freelist can corrupt allocator state later.\n\nUse folio_put(folio) instead of free_huge_folio(folio) to properly drop\nthe reference before freeing it.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: hugetlb: drop refcount before freeing on memcg charge failure\n\nWhen mem_cgroup_charge_hugetlb(folio, gfp) returns -ENOMEM, the folio has\nits refcount set to 1 via folio_ref_unfreeze(folio, 1).\n\nThe error path calls free_huge_folio(folio) directly, which expects a\nrefcount of 0.  Hence, VM_BUG_ON_FOLIO(folio_ref_count(folio), folio) is\ntriggered.\n\nEven with CONFIG_DEBUG_VM disabled, returning a folio with refcount 1 to\nthe freelist can corrupt allocator state later.\n\nUse folio_put(folio) instead of free_huge_folio(folio) to properly drop\nthe reference before freeing it.","source":"cvelist"}],"published":"2026-11-30T13:25:59.224Z","modified":"2026-11-30T14:17:47.383Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"991135774c0e05a4734e6d32aa03b00355e4cac9","fixed":"eeb9425606f386f726b47ee323687ee02c7b34f8","status":"affected"},{"type":"git","introduced":"991135774c0e05a4734e6d32aa03b00355e4cac9","fixed":"3f87063217efc3b0198e49ec1a9b262ff81ac406","status":"affected"},{"type":"git","introduced":"991135774c0e05a4734e6d32aa03b00355e4cac9","fixed":"e95d29c5df84f19881cd30b491fc81aa98f44b45","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.14","status":"unaffected"},{"type":"semver","introduced":"6.18.64","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/eeb9425606f386f726b47ee323687ee02c7b34f8","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3f87063217efc3b0198e49ec1a9b262ff81ac406","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e95d29c5df84f19881cd30b491fc81aa98f44b45","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-138895","url":"https://www.cve.org/CVERecord?id=CVE-2026-138895","licence":"CVE Terms of Use","modified":"2026-11-30T13:25:59.224Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-138895","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138895","licence":"Public domain","modified":"2026-11-30T14:17:47.383Z"}],"updatedAt":"2026-11-30T14:32:25.579Z","epss":{"score":0.00174,"percentile":0.07146,"date":"2026-12-01T12:00:22.000Z"}}