Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 093202FB632 for ; Sat, 31 Jan 2026 11:45:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769859909; cv=none; b=UHeyytxgE1aA5v54mft6ivKb/E4BObxGzlYR99R8ycs1xmP4EWbDGNv/PtSzylvOqzOvYzWC/TI3OGZa5WavAXNj3LQJCwWJ1w1YLimvmW4nunAyCjGZYrzWMFe7e5B7ZI/V/+huPPaJfD8nMllNPGd3E1deoqEBZYhmbfZSkeE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769859909; c=relaxed/simple; bh=X6aMTAALAEFWp0DcMk5Wh7zMPsJjjwinbHzY2X4xMjw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gAC0QjQg6RnNwHUOHeh2pu+9Hpgw3Le5496x+DbmT7gW+tanv275lFqKXIarJM15F9yGwV3Xeb0Push8pzdCxpMvuPpisMoGsUoeoe6pt/po6ALVXB/BM2I4gAs/6dBrjSKjgjh7cJfqWNVAdTUOrAMMvztz79LY7+nDsSOX5RM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uOuVbTMV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="uOuVbTMV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6781FC4CEF1; Sat, 31 Jan 2026 11:45:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1769859908; bh=X6aMTAALAEFWp0DcMk5Wh7zMPsJjjwinbHzY2X4xMjw=; h=From:To:Cc:Subject:Date:Reply-To:From; b=uOuVbTMVRY55pd5fZFqLg1moOwUvjszdTYtnOI7X//FJDuKzz/ihlDB9sqCVmZOm/ 1+kTDIqlQLJiGbWQlvIhvj1dWGbkNwYVt85BmCYHXvppxIxbsQ+t57me0cPeTkLbJz zqV37TRv+9/KAKKDM1CPOKYX8+hJALSJzcGJat9c= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-23025: mm/page_alloc: prevent pcp corruption with SMP=n Date: Sat, 31 Jan 2026 12:44:25 +0100 Message-ID: <2026013119-CVE-2026-23025-ab02@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5525; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=yQt6jEGZS6tRnMBQrTmzBPJLqLYcc2ivDXRwgNB2DAs=; b=owGbwMvMwCRo6H6F97bub03G02pJDJm1r4WnseTwzTo1z+Poiimf5758Z893z3Ba3662kJxPf t8zD6yo7ohlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJSC5nWNCioRDdxsls9zks aD5jz778hx881zMsmKySd2+LY+yCmZlLrTMnvOGIb/q0BAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: mm/page_alloc: prevent pcp corruption with SMP=n The kernel test robot has reported: BUG: spinlock trylock failure on UP on CPU#0, kcompactd0/28 lock: 0xffff888807e35ef0, .magic: dead4ead, .owner: kcompactd0/28, .owner_cpu: 0 CPU: 0 UID: 0 PID: 28 Comm: kcompactd0 Not tainted 6.18.0-rc5-00127-ga06157804399 #1 PREEMPT 8cc09ef94dcec767faa911515ce9e609c45db470 Call Trace: __dump_stack (lib/dump_stack.c:95) dump_stack_lvl (lib/dump_stack.c:123) dump_stack (lib/dump_stack.c:130) spin_dump (kernel/locking/spinlock_debug.c:71) do_raw_spin_trylock (kernel/locking/spinlock_debug.c:?) _raw_spin_trylock (include/linux/spinlock_api_smp.h:89 kernel/locking/spinlock.c:138) __free_frozen_pages (mm/page_alloc.c:2973) ___free_pages (mm/page_alloc.c:5295) __free_pages (mm/page_alloc.c:5334) tlb_remove_table_rcu (include/linux/mm.h:? include/linux/mm.h:3122 include/asm-generic/tlb.h:220 mm/mmu_gather.c:227 mm/mmu_gather.c:290) ? __cfi_tlb_remove_table_rcu (mm/mmu_gather.c:289) ? rcu_core (kernel/rcu/tree.c:?) rcu_core (include/linux/rcupdate.h:341 kernel/rcu/tree.c:2607 kernel/rcu/tree.c:2861) rcu_core_si (kernel/rcu/tree.c:2879) handle_softirqs (arch/x86/include/asm/jump_label.h:36 include/trace/events/irq.h:142 kernel/softirq.c:623) __irq_exit_rcu (arch/x86/include/asm/jump_label.h:36 kernel/softirq.c:725) irq_exit_rcu (kernel/softirq.c:741) sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1052) RIP: 0010:_raw_spin_unlock_irqrestore (arch/x86/include/asm/preempt.h:95 include/linux/spinlock_api_smp.h:152 kernel/locking/spinlock.c:194) free_pcppages_bulk (mm/page_alloc.c:1494) drain_pages_zone (include/linux/spinlock.h:391 mm/page_alloc.c:2632) __drain_all_pages (mm/page_alloc.c:2731) drain_all_pages (mm/page_alloc.c:2747) kcompactd (mm/compaction.c:3115) kthread (kernel/kthread.c:465) ? __cfi_kcompactd (mm/compaction.c:3166) ? __cfi_kthread (kernel/kthread.c:412) ret_from_fork (arch/x86/kernel/process.c:164) ? __cfi_kthread (kernel/kthread.c:412) ret_from_fork_asm (arch/x86/entry/entry_64.S:255) Matthew has analyzed the report and identified that in drain_page_zone() we are in a section protected by spin_lock(&pcp->lock) and then get an interrupt that attempts spin_trylock() on the same lock. The code is designed to work this way without disabling IRQs and occasionally fail the trylock with a fallback. However, the SMP=n spinlock implementation assumes spin_trylock() will always succeed, and thus it's normally a no-op. Here the enabled lock debugging catches the problem, but otherwise it could cause a corruption of the pcp structure. The problem has been introduced by commit 574907741599 ("mm/page_alloc: leave IRQs enabled for per-cpu page allocations"). The pcp locking scheme recognizes the need for disabling IRQs to prevent nesting spin_trylock() sections on SMP=n, but the need to prevent the nesting in spin_lock() has not been recognized. Fix it by introducing local wrappers that change the spin_lock() to spin_lock_iqsave() with SMP=n and use them in all places that do spin_lock(&pcp->lock). [vbabka@suse.cz: add pcp_ prefix to the spin_lock_irqsave wrappers, per Steven] The Linux kernel CVE team has assigned CVE-2026-23025 to this issue. Affected and fixed versions =========================== Issue introduced in 6.2 with commit 5749077415994eb02d660b2559b9d8278521e73d and fixed in 6.6.122 with commit 4a04ff9cd816e7346fcc8126f00ed80481f6569d Issue introduced in 6.2 with commit 5749077415994eb02d660b2559b9d8278521e73d and fixed in 6.12.67 with commit df63d31e9ae02e2f6cd96147779e4ed7cd0e75f6 Issue introduced in 6.2 with commit 5749077415994eb02d660b2559b9d8278521e73d and fixed in 6.18.7 with commit 3098f8f7c7b0686c74827aec42a2c45e69801ff8 Issue introduced in 6.2 with commit 5749077415994eb02d660b2559b9d8278521e73d and fixed in 6.19-rc6 with commit 038a102535eb49e10e93eafac54352fcc5d78847 Issue introduced in 6.1.57 with commit d1da921452b3ee7e07383c12955ab1c6f3b08752 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-23025 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: mm/page_alloc.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/4a04ff9cd816e7346fcc8126f00ed80481f6569d https://git.kernel.org/stable/c/df63d31e9ae02e2f6cd96147779e4ed7cd0e75f6 https://git.kernel.org/stable/c/3098f8f7c7b0686c74827aec42a2c45e69801ff8 https://git.kernel.org/stable/c/038a102535eb49e10e93eafac54352fcc5d78847