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 56CB42C11C6 for ; Tue, 16 Sep 2025 16:14:03 +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=1758039243; cv=none; b=qL+plqUhQudnMJLiCVrI2AH02H+PqQ4B0vAFCJOZ0wWAhf5rNHR62yZKGvt8Kw1wGWJGoNhX6Uj1opq+XzSPDYkqVi1sTzJXFnvB93HiJRmBf8ZM7mH81oUIxCP5TMn0dAcWxGrZDED3JI3fdFp1qNdW6bABcovUosd8uyTiKBA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758039243; c=relaxed/simple; bh=F/lS7cYx8CsExzyM1uaXs/dZLlmQGfge5ZyG1/b62jo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FWC4zJH12GY60gZzsPkaiyEM9hNvtNkR9J+3yE/D1yErYXKMP70GnvXqOxRhAYAVIDST9rbClsxHpCKRh1syPgzeygtGNsDSY2Ik5QvOQc76aletT82DVk1UPeTL6qMAUwPGn9W5eGOJOOirajaDg84BIBY8Za7UbvVOP121vq8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fLpGernP; 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="fLpGernP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF917C4CEEB; Tue, 16 Sep 2025 16:14:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758039243; bh=F/lS7cYx8CsExzyM1uaXs/dZLlmQGfge5ZyG1/b62jo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=fLpGernPMdbtlDEZEj+L/IUK490fVWcdwwUx8UAFs1YBi3/Zhg0R/7VLuzyeJx/Lf 8jYX5yIXgPPseUQN9YvTr/F7P5pR7mBsiG14aHBCYZJCrNGqGZD1g4gY8iQEltCVHK e3+Lp2BChufAhbzr7ASFq2G3O5gwupz1UxA1+Yz8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50345: NFSD: Protect against send buffer overflow in NFSv3 READ Date: Tue, 16 Sep 2025 18:11:41 +0200 Message-ID: <2025091639-CVE-2022-50345-a1ff@gregkh> X-Mailer: git-send-email 2.51.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=2817; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Aalic0b/fJYMXqcQn8BBbB5qiQyZlQbF+XC9nHCzaaM=; b=kA0DAAIRMUfUDdst+ykByyZiAGjJjDuj552B+Kix9ZC0H9de+7g1RflVOa7KFA5QBIKKtbjNk 4hdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmjJjDsACgkQMUfUDdst+yl1CgCgzbdE SBFUwUqV3Ua/NVcmhDQVwqYAnAzYPlalfePJHNWC+kyWI4EwmXGo 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: Protect against send buffer overflow in NFSv3 READ Since before the git era, NFSD has conserved the number of pages held by each nfsd thread by combining the RPC receive and send buffers into a single array of pages. This works because there are no cases where an operation needs a large RPC Call message and a large RPC Reply at the same time. Once an RPC Call has been received, svc_process() updates svc_rqst::rq_res to describe the part of rq_pages that can be used for constructing the Reply. This means that the send buffer (rq_res) shrinks when the received RPC record containing the RPC Call is large. A client can force this shrinkage on TCP by sending a correctly- formed RPC Call header contained in an RPC record that is excessively large. The full maximum payload size cannot be constructed in that case. The Linux kernel CVE team has assigned CVE-2022-50345 to this issue. Affected and fixed versions =========================== Fixed in 5.10.220 with commit c23687911f82a63fa2977ce9c992b395e90f8ba0 Fixed in 5.15.75 with commit 75d9de25a6f833dd0701ca546ac926cabff2b5af Fixed in 5.19.17 with commit bc6c0ed253cd4763dba7541d558e4b704f33176f Fixed in 6.0.3 with commit 309f29361b6bfae96936317376f1114568c5de19 Fixed in 6.1 with commit fa6be9cc6e80ec79892ddf08a8c10cabab9baf38 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-2022-50345 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/nfs3proc.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/c23687911f82a63fa2977ce9c992b395e90f8ba0 https://git.kernel.org/stable/c/75d9de25a6f833dd0701ca546ac926cabff2b5af https://git.kernel.org/stable/c/bc6c0ed253cd4763dba7541d558e4b704f33176f https://git.kernel.org/stable/c/309f29361b6bfae96936317376f1114568c5de19 https://git.kernel.org/stable/c/fa6be9cc6e80ec79892ddf08a8c10cabab9baf38