Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 A7B1D435EE9 for ; Fri, 25 Sep 2026 10:40:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790332821; cv=none; b=jn2DmCF2m3OrXNrmSURR2vVJU34rJFEWcJCAPjBUCe5paAMDjmEGLp8K4bSgQcnX5pi67W/xf4uKMbokAN048mIQ6riJMMLSSCxUOgSDHRq/1a2eRjCc4epYXT9284JB35rGX/HNmSvR7bwy4z+N1Mn10BJTmPIDYyajBZOHoc8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790332821; c=relaxed/simple; bh=cXebxNxlb8GciOvSvjK9By62MERXBqanzofCWgogS2A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ipyX5SdrK8935lsIuirmBfqvQmGYT+PyfL8JWUNGDihBzYD6r5aI1S1Qdp1fHZmg951Sze+TY15rmVepFpAiKTxI4jsCK8g/Ptc92ymChh4j/rW6zBMI0xBJ3iQnAKgMZpx2emynHTVuTwB2J1Jkkm5Gc+d94Fs9E+YXahEUHig= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uIoI458s; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="uIoI458s" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C07991F000FF; Fri, 25 Sep 2026 10:40:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790332820; bh=E7lhaTEUfcHPOBEN2mUfWiQg+9lMI6XbJGxUdHSGNwk=; h=From:To:Cc:Subject:Date:Reply-To; b=uIoI458sqpFXgjELU6l6R5T5rRqghZc3lkRNPNlLsftMAsfjleVUFkLbUnKYxN+PJ gvnBy59I7wC/vJ94g5bteUEt6cEf7UI6cL0314+2dzoBVa69QttjxS4IKvgBAmpKZ8 6tdnLsG+R4MPcidFI+ccs1WYwuxoxE8ovj/cN+kg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98118: netfs: Fix readahead synchronisation issues by loading all folios upfront Date: Fri, 25 Sep 2026 12:39:25 +0200 Message-ID: <2026092513-CVE-2026-98118-ee42@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3509; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lTo/Tw2l+0WRkIu8enG7ZP9AvWuC4Y++Pgo/CLBdHCc=; b=owGbwMvMwCRo6H6F97bub03G02pJDFnb/AOTNwVILnQ195XR+Bhpxm+SeuGkkLqTROYkH8ZCC dFEkcCOWBYGQSYGWTFFli/beI7urzik6GVoexpmDisTyBAGLk4BmMhmG4b56dcPll16fPFJ/Lst FZGrxCok7gqvY1gwV0h4uxv/N0WDS9kvb7d7nNoR2/wHAA== 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: netfs: Fix readahead synchronisation issues by loading all folios upfront There are some synchronisation issues that derive from the app thread adding more folios to the rolling buffer whilst the collector thread is looking at them or trying to clear them, such as determining the setting of front_folio_order when the next folio hasn't been added yet, The reason for the rolling buffer approach is that loading the buffer upfront and then dropping all the refs just acquired is quite a slow operation, and loading progressively allows some of the cost to be deferred until after at least some of the I/O is started. Instead, a better way is to load all the folios into the rolling buffer upfront - and then drop the refs later, once the I/O is in progress. (Even better would be for the refs not to be there at all.) Fix this by changing the rolling buffer loader to load all the folios selected by the VM for readahead upfront into the folio queue. The folio queue is allocated a batch worth at a time as we don't know how many folios are involved (the readahead_control struct, alas, has a page count, not a folio count). The folio refs acquired from readahead are then dropped in bulk once the first subrequest is dispatched as it's quite a slow operation. The collector waits for NETFS_RREQ_NEED_PUT_RA_REFS to be cleared so that it doesn't unlock folios before the xarray has been scanned for them. This simplifies the buffer handling later and isn't noticeably slower as the xarray doesn't need to be modified and the folios are all already pre-locked. The Linux kernel CVE team has assigned CVE-2026-98118 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit ee4cdf7ba857a894ad1650d6ab77669cbbfa329e and fixed in 7.2.7 with commit 8c9b33945712074a85d3bdacbca036ba6b3d92c6 Issue introduced in 6.12 with commit ee4cdf7ba857a894ad1650d6ab77669cbbfa329e and fixed in 7.3-rc3 with commit fed0b33e6c584986ba70018ec9f9787a98216e64 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-2026-98118 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 fs/netfs/internal.h fs/netfs/misc.c fs/netfs/read_collect.c fs/netfs/read_retry.c fs/netfs/rolling_buffer.c include/linux/netfs.h include/linux/rolling_buffer.h include/trace/events/netfs.h 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/8c9b33945712074a85d3bdacbca036ba6b3d92c6 https://git.kernel.org/stable/c/fed0b33e6c584986ba70018ec9f9787a98216e64