{"api_version":"1","generated_at":"2026-11-30T18:56:50+00:00","cve":"CVE-2026-138900","urls":{"html":"https://cve.report/CVE-2026-138900","api":"https://cve.report/api/cve/CVE-2026-138900.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-138900","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-138900"},"summary":{"title":"mm/mempolicy: take a cpuset cookie for the interleave node count","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mempolicy: take a cpuset cookie for the interleave node count\n\nalloc_pages_bulk_interleave() counts pol->nodes without a cpuset cookie:\n\n\tnodes = nodes_weight(pol->nodes);\n\tnr_pages_per_node = nr_pages / nodes;\n\nnodemask_t spans several words once MAX_NUMNODES exceeds BITS_PER_LONG, so\na concurrent cpuset rebind can tear that read and yield an empty mask even\nthough neither version of it was empty.  The call then allocates nothing\nand returns 0.\n\nSome compilers will hoist the loop entry test above the division,\nbecause nr_pages_per_node is dead when the loop does not run.\n\n\t682e:\tcall\t...\t\t<- nodes_weight()\n\t6838:\ttest\t%eax,%eax\n\t683a:\tjle\t692d\t\t<- nodes <= 0 skips the loop\n\t684a:\tdiv\t%rcx\n\nSo in most deployments, this div/0 is unreachable - but nothing in the\nsource guarantees that, it's just not easily exercised.\n\nTake the cookie around the count and bail if the mask really is empty. \nOnly the count needs it, interleave_nodes() takes the cookie itself so so\na torn read there is already retried.\n\nA rebind landing mid-loop can still leave the count disagreeing with the\nmask, so the loop may revisit a node or skip one - but a rebind where\nnodes change causes migration, so a handful of misplaced pages isn't\ncatastrophic in any sense.\n\nMeasured on a 72 node VM (NODES_SHIFT=10) with a cgroup v2 cpuset flipping\ncpuset.mems between a word 0 and a word 1 node set, and the two word read\nartificially widened: 330 zero counts in 130414 calls without the cookie,\nand 401 retries with it.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:17:47","updated_at":"2026-11-30 14:17:47"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/bbeeb4a29dc4ca6ac18ab3bafa3728bc984a4cde","name":"https://git.kernel.org/stable/c/bbeeb4a29dc4ca6ac18ab3bafa3728bc984a4cde","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/9c74c3161dd6217aae0941b83e7ac7a4b77a7901","name":"https://git.kernel.org/stable/c/9c74c3161dd6217aae0941b83e7ac7a4b77a7901","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/07acce0a02ccc67e7702d9be610b729ef449874a","name":"https://git.kernel.org/stable/c/07acce0a02ccc67e7702d9be610b729ef449874a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/1140b3a60d9d8a4ad32381077a8e3d3fa8f4d0bf","name":"https://git.kernel.org/stable/c/1140b3a60d9d8a4ad32381077a8e3d3fa8f4d0bf","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ad7b8f3cfdf63a9a0d74850ff7c9b035d93968ba","name":"https://git.kernel.org/stable/c/ad7b8f3cfdf63a9a0d74850ff7c9b035d93968ba","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/8645813dad5bb05e2ef57eda0f195f2a2072b831","name":"https://git.kernel.org/stable/c/8645813dad5bb05e2ef57eda0f195f2a2072b831","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-138900","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138900","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c00b6b9610991c042ff4c3153daaa3ea8522c210 07acce0a02ccc67e7702d9be610b729ef449874a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c00b6b9610991c042ff4c3153daaa3ea8522c210 9c74c3161dd6217aae0941b83e7ac7a4b77a7901 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c00b6b9610991c042ff4c3153daaa3ea8522c210 ad7b8f3cfdf63a9a0d74850ff7c9b035d93968ba git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c00b6b9610991c042ff4c3153daaa3ea8522c210 1140b3a60d9d8a4ad32381077a8e3d3fa8f4d0bf git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c00b6b9610991c042ff4c3153daaa3ea8522c210 8645813dad5bb05e2ef57eda0f195f2a2072b831 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c00b6b9610991c042ff4c3153daaa3ea8522c210 bbeeb4a29dc4ca6ac18ab3bafa3728bc984a4cde git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.16","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.16 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* 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.117 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.63 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":["mm/mempolicy.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"07acce0a02ccc67e7702d9be610b729ef449874a","status":"affected","version":"c00b6b9610991c042ff4c3153daaa3ea8522c210","versionType":"git"},{"lessThan":"9c74c3161dd6217aae0941b83e7ac7a4b77a7901","status":"affected","version":"c00b6b9610991c042ff4c3153daaa3ea8522c210","versionType":"git"},{"lessThan":"ad7b8f3cfdf63a9a0d74850ff7c9b035d93968ba","status":"affected","version":"c00b6b9610991c042ff4c3153daaa3ea8522c210","versionType":"git"},{"lessThan":"1140b3a60d9d8a4ad32381077a8e3d3fa8f4d0bf","status":"affected","version":"c00b6b9610991c042ff4c3153daaa3ea8522c210","versionType":"git"},{"lessThan":"8645813dad5bb05e2ef57eda0f195f2a2072b831","status":"affected","version":"c00b6b9610991c042ff4c3153daaa3ea8522c210","versionType":"git"},{"lessThan":"bbeeb4a29dc4ca6ac18ab3bafa3728bc984a4cde","status":"affected","version":"c00b6b9610991c042ff4c3153daaa3ea8522c210","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["mm/mempolicy.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.16"},{"lessThan":"5.16","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.117","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.63","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.1.193","versionStartIncluding":"5.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"5.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.117","versionStartIncluding":"5.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.63","versionStartIncluding":"5.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4","versionStartIncluding":"5.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"5.16","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mempolicy: take a cpuset cookie for the interleave node count\n\nalloc_pages_bulk_interleave() counts pol->nodes without a cpuset cookie:\n\n\tnodes = nodes_weight(pol->nodes);\n\tnr_pages_per_node = nr_pages / nodes;\n\nnodemask_t spans several words once MAX_NUMNODES exceeds BITS_PER_LONG, so\na concurrent cpuset rebind can tear that read and yield an empty mask even\nthough neither version of it was empty.  The call then allocates nothing\nand returns 0.\n\nSome compilers will hoist the loop entry test above the division,\nbecause nr_pages_per_node is dead when the loop does not run.\n\n\t682e:\tcall\t...\t\t<- nodes_weight()\n\t6838:\ttest\t%eax,%eax\n\t683a:\tjle\t692d\t\t<- nodes <= 0 skips the loop\n\t684a:\tdiv\t%rcx\n\nSo in most deployments, this div/0 is unreachable - but nothing in the\nsource guarantees that, it's just not easily exercised.\n\nTake the cookie around the count and bail if the mask really is empty. \nOnly the count needs it, interleave_nodes() takes the cookie itself so so\na torn read there is already retried.\n\nA rebind landing mid-loop can still leave the count disagreeing with the\nmask, so the loop may revisit a node or skip one - but a rebind where\nnodes change causes migration, so a handful of misplaced pages isn't\ncatastrophic in any sense.\n\nMeasured on a 72 node VM (NODES_SHIFT=10) with a cgroup v2 cpuset flipping\ncpuset.mems between a word 0 and a word 1 node set, and the two word read\nartificially widened: 330 zero counts in 130414 calls without the cookie,\nand 401 retries with it."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:26:01.936Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/07acce0a02ccc67e7702d9be610b729ef449874a"},{"url":"https://git.kernel.org/stable/c/9c74c3161dd6217aae0941b83e7ac7a4b77a7901"},{"url":"https://git.kernel.org/stable/c/ad7b8f3cfdf63a9a0d74850ff7c9b035d93968ba"},{"url":"https://git.kernel.org/stable/c/1140b3a60d9d8a4ad32381077a8e3d3fa8f4d0bf"},{"url":"https://git.kernel.org/stable/c/8645813dad5bb05e2ef57eda0f195f2a2072b831"},{"url":"https://git.kernel.org/stable/c/bbeeb4a29dc4ca6ac18ab3bafa3728bc984a4cde"}],"title":"mm/mempolicy: take a cpuset cookie for the interleave node count","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-138900","datePublished":"2026-11-30T13:26:01.936Z","dateReserved":"2026-11-30T13:22:15.902Z","dateUpdated":"2026-11-30T13:26:01.936Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:17:47","lastModifiedDate":"2026-11-30 14:17:47","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"138900","Ordinal":"1","Title":"mm/mempolicy: take a cpuset cookie for the interleave node count","CVE":"CVE-2026-138900","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"138900","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mempolicy: take a cpuset cookie for the interleave node count\n\nalloc_pages_bulk_interleave() counts pol->nodes without a cpuset cookie:\n\n\tnodes = nodes_weight(pol->nodes);\n\tnr_pages_per_node = nr_pages / nodes;\n\nnodemask_t spans several words once MAX_NUMNODES exceeds BITS_PER_LONG, so\na concurrent cpuset rebind can tear that read and yield an empty mask even\nthough neither version of it was empty.  The call then allocates nothing\nand returns 0.\n\nSome compilers will hoist the loop entry test above the division,\nbecause nr_pages_per_node is dead when the loop does not run.\n\n\t682e:\tcall\t...\t\t<- nodes_weight()\n\t6838:\ttest\t%eax,%eax\n\t683a:\tjle\t692d\t\t<- nodes <= 0 skips the loop\n\t684a:\tdiv\t%rcx\n\nSo in most deployments, this div/0 is unreachable - but nothing in the\nsource guarantees that, it's just not easily exercised.\n\nTake the cookie around the count and bail if the mask really is empty. \nOnly the count needs it, interleave_nodes() takes the cookie itself so so\na torn read there is already retried.\n\nA rebind landing mid-loop can still leave the count disagreeing with the\nmask, so the loop may revisit a node or skip one - but a rebind where\nnodes change causes migration, so a handful of misplaced pages isn't\ncatastrophic in any sense.\n\nMeasured on a 72 node VM (NODES_SHIFT=10) with a cgroup v2 cpuset flipping\ncpuset.mems between a word 0 and a word 1 node set, and the two word read\nartificially widened: 330 zero counts in 130414 calls without the cookie,\nand 401 retries with it.","Type":"Description","Title":"mm/mempolicy: take a cpuset cookie for the interleave node count"}]}}}