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 86606493D39 for ; Fri, 25 Sep 2026 10:30:52 +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=1790332253; cv=none; b=sog8wfPCd7ktgmuHMgz+LZQiQdRdXGZYIjQoEcwekJoTf8RrVNiMmJTBMs9NykI1ObCZpyjK36LTDikTub4Qs1wkghEoO6G5UQ/OdPFelDl0ik7IEtwT2ooheCMidLgh3Ood5ggTR1dytWxhEEHYSxdtXf+4+xN5sl7TBw96/Fc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790332253; c=relaxed/simple; bh=GWMe5vpfoLkLVzGouQFUETZp5UFhIiqWznJNxQbqAX8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TG38DD7DnIhnzLOIZxo4LniN6/f9vD3igLm4JbP9zLTfVeSDNXBlqcA6GI+EfD49PWJZK5pPB7eDtAcZMU/3FfjtOHPd0lhVwZrawW6nGZUwiMFN6TRMmj69Y6x8WDl7xwxIMBsnC4u9igfom0xfS2+CxMsJIwMcYzcUb1ipjLA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=y/N4ZkgK; 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="y/N4ZkgK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D08BC1F000FF; Fri, 25 Sep 2026 10:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790332252; bh=1/GEb1f+j0PvGlGGX4WTvyETBym5bVUT8MJAyoQzYSo=; h=From:To:Cc:Subject:Date:Reply-To; b=y/N4ZkgKIAchcVHxavmN7+AjtRC0TghB0o2AlT1JRhUN4xqO7sAy8joXjTTmkDiSg fedStN7/H0XBwCqCozO+LJwHG0QczOHsXzuiBsbS/fIMXdWhD32Tz2WH4UIv9dvoaR T+Heq4EYWLOsQYIcHis/+WLUonm+VaTI+H6u2lGs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-97971: nstree: check listing permission before taking a namespace reference Date: Fri, 25 Sep 2026 12:24:34 +0200 Message-ID: <2026092517-CVE-2026-97971-39df@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=3283; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0T/p215DIqaj7c5jIATmCEuiNdk7a7r6SFUyaJKUlMQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDFnbvCNXvdvqu2bb/nNStpsX3NJvY32w64t1c8hlb4vmK 1+4932y6IhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJ5GczLGhSUv6itknKh1tA aE3uN04Bow3PvRnmGbm33nlS3iqcPLP5XOu29o3hjfd0AQ== 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: nstree: check listing permission before taking a namespace reference legitimize_ns() takes a reference on the candidate namespace before may_list_ns() has decided whether the caller may see it. The __free(ns_put) cleanup on the denied path can drop the last reference to a mount namespace while we still hold the rcu read lock, and put_mnt_ns() may sleep there. This is the same problem commit 2ec2aff3c8e2 ("ns: make sure reference are dropped outside of rcu lock") fixed for the put_user() path. Neither ns_requested() nor may_list_ns() needs a reference, both only look at the namespace type and at the caller's own namespaces, so do the checks first and take the reference last. Splat: Voluntary context switch within RCU read-side critical section! WARNING: kernel/rcu/tree_plugin.h:332 at rcu_note_context_switch+0x238/0x2a0, CPU#5: a/3442 CPU: 5 UID: 1000 PID: 3442 Comm: a Not tainted 7.0.0-30-generic #30-Ubuntu PREEMPT(lazy) RIP: 0010:rcu_note_context_switch+0x238/0x2a0 Call Trace: __schedule+0xcf/0x650 schedule+0x27/0x90 schedule_preempt_disabled+0x15/0x30 __mutex_lock.constprop.0+0x550/0xaf0 __mutex_lock_slowpath+0x13/0x20 mutex_lock+0x3b/0x50 exp_funnel_lock+0xb2/0x260 synchronize_rcu_expedited+0xe7/0x220 namespace_unlock+0x26a/0x320 put_mnt_ns+0xd3/0x120 mntns_put+0xe/0x20 do_listns+0x13e/0x560 __do_sys_listns+0x126/0x2d0 __x64_sys_listns+0x20/0x30 x64_sys_call+0x2366/0x2390 do_syscall_64+0x105/0x5a0 entry_SYSCALL_64_after_hwframe+0x76/0x7e The Linux kernel CVE team has assigned CVE-2026-97971 to this issue. Affected and fixed versions =========================== Issue introduced in 6.19 with commit 76b6f5dfb3fda76fce1f9990d6fa58adc711122b and fixed in 7.2.7 with commit 9e673bf5d88aa898e52cef5c87058c3fa845bc71 Issue introduced in 6.19 with commit 76b6f5dfb3fda76fce1f9990d6fa58adc711122b and fixed in 7.3-rc3 with commit 56ea4e86832d8abe8930394473566c194d189f85 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-97971 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: kernel/nstree.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/9e673bf5d88aa898e52cef5c87058c3fa845bc71 https://git.kernel.org/stable/c/56ea4e86832d8abe8930394473566c194d189f85