Kernel Kit / Infix / v26.10.0latest
CVE-2026-98118
7.1highlinux6.18.60 · 6.18.54 · 6.18.8 · 6.12.21in 4 of 4 releases
Reach linux · 8 builds in 4 of 4 releases
full reviewcross-check✓ a member decided
Description · NVD
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.
Published 2026-09-25NVD
CVSS 3.1Local · low privileges · no user interaction
How it is reached
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
What it costs
- Confidentiality
- High
- Integrity
- None
- Availability
- High
- Scope
- Unchanged
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
Fable 5.1 · high confidence · 2026-11-17
The vulnerable netfs readahead code is present and compiled: fs/netfs/buffered_read.c in output/build/linux-6.18.60/ still contains the pre-fix progressive rolling_buffer_load_from_ra() loop in netfs_prepare_read_iterator(), and the NETFS_RREQ_NEED_PUT_RA_REFS flag introduced by the fix is absent from the tree; none of the 139 applied patches touch netfs. CONFIG_NETFS_SUPPORT=y is pulled in solely by CONFIG_9P_FS=y (NFS, CIFS, AFS, Ceph, EROFS and FSCACHE are all disabled), so the only consumer of netfs_readahead() in this image is the 9p filesystem.
9p is not used on a shipped device. The only in-product mount of it is the hostfs entry in the itb rootfs fstab, which /usr/libexec/infix/mnt mounts only when a virtio device with mount_tag=hostfs exists, i.e. when the QEMU dev/test launcher is run with CONFIG_IX_QEMU_HOST. No YANG node, CLI command or web UI action mounts a 9p filesystem. Reaching the code otherwise requires a root shell to run mount -t 9p (virtio or the NET_9P_FD TCP/fd transport) against a 9p server; it is not reachable from a network interface without that.
Evidence 12
Pre-fix code: progressive `while (rreq->submitted < ...) rolling_buffer_load_from_ra(...)` loop still present; fix replaces this with upfront loading
output/build/linux-6.18.60/fs/netfs/buffered_read.c:netfs_prepare_read_iterator
Flag added by the fix commit is absent from the tree, so the fix is not backported
output/build/linux-6.18.60/include/linux/netfs.h (grep NETFS_RREQ_NEED_PUT_RA_REFS)
139 patches, none mention netfs, readahead or rolling buffer
output/build/linux-6.18.60/.applied_patches_list
All five affected files are built under `CONFIG_NETFS_SUPPORT`
output/build/linux-6.18.60/fs/netfs/Makefile
`CONFIG_NETFS_SUPPORT=y`
output/build/linux-6.18.60/.config:7228
`FSCACHE`, `EROFS_FS`, `NFS_FS`, `NFSD`, `CEPH_FS`, `CIFS`, `SMB_SERVER`, `AFS_FS` all not set; `CONFIG_9P_FS=y`
output/build/linux-6.18.60/.config:7231,7317-7326
`9P_FS` selects `NETFS_SUPPORT` — the sole reason netfs is built
output/build/linux-6.18.60/fs/9p/Kconfig:2-5
9p uses `netfs_readahead` as its `.readahead` op, so the affected path is reachable only through 9p mounts
output/build/linux-6.18.60/fs/9p/vfs_addr.c:189
`CONFIG_NET_9P=y`, `CONFIG_NET_9P_VIRTIO=y`, `CONFIG_9P_FS=y` deliberately enabled in the product defconfig
board/aarch64/linux_defconfig:272-273,613
`hostfs /mnt/host 9p ... noauto` — the only 9p mount in the image, not auto-mounted
board/common/image/image-itb-rootfs/rootfs/etc/fstab:14
Mounts `hostfs` only when a virtio device with `mount_tag` = hostfs is present
board/common/image/image-itb-rootfs/rootfs/usr/libexec/infix/mnt:392-397
The virtio 9p device is created only by the QEMU launcher when `CONFIG_IX_QEMU_HOST` is set (development/test harness)
board/common/qemu/itb/run.sh:223-225
Version and patches
Kernel CNA record lists 6.18.60 as affected; fix commits 8c9b33945712 / fed0b33e6c58 are not present in output/build/linux-6.18.60/ (no NETFS_RREQ_NEED_PUT_RA_REFS, old progressive loader in netfs_prepare_read_iterator). None of the 139 Buildroot patches in .applied_patches_list touch fs/netfs/. output/.config:438 confirms the common rootfs overlay and IX_IMAGE_ITB_ROOTFS=y (output/.config:5219) confirms the itb rootfs containing the 9p fstab entry is in this build.
Recommendation
Document as not applicable to shipped devices: the netfs readahead path is only exercised by 9p mounts, which are only established in the QEMU development harness (CONFIG_IX_QEMU_HOST) or by a root user manually mounting a 9p filesystem. Pick up the fix with the next routine kernel bump rather than backporting now. If a kernel size reduction is ever wanted for hardware targets, dropping CONFIG_9P_FS from board/aarch64/linux_defconfig would remove netfs entirely, but note the QEMU workflow depends on it.
Open questions
CONFIG_NET_9P_FD=y is enabled in .config:1634 but not in board/aarch64/linux_defconfig, so it was picked up as a default; it would allow a root shell to mount 9p over a TCP socket to a remote server, which does not change the verdict (still requires root shell) but could be disabled if unwanted.
Members of Kernel Kit decide. Sign in if you are one.