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 3910B3093D2 for ; Fri, 4 Jul 2025 13:44:23 +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=1751636664; cv=none; b=bpRstu3sr9scr/Y2n5jF9UAMc3yMXuFIFg8gRGPcXKIIAV+i71s4kFmydt3/w1ePk1iWIm6mavMi/Qcm64hkyUNTFeqIKYoEtzBJHnUwapA4PJQmpHI4TDbrr7KxhlnaFob3bBL+sn2ZkfF42tCJwcYk5DVvBSqM4Vt1Lgnhx68= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751636664; c=relaxed/simple; bh=z+yoY0cj/tzeLHgPevRW30TIRmg+3m8W4xkQT0zer8Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SOOKBjoUrGiW+ab5bw4KryieF4LQfYzC1a2tPDtdClPgBxMvt4f+Bub1LcscUMhyH4Z/hLC7cV8tOaLl8/mJYyUq/LGFUwNF8SUgGnPngK4KoCEoG1hMFnwfmuzILiNttkqCFIphrwK8s9vcOT4ln4So2ge7PxnsPH6prd0Neck= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=05nz/m3b; 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="05nz/m3b" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6877EC4CEE3; Fri, 4 Jul 2025 13:44:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751636663; bh=z+yoY0cj/tzeLHgPevRW30TIRmg+3m8W4xkQT0zer8Y=; h=From:To:Cc:Subject:Date:Reply-to:From; b=05nz/m3beHqwdXH+MfcH0Uxv2t+M9TgQNTknRwEhqRjAyLb8cNO86+YKC1uUbhIsH OMcbJEdw6w93k16DlmWVxBdWd4ogUos6ZNmnbMcEn78E0dlha7Pa3QQCKz/zoRaj3W WMABA34EfaivYdDvZp/jq2S7dJC4stEv4WKrFXog= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38231: nfsd: Initialize ssc before laundromat_work to prevent NULL dereference Date: Fri, 4 Jul 2025 15:38:00 +0200 Message-ID: <2025070429-CVE-2025-38231-c61c@gregkh> X-Mailer: git-send-email 2.50.0 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=3612; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=BbUuXoXX/7gqfhR25FeKOyvl+1+yuOaDmzJSVsZQhq4=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnpNyV71szu/2QrvYLT64+w1cr1GwTy1X7/CPeRTtVWM +TezHG0I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYi48kwPyVwtu/6K2ovuluF 5of8XLRHy3eSKsOCLedn23nUbeTR14j5vDJkKY/u/E0rAA== 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: Initialize ssc before laundromat_work to prevent NULL dereference In nfs4_state_start_net(), laundromat_work may access nfsd_ssc through nfs4_laundromat -> nfsd4_ssc_expire_umount. If nfsd_ssc isn't initialized, this can cause NULL pointer dereference. Normally the delayed start of laundromat_work allows sufficient time for nfsd_ssc initialization to complete. However, when the kernel waits too long for userspace responses (e.g. in nfs4_state_start_net -> nfsd4_end_grace -> nfsd4_record_grace_done -> nfsd4_cld_grace_done -> cld_pipe_upcall -> __cld_pipe_upcall -> wait_for_completion path), the delayed work may start before nfsd_ssc initialization finishes. Fix this by moving nfsd_ssc initialization before starting laundromat_work. The Linux kernel CVE team has assigned CVE-2025-38231 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10.220 with commit a4bc287943f5695209ff36bdc89f17b48d68fae7 and fixed in 5.10.239 with commit deaeb74ae9318252829c59a84a7d2316fc335660 Issue introduced in 5.14 with commit f4e44b393389c77958f7c58bf4415032b4cda15b and fixed in 5.15.186 with commit 0fccf5f01ed28725cc313a66ca1247eef911d55e Issue introduced in 5.14 with commit f4e44b393389c77958f7c58bf4415032b4cda15b and fixed in 6.1.142 with commit a97668ec6d73dab237cd1c15efe012a10090a4ed Issue introduced in 5.14 with commit f4e44b393389c77958f7c58bf4415032b4cda15b and fixed in 6.6.95 with commit 5060e1a5fef184bd11d298e3f0ee920d96a23236 Issue introduced in 5.14 with commit f4e44b393389c77958f7c58bf4415032b4cda15b and fixed in 6.12.35 with commit d622c2ee6c08147ab8c9b9e37d93b6e95d3258e0 Issue introduced in 5.14 with commit f4e44b393389c77958f7c58bf4415032b4cda15b and fixed in 6.15.4 with commit 83ac1ba8ca102ab5c0ed4351f8ac6e74ac4d5d64 Issue introduced in 5.14 with commit f4e44b393389c77958f7c58bf4415032b4cda15b and fixed in 6.16-rc1 with commit b31da62889e6d610114d81dc7a6edbcaa503fcf8 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-38231 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/nfssvc.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/deaeb74ae9318252829c59a84a7d2316fc335660 https://git.kernel.org/stable/c/0fccf5f01ed28725cc313a66ca1247eef911d55e https://git.kernel.org/stable/c/a97668ec6d73dab237cd1c15efe012a10090a4ed https://git.kernel.org/stable/c/5060e1a5fef184bd11d298e3f0ee920d96a23236 https://git.kernel.org/stable/c/d622c2ee6c08147ab8c9b9e37d93b6e95d3258e0 https://git.kernel.org/stable/c/83ac1ba8ca102ab5c0ed4351f8ac6e74ac4d5d64 https://git.kernel.org/stable/c/b31da62889e6d610114d81dc7a6edbcaa503fcf8