{"id":"CVE-2026-138864","aliases":["CVE-2026-138864"],"related":[],"kind":"vulnerability","state":"published","title":"mm/page_counter: avoid integer overflow in effective_protection()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/page_counter: avoid integer overflow in effective_protection()\n\nPatch series \"mm/mglru: fix ineffective memory protection for non-kswapd\nreclaim\", v4.\n\nFor MGLRU, memory.min/low is not honored during non-kswapd global reclaim\n(global direct reclaim and root-level memory.reclaim), because these paths\nshrink memcgs using stale protection (emin/elow).\n\nPatch 2 is the actual fix.  Patch 1 is a prerequisite: an integer overflow\nin effective_protection(), spotted by the sashiko review tool, which patch\n2's new caller would also be exposed to.\n\n\nThis patch (of 2):\n\neffective_protection() scales a parent's protection by a ratio of page\ncounts, e.g.  for recursive protection:\n\n\t(parent_effective - siblings_protected) * (usage - protected)\n\t\t/ (parent_usage - siblings_protected)\n\nThe multiply is done at unsigned long width before dividing.  On systems\nwith >= 16TB RAM the product can exceed 2^64 and wrap, giving a bogus\nprotection value and silently breaking memory.min/low enforcement.\n\nUse mul_u64_u64_div_u64() to multiply in a 128-bit intermediate.  Because\nusage and parent_usage are not read atomically (a child is charged before\nits parent), usage - protected can briefly exceed the divisor, making the\nquotient overflow 64 bits and trap (#DE on x86).  Cap it so the ratio\nstays <= 1.\n\nReported by the sashiko review tool [1].","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/page_counter: avoid integer overflow in effective_protection()\n\nPatch series \"mm/mglru: fix ineffective memory protection for non-kswapd\nreclaim\", v4.\n\nFor MGLRU, memory.min/low is not honored during non-kswapd global reclaim\n(global direct reclaim and root-level memory.reclaim), because these paths\nshrink memcgs using stale protection (emin/elow).\n\nPatch 2 is the actual fix.  Patch 1 is a prerequisite: an integer overflow\nin effective_protection(), spotted by the sashiko review tool, which patch\n2's new caller would also be exposed to.\n\n\nThis patch (of 2):\n\neffective_protection() scales a parent's protection by a ratio of page\ncounts, e.g.  for recursive protection:\n\n\t(parent_effective - siblings_protected) * (usage - protected)\n\t\t/ (parent_usage - siblings_protected)\n\nThe multiply is done at unsigned long width before dividing.  On systems\nwith >= 16TB RAM the product can exceed 2^64 and wrap, giving a bogus\nprotection value and silently breaking memory.min/low enforcement.\n\nUse mul_u64_u64_div_u64() to multiply in a 128-bit intermediate.  Because\nusage and parent_usage are not read atomically (a child is charged before\nits parent), usage - protected can briefly exceed the divisor, making the\nquotient overflow 64 bits and trap (#DE on x86).  Cap it so the ratio\nstays <= 1.\n\nReported by the sashiko review tool [1].","source":"cvelist"}],"published":"2026-11-30T13:25:42.018Z","modified":"2026-11-30T14:17:42.863Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"bc50bcc6e00b8509e64875c674f4573e8b4df1e8","fixed":"c380274c205add299b48135ef6cd11e67aac29b2","status":"affected"},{"type":"git","introduced":"bc50bcc6e00b8509e64875c674f4573e8b4df1e8","fixed":"d8957533806e9f291e8e65ee2bb12163ce5ecebc","status":"affected"},{"type":"git","introduced":"bc50bcc6e00b8509e64875c674f4573e8b4df1e8","fixed":"2748bfeb1c12aa99670c08a34f5ff07ba6945c89","status":"affected"},{"type":"git","introduced":"bc50bcc6e00b8509e64875c674f4573e8b4df1e8","fixed":"7809ce47b05671e1fa6d74bead892d6ad6c1403b","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.7","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.7","status":"unaffected"},{"type":"semver","introduced":"6.12.118","lastAffected":"6.12.*","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/c380274c205add299b48135ef6cd11e67aac29b2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d8957533806e9f291e8e65ee2bb12163ce5ecebc","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2748bfeb1c12aa99670c08a34f5ff07ba6945c89","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7809ce47b05671e1fa6d74bead892d6ad6c1403b","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-138864","url":"https://www.cve.org/CVERecord?id=CVE-2026-138864","licence":"CVE Terms of Use","modified":"2026-11-30T13:25:42.018Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-138864","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138864","licence":"Public domain","modified":"2026-11-30T14:17:42.863Z"}],"updatedAt":"2026-11-30T14:32:25.170Z","epss":{"score":0.0021,"percentile":0.1181,"date":"2026-12-01T12:00:22.000Z"}}