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=1796045649; b=QBwqqd/cD/+TZRXPRruUILNtK19A31Ync2uVeCtYlVgJSrD9w6/7sNHUbZnUDVTkl1Wo yKz11TYZUGGO0je2rhTPprviVZiBUiT9ul5YAuo5ZiprwssmQBHBHKq6qblvdT5dcwDmS cAPqvyipHH5MRNOESdHx2HRju0lmCTgLk2cZg+j/Hk5IUn3NnsZ487/32aFw5yWCRlTdc 26P1Ax8mrQJCT0WK1CV401XoksQbj1w9cbBQI6PHt9vByJ3e9tw9PgutjsWZNYYMHRfWP 1q+3GuX7nL2RbbV2spoe1kLMLN84Bz1fqnvBWj1OXiytC2rZ4Uw2yf1/+bge8OL33NA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796045649; 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=n6KM1bkYcPMKdPhwG03leoqMebiNiucbg+fWxI0YeBo=; b=ZHztOqbq44NmcbW/WlCJ8ikB7V4sejImzJOqvm/RhjvlyKMVl1WXVGiO7RkfF+KwN0nx dfRPUGqqv/XFzfir9Y0OjI8UVfxQCnIehiNrkXf9jp6lIff6KcNVOhqRPU0m7wnX1GN8r J/cPzdGAFLtGRNfQB3GxCMMsaGetCiCxeFUthoY6HCpbvha4cvrGeCol7m2XofWUayGbX 8ffNQt1bvL/G+9XkD+YN+Lu2RI1R1CTsMyZbvVRyrFTNfycko+xroQJ9Q3jmmSK9HRbhk SKxAFYHPgYItmn5STioLPgI9mLFp/p1u7roG70PXvs6RYTqmZoJVaVAGgw1LVDrAaaA== 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=l8Jn7LSw; 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 8FDE4606A327 for ; Mon, 30 Nov 2026 13:34:09 +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=l8Jn7LSw Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAC5E1F00898; Mon, 30 Nov 2026 13:34:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796045649; bh=n6KM1bkYcPMKdPhwG03leoqMebiNiucbg+fWxI0YeBo=; h=From:To:Cc:Subject:Date:Reply-To; b=l8Jn7LSwoAAovRoCLTDbhCE3lyxd0KzFPQRyIbC7WqngnUD9Uunmzl+BuoFHF5jVX oDF2a+tNbbAWg4eU6warDoMwNLgT6TFz//gHEqNvSA6wbpmTC/7lvfkfmd9GsymPm0 nT26h/zIKiJoj5RpaZMxdjxXvhaAnfPf6P8LSUaA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99929: mm/hugetlb: unmap the page where the other VMA maps it Date: Mon, 30 Nov 2026 14:19:19 +0100 Message-ID: <2026113053-CVE-2026-99929-e6aa@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=7174; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=iKXxsnEpxDudLfbI98uS0HtZIeHC2qCdiE90KOpdgNE=; b=owGbwMvMwCRo6H6F97bub03G02pJDNm85Y1/nEN3TPDbx/uus33S1W3ucvlmr60nLuJVnWCuL tCTKyzaEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNx2sMw33NXXR+XxPr1Hxo8 9rXkVUWsOmhdzDA/YPH139/ubl0755eGVfiphlmODw5aAgA= 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/hugetlb: unmap the page where the other VMA maps it If the owner of a MAP_PRIVATE hugetlb mapping fails to allocate a page for CoW, unmap_ref_private() unmaps the old page from all other private VMAs that have no reservation of their own. It finds them by the offset in the file, but then zaps each of them at the address of the faulting VMA. Nothing says that another VMA maps the offset at that address: a child can have moved its copy of the VMA with mremap(), and a second mapping of the file is wherever mmap() has put it. So __unmap_hugepage_range() walks the page tables of the other mm at an address outside of iter_vma, where i_mmap_rwsem of this file protects nothing and where anything can be mapped, and the page stays mapped where it really is. All of the following was seen on v7.3-rc6+ (g6c377d19d4a5) in KVM guests, as a user without any privilege. It takes a pool of 2 MiB pages with no free page that is not reserved, so that the allocation fails: the user can take or reserve what is free itself. - The child moves its VMA away. The page is never unmapped, the mapcount stays 2, and the owner goes round retry_avoidcopy in hugetlb_wp() until the child is gone or a page becomes free. SIGKILL to the owner does not end it. 5 of 5 runs. - The owner's mm has a second private mapping of the offset, made with MAP_NORESERVE. The owner zaps its own entry and reads zeroes where its data was. 5 of 5 runs. - The child moves its VMA away and maps a 1 GiB hugetlb page at the old address, so this one takes a pool with a 1 GiB page as well. huge_pte_offset() for the 2 MiB size steps through the PUD leaf, so the "PMD table" is the 1 GiB page itself and its "page table lock" is folio->private of that page, which holds 2. Kernels with lock debugging oops in __unmap_hugepage_range(), 7 of 7 runs. Others spin on that word for ever with preemption disabled, 5 of 5 runs: watchdog: BUG: soft lockup - CPU#0 stuck for 26s! [u_det3:130] RIP: 0010:queued_spin_lock_slowpath+0x8a/0x290 RAX: 0000000000000002 RBX: ffffea0001000028 Call Trace: __unmap_hugepage_range+0x154/0x6d0 unmap_hugepage_range+0xc1/0x140 hugetlb_wp+0x55c/0x700 hugetlb_fault+0x5f3/0x8f0 RCU stalls follow, and killing all tasks of the user changes nothing. Four such owners, whose children share a single 1 GiB page, took down the whole guest with its four CPUs, 2 of 2 runs: one reported soft lockups on all four, the other gave no sign of life any more. i_mmap_rwsem stays write locked. With a MAP_PRIVATE mapping of a hugetlbfs file that belongs to another user, and that the attacker can only read, the next mmap() of that file by its owner sleeps uninterruptibly in __mmap_region(), 4 of 4 runs. Compute the address from the offset for each VMA. The tree walk returns only VMAs that cover pgoff, and vm_start, vm_end and vm_pgoff of a hugetlb VMA are aligned to the huge page size, as pgoff is, so the whole range lies inside iter_vma. Its page tables can not go away there, since the VMA is unlinked from the file under i_mmap_rwsem first. With the right address the page is unmapped from all VMAs but the owner's, so the retry in hugetlb_wp() finds a mapcount of 1 and reuses the page. A child that has moved its copy of the VMA now loses the page, and gets SIGBUS when it faults on a missing page of that VMA. That is what the comment above the function has always promised to those who do not own the reservation, and what already happens to a child that has left the VMA in place. The address has been wrong from the start, and the second case needs only mmap() and fork(). mremap() of hugetlb VMAs, which the other cases use, came with commit 550a7d60bd5e ("mm, hugepages: add mremap() support for hugepage backed vma") in v5.16. Original fix generated by an LLM and sent in private by Josef. [david@kernel.org: switch to vma_filebacked_address, add VM_WARN_ON_ONCE, refine comments] The Linux kernel CVE team has assigned CVE-2026-99929 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.27 with commit 04f2cbe35699d22dbf428373682ead85ca1240f5 and fixed in 5.10.275 with commit 003911fb0e32293290280700c4670ef7316a06df Issue introduced in 2.6.27 with commit 04f2cbe35699d22dbf428373682ead85ca1240f5 and fixed in 5.15.226 with commit 69c910bbaa40579febd0f8d4e1bad52a28475f58 Issue introduced in 2.6.27 with commit 04f2cbe35699d22dbf428373682ead85ca1240f5 and fixed in 6.1.193 with commit c9c84d16f97d354dd2203d10106b0e15b6d9fb79 Issue introduced in 2.6.27 with commit 04f2cbe35699d22dbf428373682ead85ca1240f5 and fixed in 6.6.163 with commit c5f76b0d06d8a6a088b6556322b3b8a3de2b33ad Issue introduced in 2.6.27 with commit 04f2cbe35699d22dbf428373682ead85ca1240f5 and fixed in 6.12.118 with commit 54b8a9e371856be9543ef660b5dbe43925b72482 Issue introduced in 2.6.27 with commit 04f2cbe35699d22dbf428373682ead85ca1240f5 and fixed in 6.18.64 with commit 6fb78a3b08dc909f0da92bc683e22337ea04dc38 Issue introduced in 2.6.27 with commit 04f2cbe35699d22dbf428373682ead85ca1240f5 and fixed in 7.3.4 with commit 681592e5d7de934f2f411ad1395139b226d3f4e1 Issue introduced in 2.6.27 with commit 04f2cbe35699d22dbf428373682ead85ca1240f5 and fixed in 7.4-rc1 with commit ae99c503eb362b42cd5d24d80bc6cba669acc4c2 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-99929 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/hugetlb.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/003911fb0e32293290280700c4670ef7316a06df https://git.kernel.org/stable/c/69c910bbaa40579febd0f8d4e1bad52a28475f58 https://git.kernel.org/stable/c/c9c84d16f97d354dd2203d10106b0e15b6d9fb79 https://git.kernel.org/stable/c/c5f76b0d06d8a6a088b6556322b3b8a3de2b33ad https://git.kernel.org/stable/c/54b8a9e371856be9543ef660b5dbe43925b72482 https://git.kernel.org/stable/c/6fb78a3b08dc909f0da92bc683e22337ea04dc38 https://git.kernel.org/stable/c/681592e5d7de934f2f411ad1395139b226d3f4e1 https://git.kernel.org/stable/c/ae99c503eb362b42cd5d24d80bc6cba669acc4c2