Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D473D2FC89A for ; Tue, 19 Aug 2025 17:19:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755623945; cv=none; b=YZmJ4aZZtpZzX8s8xtlC2Rww/jp+jEohU+ArFwrYeCoLIzIYzNzWyc0S0PagOM7Fe4ACfXeKG4FqS4MW18dbBv85EegQXYV6HY4LYhns6FIb94OlKxnsKewiixJiaB2p56gRzVlb0aW2qC2zNqK9JEmaUiUKfJrgbNuDp750YXc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755623945; c=relaxed/simple; bh=EndrKIFw6YxNT6gL4U8QY7hl/MoZKQcEvxoKchYHErY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QGS+b+Jbx7/7atL7qa1Lt1VKQALg7vgYH6DQGPdjZAfv72zYtgFKypb52MiPZdvKY1TX9gA7edI/XNF2/+ictzeHprOK71zfsEcUofZqFCBulnYo0JCTBRjJk6nVWpKP8dHciXoYKyfHprQtK2HW7SYW1WwaR3eWbcD0gYZ7uZc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eiJfEk17; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="eiJfEk17" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D964C4CEF1; Tue, 19 Aug 2025 17:19:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755623945; bh=EndrKIFw6YxNT6gL4U8QY7hl/MoZKQcEvxoKchYHErY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=eiJfEk17yWQMHS6r2rAmGrwfQEFyExGy8AiQp7wWvwP0GLx6poj13qrjAgiSTlZ3p 9LKGSltWBSnlcwjEcPywcUVc8yFyPDqNCViufBcrqwBuOjV2eIR+Oz1Ojk97rdACLk jgi6fUKUOQMknX/tI8q5ZgTQ1vsWn/V6r5muEYoo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38567: nfsd: avoid ref leak in nfsd_open_local_fh() Date: Tue, 19 Aug 2025 19:18:14 +0200 Message-ID: <2025081909-CVE-2025-38567-3597@gregkh> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2512; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=AfxouOx2ddTJ1XtbDf7TAL6ivTNDHZpkiaKBY5NoYUQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlLNl7MLJ/9ULX58ZyNenybJ3u7nmq/6WDB6Xov+HTT4 q/cjhcvd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEtIoZFvTd5U7/elTp1unJ TZPED61rd3hw/QLDXOEXbi7Ne94pM/0IVZ4QeVcoq0+8FAA= 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: nfsd: avoid ref leak in nfsd_open_local_fh() If two calls to nfsd_open_local_fh() race and both successfully call nfsd_file_acquire_local(), they will both get an extra reference to the net to accompany the file reference stored in *pnf. One of them will fail to store (using xchg()) the file reference in *pnf and will drop that reference but WON'T drop the accompanying reference to the net. This leak means that when the nfs server is shut down it will hang in nfsd_shutdown_net() waiting for &nn->nfsd_net_free_done. This patch adds the missing nfsd_net_put(). The Linux kernel CVE team has assigned CVE-2025-38567 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15.3 with commit 986a21ace186433e0397a59491646edad8c8d636 and fixed in 6.15.10 with commit fcb0a417fddb605530c4837e0996620f8ed38023 Issue introduced in 6.16 with commit e6f7e1487ab528a6c653bd0d42812ff2942846cd and fixed in 6.16.1 with commit c4bf8f26c51e51bbb840935659a7b3b65a802c07 Issue introduced in 6.16 with commit e6f7e1487ab528a6c653bd0d42812ff2942846cd and fixed in 6.17-rc2 with commit e5a73150776f18547ee685c9f6bfafe549714899 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-2025-38567 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/nfsd/localio.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/fcb0a417fddb605530c4837e0996620f8ed38023 https://git.kernel.org/stable/c/c4bf8f26c51e51bbb840935659a7b3b65a802c07 https://git.kernel.org/stable/c/e5a73150776f18547ee685c9f6bfafe549714899