mm/mempolicy: charge shared policy nodes

Summary

CVECVE-2026-99742
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-20 06:18:11 UTC
Updated2026-11-20 06:18:11 UTC
DescriptionIn the Linux kernel, the following vulnerability has been resolved: mm/mempolicy: charge shared policy nodes Any local user can bypass memory.max with mbind() on a tmpfs file, and allocate unbounded kernel memory. mbind() sets a NUMA memory policy for a range of a mapping. If the mapping is of a shmem and friends, the kernel also stores the policy on the inode, in a tree with one entry per range of the file. Each mbind() on a single page of a mapping can add one shared policy node (struct sp_node) and one struct mempolicy to that tree. They outlive the mapping and stay around until the inode is destroyed. The tree is not bounded by the file size, so the file can be empty. Memory that user space can allocate must be charged to a memory cgroup. A slab cache does that for all of its objects if it is created with SLAB_ACCOUNT. numa_policy_init() creates the slab caches for both structs without SLAB_ACCOUNT, so they are not charged to any cgroup. Reproduced with mbind() on single pages of an empty tmpfs file, from a cgroup with memory.max=8M: the global OOM killer killed tasks owned by root, and the machine panicked. Fix this by creating both caches with SLAB_ACCOUNT. This change implies that mbind() can now fail when running into memcg limits. Further, the policy_cache also serves task and VMA policies, so they are similarly accounted now. Note that per-file limits are not really helpful, as the user could simply use many files; having limits per user is tricky as well. Fix generated by an LLM and submitted by Chris Mason in private. [ david: smaller description tweaks ]

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected 5d097056c9a017a3b720849efb5432f37acabbac d500c37437cce47e492c561757ece2596e21446a git Not specified
CNA Linux Linux affected 5d097056c9a017a3b720849efb5432f37acabbac 40e340bab4d07958b2077c16650c3da5c76d5820 git Not specified
CNA Linux Linux affected 5d097056c9a017a3b720849efb5432f37acabbac 0109fa404651e20493ca35a9a7d4f87861148064 git Not specified
CNA Linux Linux affected 5d097056c9a017a3b720849efb5432f37acabbac 68b2aa37afa390f08de13bc0bac61a9ded3318bc git Not specified
CNA Linux Linux affected 4.5 Not specified
CNA Linux Linux unaffected 4.5 semver Not specified
CNA Linux Linux unaffected 6.12.118 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.64 6.18.* semver Not specified
CNA Linux Linux unaffected 7.3.5 7.3.* semver Not specified
CNA Linux Linux unaffected 7.4-rc2 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/0109fa404651e20493ca35a9a7d4f87861148064 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/40e340bab4d07958b2077c16650c3da5c76d5820 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/68b2aa37afa390f08de13bc0bac61a9ded3318bc 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/d500c37437cce47e492c561757ece2596e21446a 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report