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=1792758638; b=0i2xJB9XqVrHWrP7HBqvN200ojDKUuK8FIjaWzn9jRGQ8vB41/Ixukt4bqJP+HHXG2Pd wcDkNxsewSgKkNvFoRdnR2LWPEMVEAKyHG6FuSJJ8LZvwv4gfLBBpIw7+QIN3EH/c4YFg kcrtISML0XARJPPr2jMG/jzAsm+NLK23L/Bv2Pn7nfCr5rI9iEP1AJKennn/gILd7K/Hk vY4xyBSshzJEtrsWi+8PfkMAxaMDeKC0pv1KydwDoZbdUXbtrliMIZYYSPrlypLV0qA/i IT49BFKgcDlcCfaHkIAZazcuqIhWlj0lJEu/nJ/dC3Ogs3o7HBoWsDr2NAvpc5r6O7w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792758638; 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=WZZAFcnrV1Kplx4MfNE50SMSGhrp4z2d8PthJHW9kak=; b=3E1NIC/FbYt01cXYW1P38Ee9c7Uwf93T4sFpHwWFaQ62OYMoRTQtd7Pd+4Yi0UuE95eU Xmhmo4lDigTj8SX/n84ERbRFQUJ2ziefdvQqJYZXanWBW8KqjvsICKlxYO91YYdGkaCT3 xNrqI8znKb1zYSZd4lj8Qkeyl9H7So9ntMgBIrFcvJC7gBQV2UE5mnz9CjA7rYnIa8iyx 4bBmB0Wtbh+grQ1tL4Xha+twKIDkldvEhXrhQE4WcV6/6pFbpVScpUu+t/A/Cpq97+2N3 oJsNAqKy0uVRtR6U0t4lPo1KmB4nWGwY+fSwABEO2VfaWg+aS09JrCmhgbYtOhk+qnw== 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=y5TnZ1P2; 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 67EDF606A322 for ; Fri, 23 Oct 2026 12:30:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=y5TnZ1P2 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59D901F01825; Fri, 23 Oct 2026 12:30:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792758638; bh=WZZAFcnrV1Kplx4MfNE50SMSGhrp4z2d8PthJHW9kak=; h=From:To:Cc:Subject:Date:Reply-To; b=y5TnZ1P2rGw1gvhTkhTfwpTqPcT3YACyHZpyuFRgKkC4Jr1p4Ru2uPZoYBDspq+3j YpuedGRwJOgQ4OXzI7TjHJoWSw/jCo3lafBXXe/2Dz0CXRSvJLciHYwrqsEFv/vTPl o8u/KaOUT/4wKf+PNLK/Uama4wOM4JfftIitRkhk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98989: namespace: check a recursive bind mount for mount namespace loops Date: Fri, 23 Oct 2026 14:19:51 +0200 Message-ID: <2026102315-CVE-2026-98989-74e3@gregkh> X-Mailer: git-send-email 2.56.0 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=3654; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=JCvQzzXAJkuYyri5CAh1BJ4N9XeXb4c6rDGKCPMm3pI=; b=owGbwMvMwCRo6H6F97bub03G02pJDFm3Aw4HTjzqondbriUvrfXJ2uROsYdvnfdwhVht2mbY0 eP30V2jI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACaSWsSwYMezFR8mnbO0fOBq vOWtSfrNY6tE5zAsOGYrsn+3+0ZHi1A9dv40rXXMNU4qAA== 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: namespace: check a recursive bind mount for mount namespace loops do_loopback() refuses to bind mount the file of a mount namespace that is as old as the caller's or older because a mount namespace that holds a mount of its own file, or of an ancestor's, would cause a cycle. But it only checks the dentry the bind mount starts from. With MS_REC everything below it is copied and do_loopback() passes CL_COPY_MNT_NS_FILE so mount namespace files below the source are copied. That's fine for a source in the caller's own mount namespace. Every mount namespace file in there passed the same check when it was bind-mounted. It isn't fine for a source in another mount namespace. may_copy_tree() accepts a bind mount of any nsfs or pidfs file no matter what mount namespace it lives in so that /proc//ns/ and pidfds can be bind mounted. If we create a bind-mount stack of mount namespaces file descriptors the kernel will copy them irrespective of their ancestoral relationship to the mount namespace in question: 151 146 0:7 net:[4026531833] /tmp/nrc/y rw - nsfs nsfs rw 152 151 0:7 mnt:[4026532293] /tmp/nrc/y rw - nsfs nsfs rw Mount 152 is a mount of the mount namespace file of mount namespace 4026532293 inside mount namespace 4026532293. That namespace and every mount in it are leaked... All it takes is a process in an older mount namespace that stacks the file and repeating it leaks without limit: after control: Shmem: 380 kB child: mount(/proc/self/fd/6, MS_BIND|MS_REC): ok after cycle: Shmem: 65916 kB do_move_mount() runs check_for_nsfs_mounts() over a detached tree for exactly that reason. Do the same for the copy before it is grafted. The Linux kernel CVE team has assigned CVE-2026-98989 to this issue. Affected and fixed versions =========================== Issue introduced in 3.19 with commit e149ed2b805fefdccf7ccdfc19eca22fdd4514ac and fixed in 6.18.57 with commit a0ba48256f5dff6f75a45f8ce39fe57f21df1022 Issue introduced in 3.19 with commit e149ed2b805fefdccf7ccdfc19eca22fdd4514ac and fixed in 7.2.11 with commit 37a82f400efa4d263542a5fa41755b21057f1e5d Issue introduced in 3.19 with commit e149ed2b805fefdccf7ccdfc19eca22fdd4514ac and fixed in 7.3 with commit c640a01a78e42302879006ed7b7d5a9a943ba815 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-98989 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: fs/namespace.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/a0ba48256f5dff6f75a45f8ce39fe57f21df1022 https://git.kernel.org/stable/c/37a82f400efa4d263542a5fa41755b21057f1e5d https://git.kernel.org/stable/c/c640a01a78e42302879006ed7b7d5a9a943ba815