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 F26451DE3A7 for ; Sun, 19 Jan 2025 11:53:46 +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=1737287627; cv=none; b=ZnsgEtv53kUn1e6+IWPFI4B5CHVdJ+BjN2ILtt7eTAWSNYsoQStxdHy/FwB++uLVjsRwrEjBJ0GhmvNsp3fti4ZVku1aoviW4HMrGiWcyou++P4bcJOLEVjkPgmt1JfTwKyrxgrL5fzLeMHSeQvaDwfgyVWGXYnryOHXg16rGDE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737287627; c=relaxed/simple; bh=8h0qeggLuH4vcrfJtNf+gUOL+2H6n7QIjqca5AfdXTs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EIyR8Z1CJRQ7/iSX8QpwzYSfrEW0zVNcZ/JSG8GykKRrgl+QRVuXTz6QV0TT6dJqZuwLIqc2jDmSPh5keq5AzC3ctAbgpWFHt7xaEdH9d6YxJb+INOjHKREfbLiRlApz5v0t5whmURE235cvILWBl0qnPmNyE0zHR7KNvV63C5A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pRj9s5WC; 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="pRj9s5WC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BC12C4CED6; Sun, 19 Jan 2025 11:53:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1737287626; bh=8h0qeggLuH4vcrfJtNf+gUOL+2H6n7QIjqca5AfdXTs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=pRj9s5WC4pxUpK0dHexuxgqub18bXgNmqhXuARsFwl2ihPiCuZZk+uY2+d1W4VZpo /Tt6CH1D75AxZDlwZrUGJGp96mwrB8ySY7lN9O8J9myAbfuusYevJh8zUVLdqpQcpE aW5jkk5Y0DNlCEI8/81W6fhpJ2sg0oxuXtFOO1LE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-57928: netfs: Fix enomem handling in buffered reads Date: Sun, 19 Jan 2025 12:52:59 +0100 Message-ID: <2025011945-CVE-2024-57928-7291@gregkh> X-Mailer: git-send-email 2.48.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=2276; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=8h0qeggLuH4vcrfJtNf+gUOL+2H6n7QIjqca5AfdXTs=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk9z3uv8zzPi3qsf/V077X7+7+bXqw5u8WVK9bePSI+L L2yRHVRRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEyEqYthnsreV1NmaxVKFaX9 ZWFcdSd6+i0VWYb5Idvs5vh7q+/e+Nx/RZKf7CtxgxVXAQ== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: netfs: Fix enomem handling in buffered reads If netfs_read_to_pagecache() gets an error from either ->prepare_read() or from netfs_prepare_read_iterator(), it needs to decrement ->nr_outstanding, cancel the subrequest and break out of the issuing loop. Currently, it only does this for two of the cases, but there are two more that aren't handled. Fix this by moving the handling to a common place and jumping to it from all four places. This is in preference to inserting a wrapper around netfs_prepare_read_iterator() as proposed by Dmitry Antipov[1]. The Linux kernel CVE team has assigned CVE-2024-57928 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit ee4cdf7ba857a894ad1650d6ab77669cbbfa329e and fixed in 6.12.10 with commit 88ecdfea1b333de5c51442b45cd549eeadf01852 Issue introduced in 6.12 with commit ee4cdf7ba857a894ad1650d6ab77669cbbfa329e and fixed in 6.13-rc7 with commit 105549d09a539a876b7c3330ab52d8aceedad358 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-2024-57928 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/netfs/buffered_read.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/88ecdfea1b333de5c51442b45cd549eeadf01852 https://git.kernel.org/stable/c/105549d09a539a876b7c3330ab52d8aceedad358