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 CE98E1D554 for ; Tue, 21 Jan 2025 12:19:08 +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=1737461948; cv=none; b=TSD61YrjRTqvAOpjP4enTrXhSRQg0IBbehDxYs1yc4Py1D5907LlcjkBnpnUfsi0BRo5L/hlH8Ca0lPHfKq1li2zkXXcm1EgawebVCmImFOU8la+mmiOjfs38lUbBTv+3ZnsJvKQ7A2gqzmoHGaCOwRFIgIGLHEvP219N+ZjYIM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737461948; c=relaxed/simple; bh=AkAFFcgvhSRQ0nQttXayvSdpp+OBbENuHmxfz5RczXM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RrBCpAQB237SOS0VHc1Gv8UhG9Wu4TDcOnp5NtVJTGVcrjXJl3mPwcAQmpU1euCo8xeLzMZRXyURftSmy28G3Y4jph9pakUy7MNjTNID0vxsMFTljLL2w3/12TYnSm+FrJZiRLEyey/LtVAIwQQmuKUzC/S514iOEIdJgHZDk/Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OSNcyHJe; 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="OSNcyHJe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBFEEC4CEDF; Tue, 21 Jan 2025 12:19:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1737461948; bh=AkAFFcgvhSRQ0nQttXayvSdpp+OBbENuHmxfz5RczXM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=OSNcyHJeU9IFeWKXR5gZ7c8VsCOJkPRSVvFkUbzVqUeL9JY9JUNUEKNzQamqyMEda qujJlNIh2u4XObUisg48Ro8/ehynoojuJLxcjRncPP5Jq/lnG20L0Zz0OfZmuj9KPF zc0YRm7j1gbiR3CYsWis/BR0tqqsvzb4axW9fJ6U= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-57942: netfs: Fix ceph copy to cache on write-begin Date: Tue, 21 Jan 2025 13:18:31 +0100 Message-ID: <2025012129-CVE-2024-57942-bedc@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=2588; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=AkAFFcgvhSRQ0nQttXayvSdpp+OBbENuHmxfz5RczXM=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn9E6bG9iVuWfPdLrz85F7xzrCKjKtfFBZf+8m1q3rPl ajfHqwbOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BeAiFQwLul9qmSd/tup31f3t HLHhQcjFS0IZDAs6xH3m9lj+zfuWpSEUrD7xiUClnjEA 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 ceph copy to cache on write-begin At the end of netfs_unlock_read_folio() in which folios are marked appropriately for copying to the cache (either with by being marked dirty and having their private data set or by having PG_private_2 set) and then unlocked, the folio_queue struct has the entry pointing to the folio cleared. This presents a problem for netfs_pgpriv2_write_to_the_cache(), which is used to write folios marked with PG_private_2 to the cache as it expects to be able to trawl the folio_queue list thereafter to find the relevant folios, leading to a hang. Fix this by not clearing the folio_queue entry if we're going to do the deprecated copy-to-cache. The clearance will be done instead as the folios are written to the cache. This can be reproduced by starting cachefiles, mounting a ceph filesystem with "-o fsc" and writing to it. The Linux kernel CVE team has assigned CVE-2024-57942 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit 796a4049640b54cb1daf9e7fe543292c5ca02c74 and fixed in 6.12.10 with commit 43b8d3249b0b71bad239d42dbe08ce6c938ba000 Issue introduced in 6.12 with commit 796a4049640b54cb1daf9e7fe543292c5ca02c74 and fixed in 6.13 with commit 38cf8e945721ffe708fa675507465da7f4f2a9f7 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-57942 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/read_collect.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/43b8d3249b0b71bad239d42dbe08ce6c938ba000 https://git.kernel.org/stable/c/38cf8e945721ffe708fa675507465da7f4f2a9f7