CVE-2026-98843: netfs: zero gaps in read-gaps folio to avoid writing back stale data
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
netfs: zero gaps in read-gaps folio to avoid writing back stale data
netfs_read_gaps() leaves gaps around a streaming write's dirty region unread on the server side, so a short/EOF response there left stale folio content that later got written back.
Zero it after the read completes, not before: netfs_wait_for_read() returns rreq->transferred once ret >= 0, so build an iterator over the same bvec array the read used, advance past ret, and zero the rest. The dirty region already maps to sink pages in that array rather than the real folio, so this can't touch it, and only the actual shortfall gets zeroed instead of the whole gap upfront.
The Linux kernel CVE team has assigned CVE-2026-98843 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.12 with commit ee4cdf7ba857a894ad1650d6ab77669cbbfa329e and fixed in 6.18.56 with commit 512eaf01ffabf4258e945016b50df5aed940b705 Issue introduced in 6.12 with commit ee4cdf7ba857a894ad1650d6ab77669cbbfa329e and fixed in 7.2.10 with commit 2a62fe628a877c249c8286b157ee99d82840d9dc Issue introduced in 6.12 with commit ee4cdf7ba857a894ad1650d6ab77669cbbfa329e and fixed in 7.3-rc6 with commit 8db55c5cd831a786a1a2a2d391aa80354535a353
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-98843
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/512eaf01ffabf4258e945016b50df5aed940b705 https://git.kernel.org/stable/c/2a62fe628a877c249c8286b157ee99d82840d9dc https://git.kernel.org/stable/c/8db55c5cd831a786a1a2a2d391aa80354535a353