{"api_version":"1","generated_at":"2026-12-01T16:37:46+00:00","cve":"CVE-2026-138863","urls":{"html":"https://cve.report/CVE-2026-138863","api":"https://cve.report/api/cve/CVE-2026-138863.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-138863","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-138863"},"summary":{"title":"mm/mglru: fix ineffective memory protection for non-kswapd reclaim","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mglru: fix ineffective memory protection for non-kswapd reclaim\n\nFor MGLRU, memory.min/low is not honored during global proactive reclaim\n(writing to the root memory.reclaim) and global direct reclaim, because\nthese paths shrink memcgs using stale protection (emin/elow).  It can be\nreproduced as follows:\n\n  # echo 7 > /sys/kernel/mm/lru_gen/enabled\n  # cd /sys/fs/cgroup\n  # mkdir -p a/b\n  # echo 100M > a/memory.min\n  # echo +memory > a/cgroup.subtree_control\n  # echo 100M > a/b/memory.min\n  # echo $$ > a/b/cgroup.procs\n  # dd if=/dev/zero of=/tmp/testfile bs=1M count=200\n  # cat a/b/memory.current\n  222650368\n  # echo 500M > memory.reclaim\n  -bash: echo: write error: Resource temporarily unavailable\n  # cat a/b/memory.current\n  6070272\n\nmemory.min is 100M, yet reclaim drops a/b down to 6M, breaking the\nprotection.  The traditional LRU path is not affected because\nshrink_node() calls mem_cgroup_calculate_protection() for each memcg it\nvisits during a top-down tree walk.\n\nCommit 30d77b7eef01 (\"mm/mglru: fix ineffective protection calculation\")\nmoved the protection computation into lru_gen_age_node(), which only runs\nfor kswapd.  Non-kswapd global reclaim reaches shrink_one() through\nlru_gen_shrink_node() -> shrink_many() without any protection computation,\nso emin/elow are whatever a previous kswapd run left behind - or zero if\nkswapd never ran on this node.  Relying on a prior kswapd pass is not\ncorrect either: a memcg's emin/elow are derived from its ancestors'\nmemory.min/low settings and from children_min_usage, both of which change\nover time, so emin/elow go stale even after kswapd has run and must be\nrecomputed at the point of reclaim.\n\nIntroduce mem_cgroup_calculate_protection_path() which computes emin/elow\nalong the root-to-target path only, by iterating through the cgroup\nancestors array top-down.  This avoids the full tree traversal that would\nbe needed with mem_cgroup_calculate_protection(), limiting the cost to\nO(depth) per memcg - typically 3-5 levels.\n\nCall it from shrink_one() for the non-kswapd path so that each memcg about\nto be shrunk has correct protection values.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:17:42","updated_at":"2026-11-30 14:17:42"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/b5b0c4e3096185d0da2819c8a57f3fa5cd631fb6","name":"https://git.kernel.org/stable/c/b5b0c4e3096185d0da2819c8a57f3fa5cd631fb6","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/269a9370df2c39f741a2dd673358af397c47078a","name":"https://git.kernel.org/stable/c/269a9370df2c39f741a2dd673358af397c47078a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/8f0b9bcb30a3e551350e71a6ddb0726761e5526d","name":"https://git.kernel.org/stable/c/8f0b9bcb30a3e551350e71a6ddb0726761e5526d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/2f0a531cf436c494f1b8c27ca691587b54a3d4b9","name":"https://git.kernel.org/stable/c/2f0a531cf436c494f1b8c27ca691587b54a3d4b9","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/15da1e4978dd4ea8f5faa6e15ee967ba4ad9a30a","name":"https://git.kernel.org/stable/c/15da1e4978dd4ea8f5faa6e15ee967ba4ad9a30a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-138863","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138863","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e4dde56cd208674ce899b47589f263499e5b8cdc b5b0c4e3096185d0da2819c8a57f3fa5cd631fb6 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e4dde56cd208674ce899b47589f263499e5b8cdc 8f0b9bcb30a3e551350e71a6ddb0726761e5526d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e4dde56cd208674ce899b47589f263499e5b8cdc 2f0a531cf436c494f1b8c27ca691587b54a3d4b9 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e4dde56cd208674ce899b47589f263499e5b8cdc 269a9370df2c39f741a2dd673358af397c47078a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e4dde56cd208674ce899b47589f263499e5b8cdc 15da1e4978dd4ea8f5faa6e15ee967ba4ad9a30a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.3","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.3 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.118 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.64 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.4 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["include/linux/memcontrol.h","mm/memcontrol.c","mm/vmscan.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"b5b0c4e3096185d0da2819c8a57f3fa5cd631fb6","status":"affected","version":"e4dde56cd208674ce899b47589f263499e5b8cdc","versionType":"git"},{"lessThan":"8f0b9bcb30a3e551350e71a6ddb0726761e5526d","status":"affected","version":"e4dde56cd208674ce899b47589f263499e5b8cdc","versionType":"git"},{"lessThan":"2f0a531cf436c494f1b8c27ca691587b54a3d4b9","status":"affected","version":"e4dde56cd208674ce899b47589f263499e5b8cdc","versionType":"git"},{"lessThan":"269a9370df2c39f741a2dd673358af397c47078a","status":"affected","version":"e4dde56cd208674ce899b47589f263499e5b8cdc","versionType":"git"},{"lessThan":"15da1e4978dd4ea8f5faa6e15ee967ba4ad9a30a","status":"affected","version":"e4dde56cd208674ce899b47589f263499e5b8cdc","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["include/linux/memcontrol.h","mm/memcontrol.c","mm/vmscan.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.3"},{"lessThan":"6.3","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.118","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.64","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"6.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.118","versionStartIncluding":"6.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.64","versionStartIncluding":"6.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4","versionStartIncluding":"6.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"6.3","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mglru: fix ineffective memory protection for non-kswapd reclaim\n\nFor MGLRU, memory.min/low is not honored during global proactive reclaim\n(writing to the root memory.reclaim) and global direct reclaim, because\nthese paths shrink memcgs using stale protection (emin/elow).  It can be\nreproduced as follows:\n\n  # echo 7 > /sys/kernel/mm/lru_gen/enabled\n  # cd /sys/fs/cgroup\n  # mkdir -p a/b\n  # echo 100M > a/memory.min\n  # echo +memory > a/cgroup.subtree_control\n  # echo 100M > a/b/memory.min\n  # echo $$ > a/b/cgroup.procs\n  # dd if=/dev/zero of=/tmp/testfile bs=1M count=200\n  # cat a/b/memory.current\n  222650368\n  # echo 500M > memory.reclaim\n  -bash: echo: write error: Resource temporarily unavailable\n  # cat a/b/memory.current\n  6070272\n\nmemory.min is 100M, yet reclaim drops a/b down to 6M, breaking the\nprotection.  The traditional LRU path is not affected because\nshrink_node() calls mem_cgroup_calculate_protection() for each memcg it\nvisits during a top-down tree walk.\n\nCommit 30d77b7eef01 (\"mm/mglru: fix ineffective protection calculation\")\nmoved the protection computation into lru_gen_age_node(), which only runs\nfor kswapd.  Non-kswapd global reclaim reaches shrink_one() through\nlru_gen_shrink_node() -> shrink_many() without any protection computation,\nso emin/elow are whatever a previous kswapd run left behind - or zero if\nkswapd never ran on this node.  Relying on a prior kswapd pass is not\ncorrect either: a memcg's emin/elow are derived from its ancestors'\nmemory.min/low settings and from children_min_usage, both of which change\nover time, so emin/elow go stale even after kswapd has run and must be\nrecomputed at the point of reclaim.\n\nIntroduce mem_cgroup_calculate_protection_path() which computes emin/elow\nalong the root-to-target path only, by iterating through the cgroup\nancestors array top-down.  This avoids the full tree traversal that would\nbe needed with mem_cgroup_calculate_protection(), limiting the cost to\nO(depth) per memcg - typically 3-5 levels.\n\nCall it from shrink_one() for the non-kswapd path so that each memcg about\nto be shrunk has correct protection values."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:25:41.357Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/b5b0c4e3096185d0da2819c8a57f3fa5cd631fb6"},{"url":"https://git.kernel.org/stable/c/8f0b9bcb30a3e551350e71a6ddb0726761e5526d"},{"url":"https://git.kernel.org/stable/c/2f0a531cf436c494f1b8c27ca691587b54a3d4b9"},{"url":"https://git.kernel.org/stable/c/269a9370df2c39f741a2dd673358af397c47078a"},{"url":"https://git.kernel.org/stable/c/15da1e4978dd4ea8f5faa6e15ee967ba4ad9a30a"}],"title":"mm/mglru: fix ineffective memory protection for non-kswapd reclaim","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-138863","datePublished":"2026-11-30T13:25:41.357Z","dateReserved":"2026-11-30T13:22:15.899Z","dateUpdated":"2026-11-30T13:25:41.357Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:17:42","lastModifiedDate":"2026-11-30 14:17:42","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"138863","Ordinal":"1","Title":"mm/mglru: fix ineffective memory protection for non-kswapd recla","CVE":"CVE-2026-138863","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"138863","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mglru: fix ineffective memory protection for non-kswapd reclaim\n\nFor MGLRU, memory.min/low is not honored during global proactive reclaim\n(writing to the root memory.reclaim) and global direct reclaim, because\nthese paths shrink memcgs using stale protection (emin/elow).  It can be\nreproduced as follows:\n\n  # echo 7 > /sys/kernel/mm/lru_gen/enabled\n  # cd /sys/fs/cgroup\n  # mkdir -p a/b\n  # echo 100M > a/memory.min\n  # echo +memory > a/cgroup.subtree_control\n  # echo 100M > a/b/memory.min\n  # echo $$ > a/b/cgroup.procs\n  # dd if=/dev/zero of=/tmp/testfile bs=1M count=200\n  # cat a/b/memory.current\n  222650368\n  # echo 500M > memory.reclaim\n  -bash: echo: write error: Resource temporarily unavailable\n  # cat a/b/memory.current\n  6070272\n\nmemory.min is 100M, yet reclaim drops a/b down to 6M, breaking the\nprotection.  The traditional LRU path is not affected because\nshrink_node() calls mem_cgroup_calculate_protection() for each memcg it\nvisits during a top-down tree walk.\n\nCommit 30d77b7eef01 (\"mm/mglru: fix ineffective protection calculation\")\nmoved the protection computation into lru_gen_age_node(), which only runs\nfor kswapd.  Non-kswapd global reclaim reaches shrink_one() through\nlru_gen_shrink_node() -> shrink_many() without any protection computation,\nso emin/elow are whatever a previous kswapd run left behind - or zero if\nkswapd never ran on this node.  Relying on a prior kswapd pass is not\ncorrect either: a memcg's emin/elow are derived from its ancestors'\nmemory.min/low settings and from children_min_usage, both of which change\nover time, so emin/elow go stale even after kswapd has run and must be\nrecomputed at the point of reclaim.\n\nIntroduce mem_cgroup_calculate_protection_path() which computes emin/elow\nalong the root-to-target path only, by iterating through the cgroup\nancestors array top-down.  This avoids the full tree traversal that would\nbe needed with mem_cgroup_calculate_protection(), limiting the cost to\nO(depth) per memcg - typically 3-5 levels.\n\nCall it from shrink_one() for the non-kswapd path so that each memcg about\nto be shrunk has correct protection values.","Type":"Description","Title":"mm/mglru: fix ineffective memory protection for non-kswapd recla"}]}}}