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=1792758947; b=seFUburr/gn33MRMfUOGixlOoZedzZ+vSXNz7PBM+SDXqpKiac7eCi+0LbwWI4LgxmO5 lu+0R500oWqdygf/cwGo4fN90nkt578JRzt07a5HylrgB8DDKjigzVPbHpqI8GWrqf4u9 9TVM4M2mV7xVBkDptD0Yk0KTPmbjKi8/C4lxUqpiJxbNij5I51dqtvgBKpxmafqMb6Nqg lp4chgnaKwrLElKwifRdUGxZnmb4VCYvvT6Gv643rnWCvZ3n3XV3p178N6d9oODNLTDG3 /PAHNV9FVoPXR+A5RpPxgT7u5HGGe5wnC6sWK/RbemC0LHgexMVJics/YtEZnGg9RlA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792758947; 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=b9WtiPv1VRMX3czGZv+96OMN2kGjy5+x62EvJzkZ/JA=; b=0FC9TuGe75SVy6ZE3FB1Daq/tCOkJUD36t/Ji+pFcfssPtIHgfPaKR7g/PfzG9jMDOBY hxHtH9QlRXmyxOJbwkrwy2czVqeKwum1bmdvfged61Gl3OMs4liH30FPcy9GoeQ7OIFHC /PrgZDSUI/q9Q7YdDL0Kfof/UbHm7UcbMZFUwyMQs1KIAlo2ALqgyIa2rNDf5CcgOjXyU Hkwqo0DWMVyJq3TCJGnLa2lIv4AhDzfi89l9hhVfaCTWrFhEl3/0W1F60yBsYaSIMV9e/ cjhYNV/DcIk1VMaKrWTMIkFrGsc8bc4OvjVt8TxjEL+Wr95oCcEmC2fRQnqSUOZsVFg== 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=ZLhSSsTQ; 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 67366606A31E for ; Fri, 23 Oct 2026 12:35:47 +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=ZLhSSsTQ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BD311F01825; Fri, 23 Oct 2026 12:35:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792758947; bh=b9WtiPv1VRMX3czGZv+96OMN2kGjy5+x62EvJzkZ/JA=; h=From:To:Cc:Subject:Date:Reply-To; b=ZLhSSsTQDwBjhXkRjHfpNI+vPSlYxXNaepenHZLz92zvLoCQZyPZgD2XxldLVIDab pJiUEwRJ5Ty6jNcOba0rZF/qlUgcBcSpkAHClQ9YPO6vNBX4hILesU2zY/OqH9wQ6F kbzTfA/EjwddYrCkKFq+JUiPbtAIKDXmKAfrBKyU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98983: unshare: don't drop active namespace references that were never taken Date: Fri, 23 Oct 2026 14:19:45 +0200 Message-ID: <2026102314-CVE-2026-98983-5eb2@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=3498; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=cw3X3QuYxr5FKwsGrdb01xvKC8Myxwy80dq8YYNrmfU=; b=owGbwMvMwCRo6H6F97bub03G02pJDFm3Aw5tvXM3INZ0hWf68fmHrv60lDAWs1M7v5tt6VbXM IeJZe9/dMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEPqQxLNiZaXbcn/3pVKXg j/P9jiQbpev21TEsaPxaIONkWZDxbzOPxxSl3Er1vweLAQ== 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: unshare: don't drop active namespace references that were never taken Active references on the namespaces of an nsproxy are taken when the nsproxy is installed into a task in switch_task_namespaces() and copy_namespaces() and dropped again by put_nsproxy() through deactivate_nsproxy(). But ksys_unshare() calls put_nsproxy() on an nsproxy that was never installed when set_cred_ucounts() fails. The new namespaces of that nsproxy go from zero to minus one and the namespaces shared with the caller lose a reference that belongs to the nsproxy the caller keeps using: WARNING: kernel/nscommon.c:171 at __ns_ref_active_put+0x1cd/0x230 nsproxy_ns_active_put deactivate_nsproxy ksys_unshare Afterwards the namespaces the caller lives in aren't listed by listns() anymore. set_cred_ucounts() only fails when alloc_ucounts() can't allocate and it only allocates when the real uid of the caller differs from its effective uid. Commit cefd55bd2159 ("nsproxy: fix free_nsproxy() and simplify create_new_namespaces()") separated the two cases on purpose. nsproxy_free() frees an nsproxy that was prepared but never installed and that's what a failed setns() uses in put_nsset(). Export it and use it for a failed unshare() as well. The Linux kernel CVE team has assigned CVE-2026-98983 to this issue. Affected and fixed versions =========================== Issue introduced in 7.1 with commit a98621a0f187a934c115dcfe79a49520ae892111 and fixed in 7.2.11 with commit 56fe03a0c05dba4c5f6a23c391f96de1614a098c Issue introduced in 7.1 with commit a98621a0f187a934c115dcfe79a49520ae892111 and fixed in 7.3 with commit 0b6f31a3c0b16066f812e94b52a704174a6f23cd Issue introduced in 5.15.209 with commit 27ae6b17c9ba7ff353ab0906297f08aa845782b4 Issue introduced in 6.1.175 with commit 297261b343371c4f0b31055d53d285138ec21565 Issue introduced in 6.6.141 with commit 813a47b0309097da71781ee4ac11922e39b67d55 Issue introduced in 6.12.91 with commit 6e608e3e5ce12ce7fd21e46212eccca37f917d0e Issue introduced in 6.18.33 with commit a261fccdb4ac58ec5ba6aa1d92a6cc418fff301f Issue introduced in 7.0.10 with commit 665dc1ed16357988d439fc5bbc860ee36f540d81 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-98983 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: include/linux/nsproxy.h kernel/fork.c kernel/nsproxy.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/56fe03a0c05dba4c5f6a23c391f96de1614a098c https://git.kernel.org/stable/c/0b6f31a3c0b16066f812e94b52a704174a6f23cd