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=1792758616; b=1j6K43kLtHjXxIlYoQPdek84dCE5Y+w9NQV08geCaep9uBm4skB6be6h+qILQ48AXqhr EY/Qj7O3BG3fykBFHbN4aJ/1WBcHPTpMKuwPzLm1i/yB3PcR5tmJPWwv20UOzUgUeDbaL ZO6ucdoEe2QVrO3wKxjXbiAhIfKeKxeM5O3cUBq4zmagYh9kU6gTtNrsobdSfx0iKhj6x 1acXm2s9TurgUdWwlRuwHw0Nm/vv3SzYTRwxpldnA3FNCiyeWH86B8uhU6EB6QeA8zMnL RariRCvVCz4x3N61o+HD/nIjhIXGbDv3Ij2OzVBnowDeAIa0t3OIKb9l/YgkaxLmLlw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792758616; 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=msmpz+GPy6JbD0ZLXyeoEJyegQXwnASeunGveWabgxg=; b=bch4tCQ4tLhBU4h/CpKgpqgRSUT2AwF0JHJ0gUJ3VN8V8FiXNFmAICRi8geJGOKwGXzS O7Ji6qQlNZ68a4so88r1NdA7do3Y0bztfSo2MVnRdDAzsNMCVB0DoxQVEWPurQiKP4BgS gdJaV6vAcVu3JaQgzA7UPgtrVTrOoqUllt4anYSMWsvHdjssn5n9kn0LfqM8Rn2VjI9M5 o2emN0yasj5gCYwgZaORUAS7zLQ5WI3RCsTNKELuyV7qfTDbFjIFBxOMdROGgp4U8TET7 tQMZnFJpz0Td7gt2RN5DaoEvpF93glud317V50NRcR4L0yxXQG9g2kJJVb6d+Z1oGRA== 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=f7MEzzbA; 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 EDBD8606A31B for ; Fri, 23 Oct 2026 12:30:15 +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=f7MEzzbA Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1264F1F01825; Fri, 23 Oct 2026 12:30:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792758615; bh=msmpz+GPy6JbD0ZLXyeoEJyegQXwnASeunGveWabgxg=; h=From:To:Cc:Subject:Date:Reply-To; b=f7MEzzbAkHYJr8z5ZkTYdc4dqmkQxJ9PGwnfGSXiLqp99gg1dC7pURZp7EiiVHJib G7lUQrxslJSG6AuGzL7ZVYyf1BU1bwl3UoX70eClex7cv7AiuWJHSWkoY13690v7PI tUJJWHPsDowjby+JYYXjKm9odKH7iJZVLga1rYcs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98986: namespace: remove the fsnotify marks of a mount namespace in process context Date: Fri, 23 Oct 2026 14:19:48 +0200 Message-ID: <2026102314-CVE-2026-98986-fff8@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=3302; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=K0l58Xl+WoYio0qLvvXu6kWbbUfRrfJi2PSP+Cni1y4=; b=owGbwMvMwCRo6H6F97bub03G02pJDFm3Aw6pcB5/u9fw7FvXVx5d9ZeDs5SULpUtNo2xilBSe feh7tXRjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIhRDD/MIVLXeOGQosdVqu 13GwX2rfJDGLPQzzvXfpp874I57ow9218nDhrl1x7PkaAA== 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: remove the fsnotify marks of a mount namespace in process context mnt_ns_release() drops the last passive reference of a mount namespace and removes its fanotify marks via fsnotify_mntns_delete(). That takes the mutex of every group with a mark on the namespace and the spinlock of the connector. Fine from process context. But mnt_ns_tree_remove() hands the reference the namespace was allocated with to call_rcu() and so the marks are removed from the RCU softirq: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:623 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 0, name: swapper/3 __mutex_lock+0x113/0x24b0 fsnotify_destroy_marks+0x11b/0x3d0 mnt_ns_release_rcu+0x57/0xa0 rcu_core+0x6b6/0x1e40 and lockdep complains about the connector lock being taken from softirq context. A fanotify group with a FAN_MARK_MNTNS mark on the mount namespace of another task is all that's needed. Root in a user namespace can do that for a mount namespace it owns. The task exits and the namespace is freed with the mark still on it. Remove the marks in free_mnt_ns() before the namespace is handed to RCU. That runs in process context once the last active reference is gone. A mark is added through a file descriptor to the namespace which holds an active reference so no mark can show up after that. The Linux kernel CVE team has assigned CVE-2026-98986 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit bf630c40164162ba1d3933c2f5e3397d083e0948 and fixed in 6.18.57 with commit 888363d74c3b5d32e2accf217add70f8b38e0e2b Issue introduced in 6.15 with commit bf630c40164162ba1d3933c2f5e3397d083e0948 and fixed in 7.2.11 with commit 9e820a6becdd955a04adbedfd767253a47eedd9e Issue introduced in 6.15 with commit bf630c40164162ba1d3933c2f5e3397d083e0948 and fixed in 7.3 with commit 1a116222acdcc1bc1a8350727ae6f28907d44594 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-98986 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/888363d74c3b5d32e2accf217add70f8b38e0e2b https://git.kernel.org/stable/c/9e820a6becdd955a04adbedfd767253a47eedd9e https://git.kernel.org/stable/c/1a116222acdcc1bc1a8350727ae6f28907d44594