UBUNTU-CVE-2026-99295: Use After Free
In the Linux kernel, the following vulnerability has been resolved: smb: client: stop processing a read response after a receive error cifsreaditerfromsocket() may call cifsreconnect() before returning an error. The reconnect path aborts pending mids and invokes their callbacks. The callback can then release the cifsiosubrequest containing rdata. cifsreadvreceive() nevertheless continues after a negative return and may dereference rdata in cifsreadvdiscard(). KASAN reports the resulting UAF: BUG: KASAN: slab-use-after-free in cifsreadvreceive Read of size 4 by task cifsd cifsreadvreceive (fs/smb/client/transport.c:1284) cifsdemultiplexthread (fs/smb/client/connect.c:1355) kthread (kernel/kthread.c:436) retfromfork (arch/x86/kernel/process.c:158) Freed by task 148: netfsputsubrequest (fs/netfs/objects.c:267) netfsreadcollection (fs/netfs/readcollect.c:460) netfswaitforinprogress (fs/netfs/misc.c:462) Return the socket error immediately, as this path did before the iterator conversion. This also avoids adding a negative length to totalread.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In cifs_readv_receive(), return the socket error immediately after cifs_read_iter_from_socket() fails, before continuing to cifs_readv_discard() and accessing rdata.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the listed Ubuntu Linux kernel packages are affected when the SMB client processes read responses. The affected package set includes standard, cloud, Oracle, and FIPS kernel variants identified in the advisory.
What condition is required to trigger the use-after-free?
A socket receive error must occur while the SMB client is handling a read response. The resulting reconnect path can abort pending requests and free the associated read subrequest before response processing continues.
What is the impact of the flawed error path?
Continued processing after the receive error can dereference freed memory in cifs_readv_discard(), producing a kernel use-after-free. The code path can also add a negative length to total_read.
How can administrators identify the issue in diagnostics?
Kernel diagnostics may show a KASAN slab-use-after-free report in cifs_readv_receive(), with cifs_demultiplex_thread() in the stack trace. The report may identify the freed object through netfs_put_subrequest() and related netfs read-collection functions.