{"id":"CVE-2026-89986","state":"PUBLISHED","title":"mm/mempolicy: fix sleeping allocation in alloc_pages_bulk_weighted_interleave()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mempolicy: fix sleeping allocation in alloc_pages_bulk_weighted_interleave()\n\nsyzbot reported a sleeping function called from invalid context splat in\nbucket_table_alloc().\n\nWhen rhashtable_insert_slow() rehashes the table under rcu_read_lock(), it\ncalls bucket_table_alloc(..., GFP_ATOMIC | __GFP_NOWARN).  If the bucket\ntable allocation uses vmalloc, __vmalloc_node_range_noprof() invokes\nvm_area_alloc_pages() -> alloc_pages_bulk_mempolicy_noprof() with the\npassed GFP_ATOMIC flags.\n\nIf the current task has an MPOL_WEIGHTED_INTERLEAVE mempolicy,\nalloc_pages_bulk_weighted_interleave() is called and currently hardcodes\nGFP_KERNEL when allocating the temporary weights array, triggering a\nmight_alloc() splat in atomic/RCU contexts.\n\nPass the gfp flags (masked with GFP_RECLAIM_MASK to strip page-allocator\nzone modifiers like __GFP_HIGHMEM) received by\nalloc_pages_bulk_weighted_interleave() to kmalloc() instead of hardcoding\nGFP_KERNEL.  Since the weights buffer is immediately initialized in full,\nkmalloc() is sufficient.","publishedAt":"2026-09-16T10:33:01.545Z","updatedAt":"2026-10-19T08:56:00.678Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"fa3bea4e1f8202d787709b7e3654eb0a99aed758","status":"affected","lessThan":"bcb3d0c867ee40dc48e9c085bf328fbc679b6656","versionType":"git"},{"version":"fa3bea4e1f8202d787709b7e3654eb0a99aed758","status":"affected","lessThan":"0ceda28f371df9e0bbdaa29214f71fe8298f23d8","versionType":"git"},{"version":"fa3bea4e1f8202d787709b7e3654eb0a99aed758","status":"affected","lessThan":"2943f1f4b7f2816177060eb9f551f2e6d8b629ba","versionType":"git"},{"version":"fa3bea4e1f8202d787709b7e3654eb0a99aed758","status":"affected","lessThan":"540e583b66d6402bf556fde5e53c817a54c1afe5","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/mempolicy.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.9","versionType":"semver"},{"version":"6.12.110","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.51","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.5","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/mempolicy.c"]}],"references":["https://git.kernel.org/stable/c/bcb3d0c867ee40dc48e9c085bf328fbc679b6656","https://git.kernel.org/stable/c/0ceda28f371df9e0bbdaa29214f71fe8298f23d8","https://git.kernel.org/stable/c/2943f1f4b7f2816177060eb9f551f2e6d8b629ba","https://git.kernel.org/stable/c/540e583b66d6402bf556fde5e53c817a54c1afe5"],"weaknesses":[],"ingestedAt":"2026-10-29T20:13:26.108Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/89xxx/CVE-2026-89986.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-89986","state":"PUBLISHED","datePublished":"2026-09-16T10:33:01.545Z","dateUpdated":"2026-10-19T08:56:00.678Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-11T19:38:34.779Z"},"containers":{"cna":{"title":"mm/mempolicy: fix sleeping allocation in alloc_pages_bulk_weighted_interleave()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mempolicy: fix sleeping allocation in alloc_pages_bulk_weighted_interleave()\n\nsyzbot reported a sleeping function called from invalid context splat in\nbucket_table_alloc().\n\nWhen rhashtable_insert_slow() rehashes the table under rcu_read_lock(), it\ncalls bucket_table_alloc(..., GFP_ATOMIC | __GFP_NOWARN).  If the bucket\ntable allocation uses vmalloc, __vmalloc_node_range_noprof() invokes\nvm_area_alloc_pages() -> alloc_pages_bulk_mempolicy_noprof() with the\npassed GFP_ATOMIC flags.\n\nIf the current task has an MPOL_WEIGHTED_INTERLEAVE mempolicy,\nalloc_pages_bulk_weighted_interleave() is called and currently hardcodes\nGFP_KERNEL when allocating the temporary weights array, triggering a\nmight_alloc() splat in atomic/RCU contexts.\n\nPass the gfp flags (masked with GFP_RECLAIM_MASK to strip page-allocator\nzone modifiers like __GFP_HIGHMEM) received by\nalloc_pages_bulk_weighted_interleave() to kmalloc() instead of hardcoding\nGFP_KERNEL.  Since the weights buffer is immediately initialized in full,\nkmalloc() is sufficient."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"fa3bea4e1f8202d787709b7e3654eb0a99aed758","status":"affected","lessThan":"bcb3d0c867ee40dc48e9c085bf328fbc679b6656","versionType":"git"},{"version":"fa3bea4e1f8202d787709b7e3654eb0a99aed758","status":"affected","lessThan":"0ceda28f371df9e0bbdaa29214f71fe8298f23d8","versionType":"git"},{"version":"fa3bea4e1f8202d787709b7e3654eb0a99aed758","status":"affected","lessThan":"2943f1f4b7f2816177060eb9f551f2e6d8b629ba","versionType":"git"},{"version":"fa3bea4e1f8202d787709b7e3654eb0a99aed758","status":"affected","lessThan":"540e583b66d6402bf556fde5e53c817a54c1afe5","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/mempolicy.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.9","versionType":"semver"},{"version":"6.12.110","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.51","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.5","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/mempolicy.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/bcb3d0c867ee40dc48e9c085bf328fbc679b6656"},{"url":"https://git.kernel.org/stable/c/0ceda28f371df9e0bbdaa29214f71fe8298f23d8"},{"url":"https://git.kernel.org/stable/c/2943f1f4b7f2816177060eb9f551f2e6d8b629ba"},{"url":"https://git.kernel.org/stable/c/540e583b66d6402bf556fde5e53c817a54c1afe5"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - Triggering requires set_mempolicy(MPOL_WEIGHTED_INTERLEAVE) on the attacker's task and a local syscall that grows an rhashtable until GFP_ATOMIC kvmalloc falls back to vmalloc (nftables hash sets, tc flower, BPF rhashtable maps); softirq/packet paths use default_policy via in_interrupt() and cannot apply the attacker's mempolicy.\nAC:L - The attacker fully controls setup: set_mempolicy on their own task, insert enough rhashtable elements for a >PAGE_SIZE bucket table, and apply memory pressure so GFP_ATOMIC kmalloc fails and kvmalloc uses vmalloc; CONFIG_NUMA is standard on x86_64/arm64 distro and cloud kernels, and no attacker-uncontrollable race is required.\nPR:L - set_mempolicy() has no capability check, and the rhashtable rehash path is reachable by an unprivileged user via nftables or tc in a user+net namespace where CAP_NET_ADMIN is namespace-local; init-namespace root is not required.\nUI:N - The attacker sets their own mempolicy and drives the rhashtable inserts themselves; no victim action such as mounting a filesystem or opening a file is required.\nS:U - The illegal GFP_KERNEL allocation and any resulting RCU use-after-free of the rhashtable bucket table stay inside the host kernel's memory-management authority; this is standard in-kernel impact, not a VM, IOMMU, or sandbox boundary crossing.\nC:H - Sleeping under rcu_read_lock() in rhashtable_insert_slow() on non-PREEMPT_RCU kernels can let the grace period complete and free the old bucket table before rhashtable_rehash_attach() uses it, yielding a use-after-free read of kernel heap.\nI:H - The same RCU-break UAF lets rhashtable_rehash_attach() cmpxchg old_tbl->future_tbl on a freed table, which is an attacker-sprayable kernel write primitive via heap reuse rather than a clean failure.\nA:H - GFP_KERNEL under rcu_read_lock produces a sleeping-from-invalid-context BUG/WARN (panic with panic_on_warn), can RCU-stall or deadlock if reclaim actually sleeps, and the bucket-table UAF can oops the kernel."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-19T08:56:00.678Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.12.110"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.18.51"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"7.2.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"7.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}