CVE-2026-64061 in Linux
Summary
by MITRE • 07/19/2026
In the Linux kernel, the following vulnerability has been resolved:
netfs: Fix early put of sink folio in netfs_read_gaps()
Fix netfs_read_gaps() to release the sink page it uses after waiting for the request to complete. The way the sink page is used is that an ITER_BVEC-class iterator is created that has the gaps from the target folio at either end, but has the sink page tiled over the middle so that a single read op can fill in both gaps.
The bug was found by KASAN detecting a UAF on the generic/075 xfstest in the cifsd kernel thread that handles reception of data from the TCP socket:
BUG: KASAN: use-after-free in _copy_to_iter+0x48a/0xa20 Write of size 885 at addr ffff888107f92000 by task cifsd/1285 CPU: 2 UID: 0 PID: 1285 Comm: cifsd Not tainted 7.0.0 #6 PREEMPT(lazy) Call Trace: dump_stack_lvl+0x5d/0x80 print_report+0x17f/0x4f1 kasan_report+0x100/0x1e0 kasan_check_range+0x10f/0x1e0 __asan_memcpy+0x3c/0x60 _copy_to_iter+0x48a/0xa20 __skb_datagram_iter+0x2c9/0x430 skb_copy_datagram_iter+0x6e/0x160 tcp_recvmsg_locked+0xce0/0x1130 tcp_recvmsg+0xeb/0x300 inet_recvmsg+0xcf/0x3a0 sock_recvmsg+0xea/0x100 cifs_readv_from_socket+0x3a6/0x4d0 [cifs]
cifs_read_iter_from_socket+0xdd/0x130 [cifs]
cifs_readv_receive+0xaad/0xb10 [cifs]
cifs_demultiplex_thread+0x1148/0x1740 [cifs]
kthread+0x1cf/0x210
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 07/19/2026
The vulnerability addressed in this linux kernel fix represents a use-after-free condition that occurs within the network filesystem subsystem, specifically in the netfs_read_gaps() function. This issue manifests when handling data gaps during network file operations, particularly affecting the cifsd kernel thread responsible for processing TCP socket data reception. The flaw stems from improper memory management where a sink page is allocated and used to fill data gaps, but is released prematurely before all operations complete. The vulnerability was identified through KASAN (Kernel Address Sanitizer) detection during xfstest execution, specifically test case generic/075 which exercises network filesystem read operations under concurrent conditions.
The technical implementation involves the creation of an ITER_BVEC-class iterator that strategically positions gaps from the target folio at both ends while inserting a sink page in the middle to facilitate a single read operation that fills both gaps simultaneously. This approach optimizes data transfer efficiency but introduces a race condition where the sink page is released before all pending operations complete, leading to memory corruption when subsequent access attempts occur on freed memory locations. The kernel thread cifsd/1285 executes within the CIFS/SMB protocol handling context, processing incoming TCP socket data through a complex call chain that includes cifs_readv_from_socket, cifs_read_iter_from_socket, and ultimately cifs_demultiplex_thread functions.
The operational impact of this vulnerability is significant as it can lead to system instability, kernel crashes, and potential privilege escalation scenarios within network filesystem operations. The use-after-free condition specifically affects the tcp_recvmsg_locked function path where data is copied from socket buffers to user space iteratively through _copy_to_iter, which attempts to write to memory that has already been freed by the earlier release of the sink page. This vulnerability affects systems running kernel versions where the netfs subsystem handles CIFS/SMB network file operations and can be exploited by remote attackers who can establish malicious network connections to trigger the race condition during data transfer operations.
Mitigation strategies include applying the kernel patch that ensures proper synchronization and memory management within netfs_read_gaps() function, guaranteeing that sink pages remain allocated until all pending operations complete before release. The fix aligns with security best practices for kernel memory management and prevents unauthorized access patterns that could lead to privilege escalation or denial of service conditions. This vulnerability demonstrates the importance of careful resource management in kernel subsystems handling concurrent network operations and highlights the critical need for proper synchronization mechanisms when managing shared memory objects across asynchronous I/O operations, consistent with CWE-415 and CWE-416 categories related to double free and use-after-free conditions in kernel space memory management.