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 DF1472AF00 for ; Sat, 4 Oct 2025 15:17:25 +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=1759591046; cv=none; b=pIEIAph4u4FNFXD4nYTQK9603ck6Vh4TNg49N0B/NVUjLKyj24RjC61Zguwd/ukVHjSdI7kIRYrobmjpvZQxyIrRbnTy7RX+hHD+aBLIsNcVab/1Va+Rpi3mzH84AunaCT24BZ5P1NpNgkfOTJzdfOhrwTC7cnil67ZI40gbQZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759591046; c=relaxed/simple; bh=mKrC5HcvaPYPeaWZWsPSFXnSSMHjOLMGyEFL6F4l/uA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Gw9+GgE+JUTs/xcsq+RqIaR+1miPRLRlaFk+t98fAoTDtOr/QFmIlHXxBS5Mm/6fY3O/Fjhe9cf2q49QDM6s59c/GTGhFh6PCKDJV52Kha3SmotYvP0K8wPb2Sp570TlnvhKPgL6BLxNFB+i6YsWuNH6qoBXJdCAhsdg0DkVOmc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bP95r6Gm; 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="bP95r6Gm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59969C4CEF1; Sat, 4 Oct 2025 15:17:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759591045; bh=mKrC5HcvaPYPeaWZWsPSFXnSSMHjOLMGyEFL6F4l/uA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=bP95r6Gm05ta/Z7y3tiVykyFoc9gdLCxGDrXiHq0mu/ONhkJINrGxL+5Fyx9zcFYW dp579qa4vLeDvjp+Wvj43Pw+AOBHOSoNpbpJp1ab7wJiWQ6NBrTyGW38691osvwVZG 1AgqeklIIFe43itBKYQmWVhuXhb/GaTCEx1wJLUg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50487: NFSD: Protect against send buffer overflow in NFSv3 READDIR Date: Sat, 4 Oct 2025 17:16:46 +0200 Message-ID: <2025100441-CVE-2022-50487-f5ea@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=2903; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=iw7bB5zwTYhSZCO9GOAk9oEPdZ6XSlIZeU/rR9soXrc=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkPrSLbGuuq3Ep+W3SH3e0vfGLYy2SY/2+N2szQWfHs/ 8LfTAjriGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIn4fWWYw80wwfoYp2wES+rq ExMnqYp6rVPkY5ifcWrVn0l7PsgfWjqFMeGSR/Ph3LeZAA== 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 READDIR 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 message 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. Thanks to Aleksi Illikainen and Kari Hulkko for uncovering this issue. The Linux kernel CVE team has assigned CVE-2022-50487 to this issue. Affected and fixed versions =========================== Fixed in 5.10.220 with commit 57774b1526163766403167b7bf00b136fb103761 Fixed in 5.15.75 with commit 071a076fd1b763aa6fe478efa047e0a549ba9c22 Fixed in 5.19.17 with commit 9c3224826ec17f14e8bdfc86cb7e82fe52d744a7 Fixed in 6.0.3 with commit 279274e31270c28b86feffe5e166d4088f22317b Fixed in 6.1 with commit 640f87c190e0d1b2a0fcb2ecf6d2cd53b1c41991 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-50487 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/57774b1526163766403167b7bf00b136fb103761 https://git.kernel.org/stable/c/071a076fd1b763aa6fe478efa047e0a549ba9c22 https://git.kernel.org/stable/c/9c3224826ec17f14e8bdfc86cb7e82fe52d744a7 https://git.kernel.org/stable/c/279274e31270c28b86feffe5e166d4088f22317b https://git.kernel.org/stable/c/640f87c190e0d1b2a0fcb2ecf6d2cd53b1c41991