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=1795100658; b=eTUesryZgN+JrdoMNv6KcVDqICTY1FZIDWJSLjlQKL+NGfKeX1PKa2wkwceNXEbk6UOl u9z856rciRO41ZNflJJUfswvNvc7+XFRkyo7dSFTGLUD+EfbMjHbg7Ht3Z2DHg2nnmbay Oy+kyYpeq4MeK1fVne/DOoG5OyhL122oujkgdUHt57SR979XZUf9qp+wT0fNTffvWDQsL QsgSwvcIb/4UCoTMcTRkgGS0VO2BHE4EymISVGwBTNHvuOLCrm2FpDL9J31kRbO9lDXaZ GD9UQZbmOkrPspjrw5VtnkTNFYPUHJbW/WpV6ooabUBCJuLK+2fKVs9zajLFf2UiQ7Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795100658; 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=Oy2yDPehCdVU8OW9ExlaSm74Mz3D39OapRuTtmdf/Qg=; b=KPertlMZpD0/KVBRNSIjZpP9XxdyG01WGi93UdxpCBntSiaAX61uWXtZWIe8k2J4AxJW 2CcUFfSW1hLkfc8DwiRYUVwsOa58f6MAoqyabekQ8jaI1TnMyQrmN+7WoEcvEOgWPkMjM c4+icoeXiUjYkcKj2y3Ojsp88ZuiEO8pqqkyfrm3H5dA22kMcai/89d11UdtdnRU2jEQO 6aBqAvZlPQV0tmEqRcK+Oa3Vh6M0Mq7qEWyaHH08G2AH/Yz1zEzu3afNNUC418kAGQQhj Ohwb+XO9ZNatYYvqtQiJj52tvrBv29YBbPHEiHn2zypYDLmRde6b4B6Jtyq0cmQ7j6g== 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=W7skvnzF; 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 C91F4606A324 for ; Thu, 19 Nov 2026 15:04:18 +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=W7skvnzF Received: by smtp.kernel.org (Postfix) with ESMTPSA id D51921F000C4; Thu, 19 Nov 2026 15:04:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795100658; bh=Oy2yDPehCdVU8OW9ExlaSm74Mz3D39OapRuTtmdf/Qg=; h=From:To:Cc:Subject:Date:Reply-To; b=W7skvnzFvRlvGHz0/mZ+1kiwiF6Fn1MmBd0b57XFkYJ0pi5dWprqBlu5kmJlQ5k/8 5iNJ2A5GWcK0bUz5mf/U63BHNcoWSW72iarvcj01g0qzH2RpPhmhlfJCJlpUWiT63t MBWx5bAYevnMKYcedTNJpgu4TUcwi3KzwjMrDRjE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99528: SUNRPC: fix netns use-after-free in write_gssp() Date: Thu, 19 Nov 2026 15:27:06 +0100 Message-ID: <2026111921-CVE-2026-99528-0496@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=5231; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=kVbzrk7eh2urWEE0g+0hpqxLRLmHsn/gUS7zhIl0Ars=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/2aaKrTARTddjSi61D/lU8T7t5u/fF3Lq/NMlvqulX piqpHi+I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACaiUcCwoIfr4q609g/zdffL qvw0fXCA4+CSXwzzA/2m3eja3D6DUfJYl0XH1W33dqd+BQA= 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: SUNRPC: fix netns use-after-free in write_gssp() While fuzzing with a customized syzkaller, I hit a refcount warning in xprt_alloc(), reached from a write to /proc/net/rpc/use-gss-proxy: refcount_t: addition on 0; use-after-free. WARNING: lib/refcount.c:25 at refcount_warn_saturate+0xf8/0x120 CPU: 0 PID: 10404 Comm: syz.0.17 Not tainted 7.3.0-rc1-00096-gcfebfd3db73d Call Trace: xprt_alloc+0x83f/0x9d0 xs_setup_xprt+0xaf/0x3c0 xs_setup_local+0x47/0x7f0 xprt_create_transport+0x16c/0x730 rpc_create+0x38e/0x7f0 gssp_rpc_create+0xe2/0x180 set_gssp_clnt+0xba/0x1b0 write_gssp+0x200/0x310 proc_reg_write+0x240/0x330 vfs_write+0x2aa/0x1050 ksys_write+0x12a/0x250 do_syscall_64+0x117/0x750 entry_SYSCALL_64_after_hwframe+0x77/0x7f create_use_gss_proxy_proc_entry() stores the struct net pointer as the proc entry's private data without taking a reference on it, and an open file descriptor does not pin the namespace either, as procfs only pins the proc_dir_entry. write_gssp() reads that pointer back with pde_data() and hands it to set_gssp_clnt(), which reaches xprt_init(): xprt->xprt_net = get_net_track(net, &xprt->ns_tracker, GFP_KERNEL); get_net_track() -> get_net() -> refcount_inc() is unconditional, so rpc_create() assumes its caller holds a reference on args.net. write_gssp() does not. Dropping the last ns.count reference does not make the file go away. __put_net() only queues cleanup_net() on a workqueue, and the remove_proc_entry() that fences off further writes runs from the rpcsec_gss pernet .exit method, that is, from inside cleanup_net(). A write landing between those two points increments a refcount that is already zero. cleanup_net() does not re-read ns.count, so the namespace is freed anyway and the rpc_xprt -- along with the AF_LOCAL socket opened for it -- is left pointing at freed memory. The resurrected count is visible to the rest of that teardown too: with CONFIG_IPV6_MROUTE the same cleanup_net() worker then trips !mr_can_free_table() in ip6mr_free_table(), which tests check_net() on the namespace it is freeing. It reduces to opening /proc/net/rpc/use-gss-proxy inside a new network namespace, calling setns() back to the original one to drop the last reference, and then writing "1" to the still-open descriptor. Take the reference in write_gssp() itself and refuse the write when the namespace is already gone. This is what procfs does for every other /proc/net file: get_proc_net() is maybe_get_net(PDE_NET(PDE(inode))) and seq_open_net() returns -ENXIO when it fails. PDE_NET() cannot be reused here because the parent directory /proc/net/rpc carries no namespace pointer. Adding a .pre_exit to rpcsec_gss_net_ops so the entry is removed earlier would only narrow the window, since pre_exit also runs from cleanup_net(). Live namespaces are unaffected: a write still returns the error from set_gssp_clnt(), a write of "2" still returns -EINVAL, and reads are untouched. The Linux kernel CVE team has assigned CVE-2026-99528 to this issue. Affected and fixed versions =========================== Issue introduced in 3.10 with commit 030d794bf49855f5e2a9e8dfbfad34211d1eb08b and fixed in 6.12.117 with commit 0a908446c5edc42905f9136e91bbf4e45d0747b6 Issue introduced in 3.10 with commit 030d794bf49855f5e2a9e8dfbfad34211d1eb08b and fixed in 6.18.61 with commit 3c3b401650227e147c609c33fa458d5d963f2918 Issue introduced in 3.10 with commit 030d794bf49855f5e2a9e8dfbfad34211d1eb08b and fixed in 7.3.2 with commit 75120454474be7bc62b77af12bd591a339be27e1 Issue introduced in 3.10 with commit 030d794bf49855f5e2a9e8dfbfad34211d1eb08b and fixed in 7.4-rc1 with commit e7a8721b7edb54a157623f9e31d71345333b5fb9 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-99528 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: net/sunrpc/auth_gss/svcauth_gss.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/0a908446c5edc42905f9136e91bbf4e45d0747b6 https://git.kernel.org/stable/c/3c3b401650227e147c609c33fa458d5d963f2918 https://git.kernel.org/stable/c/75120454474be7bc62b77af12bd591a339be27e1 https://git.kernel.org/stable/c/e7a8721b7edb54a157623f9e31d71345333b5fb9