Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 932283B27D8 for ; Thu, 17 Sep 2026 16:35:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789662925; cv=none; b=Z+fHWv1PYJmKgteOfKRJfRm/xSQe8NpAcv2pqCTsnlrlb8PwwFciSIWKiu2m3z/hrHbCwhNxkiO+22SFWvVYmLWzNx5MoQ7V4MoqAL5yXcYCA8FTG2nGJCfa120pYhTdZSsgPD/q7Xqail8P0klpAmf0K0u/f0iwErTEmssbKRM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789662925; c=relaxed/simple; bh=RbW01EHr+GVOr5MtRtBPNtxf7GF7RuBpHn3IAbJDn9Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AXj4TaGB8N2a9gRbFXZ343yIDAIluDw+Fcv7pkDTH/Vnr281ukvhmUIomCBAtZNZdFx3EmhEqE8LOA/bwizpMuJvqdZcVxsZnw+vqtWD7atHwRd57kVI/4uxsV2sK5sdeA5HJPN/pb4LEkvlDiOgyEi1uIk3IIn4dyKs2P0ZovY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BkcwT5+L; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="BkcwT5+L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0CD41F00893; Thu, 17 Sep 2026 16:35:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789662923; bh=CxWeGb5Dr22/zEqzuCQSHwlozXfCIXD6d770HIeekk8=; h=From:To:Cc:Subject:Date:Reply-To; b=BkcwT5+LLRIGjzti5hGGxoYRtdCKfF+VbSsCRJ2Xj2hp+1TwgS0XhjIrA51s3dr88 9wqpBLOszwUYzCYxRf31BgpvmIL/ZlqpuCfQWpcH84jAZzuUPRWPywJHV7X0J0vl6r 78FfU5Km6CHIe6zuo+Qiu/ZQChg81xzKkl9lbrXw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-93066: x86/mm/pat: Take cpa_lock around large-page collapse Date: Thu, 17 Sep 2026 17:15:45 +0100 Message-ID: <2026091738-CVE-2026-93066-51fe@gregkh> X-Mailer: git-send-email 2.55.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=4212; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=vewpU0oJ7sCsBWYxr36qQitUOBYITRsXVnKbnjxnkdc=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlrBA4JfNLr5b27oXZlTF2KUPXBvMR8mY93o5uXTlls9 27dPsHVHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR9AsM82MSt8sf/8h3/N6s yz1O64tO9e1Pq2aYp9bA9jjVi3viN9mbfv1nbyxvrQipAAA= 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: x86/mm/pat: Take cpa_lock around large-page collapse Loading and unloading modules concurrently on several CPUs on a KASAN build, with a short delay injected at the CPA page-table lookup to widen the window, faults within minutes: BUG: KASAN: use-after-free in __change_page_attr+0x7cc/0x7e0 Write of size 8 at addr ffff888181139718 by task modprobe ... The buggy address belongs to the physical page: pfn:0x181139 ... page_type: f2(table) cpa_collapse_large_pages() rebuilds a leaf PMD from its 4K PTEs and frees the old PTE-table pages, while __change_page_attr() fetches a PTE pointer from a lockless lookup_address_in_pgd_attr() and writes it with set_pte_atomic() only later. When module text is served from a shared large ROX mapping the two run on the same PMD: CPU A (module load) CPU B (module finalize) ------------------- ----------------------- execmem_make_temp_rw set_memory_nx __change_page_attr split 2M -> 4K table P kpte = &P[i] (lockless) execmem_restore_rox set_memory_rox (CPA_COLLAPSE) cpa_collapse_large_pages rebuild leaf PMD flush_tlb_all pagetable_free(P) set_pte_atomic(kpte, ...) -> writes into freed P P is a page-table page (page_type: table), reused at once, so the write corrupts whatever got the page next: a bad-pte or bad-page splat, or a fatal fault once P has been turned into read-only text. The flush_tlb_all() before the free does not close this: its IPI only serializes against page-table walkers that run with interrupts off (e.g. GUP-fast); the walk in __change_page_attr() runs with interrupts on, so nothing stops it from holding a stale pointer into P. Serialize the collapse - the PMD rebuild, TLB flush and PTE-table free - under cpa_lock, the same lock __change_page_attr() now takes unconditionally since commit ("x86/mm/pat: stop gating cpa_lock on debug_pagealloc_enabled()"), so a concurrent walker can no longer hold a pointer into a table the collapse is about to free. The Linux kernel CVE team has assigned CVE-2026-93066 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit 41d88484c71cd4f659348da41b7b5b3dbd3be1f6 and fixed in 6.18.52 with commit 591b6fac9df3f43522e8ff6eed8662f8b6f1a124 Issue introduced in 6.15 with commit 41d88484c71cd4f659348da41b7b5b3dbd3be1f6 and fixed in 7.2.6 with commit fb97d1d6c20692e15247fa5c8b894b2325e38aee Issue introduced in 6.15 with commit 41d88484c71cd4f659348da41b7b5b3dbd3be1f6 and fixed in 7.3-rc1 with commit 1aac65f3e651334259ecb2a5f5ddb81c01f02599 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-93066 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: arch/x86/mm/pat/set_memory.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/591b6fac9df3f43522e8ff6eed8662f8b6f1a124 https://git.kernel.org/stable/c/fb97d1d6c20692e15247fa5c8b894b2325e38aee https://git.kernel.org/stable/c/1aac65f3e651334259ecb2a5f5ddb81c01f02599