CVE-2026-64067: netfs: Fix missing barriers when accessing stream->subrequests locklessly

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026071912-CVE-2026-64067-9bf7@gregkh>
From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

netfs: Fix missing barriers when accessing stream->subrequests locklessly

The list of subrequests attached to stream->subrequests is accessed without
locks by netfs_collect_read_results() and netfs_collect_write_results(),
and then they access subreq->flags without taking a barrier after getting
the subreq pointer from the list.  Relatedly, the functions that build the
list don't use any sort of write barrier when constructing the list to make
sure that the NETFS_SREQ_IN_PROGRESS flag is perceived to be set first if
no lock is taken.

Fix this by:

 (1) Add a new list_add_tail_release() function that uses a release barrier
     to set the pointer to the new member of the list.

 (2) Add a new list_first_entry_or_null_acquire() function that uses an
     acquire barrier to read the pointer to the first member in a list (or
     return NULL).

 (3) Use list_add_tail_release() when adding a subreq to ->subrequests.

 (4) Use list_first_entry_or_null_acquire() when initially accessing the
     front of the list (when an item is removed, the pointer to the new
     front iterm is obtained under the same lock).

The Linux kernel CVE team has assigned CVE-2026-64067 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 6.10 with commit 288ace2f57c9d06dd2e42bd80d03747d879a4068 and fixed in 7.0.11 with commit 293a4532c36f38458e38b8879b174ab797718b9d
	Issue introduced in 6.10 with commit 288ace2f57c9d06dd2e42bd80d03747d879a4068 and fixed in 7.1 with commit b5782e2d462c028096f922abca46318cec890670

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-64067
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/misc.c
	fs/netfs/read_collect.c
	fs/netfs/write_collect.c
	fs/netfs/write_issue.c
	include/linux/list.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/293a4532c36f38458e38b8879b174ab797718b9d
	https://git.kernel.org/stable/c/b5782e2d462c028096f922abca46318cec890670
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.