From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795154346; b=H6nXRKyZQ8NesEob/A6dFga10swT+Q5x9srfzLSymQpnZ9edsswAyHZsQbTDBgvj23A9 afy5OQkklTQFyB9nwakzpBdwKs/fvH+flsljVpLW7YMc6HNtXzqRoOVZFRB4YfKOC1ck/ YhiHCp7XlTgKOs74fPEFuMdOSmWMaPREyRH3wBFwLBTqsvb4P0V/4VCrmS2/7vBuZaAL3 RwnyFZCGHYiqVXDNxZVe2bGuUMqqVXGv7vMRvBPiAmjSjC844SmK0I+VKdxWASics9rAA EKfm6S1Fhw/m+njyvQPyiOILjOm/QolJo3s2vUsNyoDXcR7uOaGDPkxeNoGV6poA1gw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795154346; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=li7s73MnKUlw83IXbnIHvMMR1YCpH3djo85oEXfc6to=; b=fB9kXEkOiIgJdHaL27jnlnqDdnutkSSJKbaDiPM4ZtLDG2xqBgNW64xf9qBnC8uAc3iu a8PKXd/x9bwGZHq1R1GGecjaC+bUDSIIoJMsLOpvkbeMDlldNXy5C9giqd2hrYSANC87U vQcxX63epNVru75ibJTq3JX7bLPAiUbYKNGuLiQVpE00FaEV+dDht8cfmMdpFg7xedlEu XM6IH7cKkuDs90M2g0p2Lduo0uvL5wr/qcFfXZ9A+5eGVKviUOg9nHGEbiOxMSFRDr3zY nvqrQPsCOH3ztbAZAyfE/5AVszkW63h+1B4bNz7zAx2A2JcU7rvhmuSlU2/7HNCj/Sg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=m8wmrVEB; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1592E60A2625 for ; Fri, 20 Nov 2026 05:59:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=m8wmrVEB Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65A4B1F000C4; Fri, 20 Nov 2026 05:59:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795154345; bh=li7s73MnKUlw83IXbnIHvMMR1YCpH3djo85oEXfc6to=; h=From:To:Cc:Subject:Date:Reply-To; b=m8wmrVEBnH29pVvt2mYAnfBCUQthzfJWGJFYEAHtB7AHTTP/Xn6qkypY66xo6Gr8U 3RLH90m/5Pb90UDg2honZTAdT2qU1rmVgEtuqDuB6cTdv9dOLKCgd3VxOxsQmf535+ Iuhqxg+Zivbyp6gNWlW7Y2H83BNydHltUJ2iJqRc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99710: KVM: x86/mmu: Cap number of parent PTEs per SP at 1000 (the arbitrary rmap limit) Date: Fri, 20 Nov 2026 06:51:36 +0100 Message-ID: <2026112005-CVE-2026-99710-747d@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4240; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=PIqMr+w+ot8VZoM5EouVqb2hk51MGcL8sMWhqX98DRE=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/7/e1bfw4p7ieacbO10oqsyqu/P/tcH/+mR+3p7z9/ bvr8WVXy45YFgZBJgZZMUWWL9t4ju6vOKToZWh7GmYOKxPIEAYuTgGYSHouw3xfHb7g0nfvSi07 vJ6KPxCat3vf1isMCzrTD+Sr3/Vy6GCTmebN07dRZ1PxFQA= 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: KVM: x86/mmu: Cap number of parent PTEs per SP at 1000 (the arbitrary rmap limit) When potentially reusing a shadow page, zap the shadow page if its number of parent PTEs exceeds KVM's (mostly) arbitrary rmap recycling threshold. Letting the guest create a (mostly) unbounded number of parent PTEs allows the guest to coerce KVM into creating lists containing millions of PTEs, effectively bounded only by the maximum number of shadow pages. Because PTE lists are simple singly linked lists, removal is O(n). Even worse, if a list is constructed just so, teardown can be O(n^2), e.g. if SPTEs are built such that zapping child SPTEs always zaps the last entry in the list. To cap things off, all paths that walk PTE lists do so while holding mmu_lock, without conditionally rescheduling. Using a doubly linked list would not address the issue, as removal would remain O(n) since KVM still wouldn't know where in the list to remove from. Removal could be made O(1) by storing a per-SPTE pointer, but that would largely defeat the purpose of reusing SPs, and would penalize well-behaved guests, especially for nested TDP where aliasing page tables is uncommon. So, cap the maximum number of parent PTEs at the rmap limit. In practice, well-behaved guests will likely never run afoul of the limit. E.g. when running Linux as L1 with TDP, the number of parent PTEs for a single SP tops out at under 200 (though undoubtedly obscure workloads can push it higher). Deliberately use a "greater than or equal" as opposed to rmap's strictly "greater than", as the rmap code checks the threshold immediately *after* inserting into the list, i.e. the limit is 1000 for rmaps, KVM just very briefly blows past it. Apply the check to both indirect and direct SPs, because while a fully direct MMU naturally limits the number of parent PTEs to '1', direct SPs in indirect MMUs have no such constraint. E.g. if the guest maps a huge PTE into many locations in its page tables, and KVM is backing the hugepage with a direct SP, i.e. with a series of smaller pages, then KVM could end up with a direct SP with many parents. Note, shadow_mmu_try_split_huge_pages() always restarts the rmap walk or bails entirely if it gets to the point where it tries to grab a SP, i.e. there is *no* pre-existing bug that would be tripped by zapping a SP and thus rmaps when getting a SP. The Linux kernel CVE team has assigned CVE-2026-99710 to this issue. Affected and fixed versions =========================== Fixed in 6.12.118 with commit edf87e07376054eedcd5306e0794a26e3004d97b Fixed in 6.18.64 with commit e0752f3e543c1b67fc9115251ae6b8f151ba9f04 Fixed in 7.3.5 with commit 72238066aacc400df69cef4b602f083ae4737762 Fixed in 7.4-rc2 with commit e4558c3d7198ed9a0adc3304681f561f4e4d80e1 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-99710 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/kvm/mmu/mmu.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/edf87e07376054eedcd5306e0794a26e3004d97b https://git.kernel.org/stable/c/e0752f3e543c1b67fc9115251ae6b8f151ba9f04 https://git.kernel.org/stable/c/72238066aacc400df69cef4b602f083ae4737762 https://git.kernel.org/stable/c/e4558c3d7198ed9a0adc3304681f561f4e4d80e1