Skip to contentSkip to conversation

CVE-2026-99295: smb: client: stop processing a read response after a receive error

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 16

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

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

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

smb: client: stop processing a read response after a receive error

cifs_read_iter_from_socket() may call cifs_reconnect() before returning an error. The reconnect path aborts pending mids and invokes their callbacks. The callback can then release the cifs_io_subrequest containing rdata.

cifs_readv_receive() nevertheless continues after a negative return and may dereference rdata in cifs_readv_discard(). KASAN reports the resulting UAF:

  BUG: KASAN: slab-use-after-free in cifs_readv_receive
  Read of size 4 by task cifsd
  cifs_readv_receive (fs/smb/client/transport.c:1284)
  cifs_demultiplex_thread (fs/smb/client/connect.c:1355)
  kthread (kernel/kthread.c:436)
  ret_from_fork (arch/x86/kernel/process.c:158)

  Freed by task 148:
  netfs_put_subrequest (fs/netfs/objects.c:267)
  netfs_read_collection (fs/netfs/read_collect.c:460)
  netfs_wait_for_in_progress (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 total_read.

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

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

	Issue introduced in 6.3 with commit d08089f649a0cfb2099c8551ac47eef0cc23fdf2 and fixed in 6.12.117 with commit af78baeacd731a98531eaa3103bfe03f147cffb7
	Issue introduced in 6.3 with commit d08089f649a0cfb2099c8551ac47eef0cc23fdf2 and fixed in 6.18.61 with commit ecc327edd96a65ac177379664cc0972d8a23dfa4
	Issue introduced in 6.3 with commit d08089f649a0cfb2099c8551ac47eef0cc23fdf2 and fixed in 7.3.2 with commit 558cb79cb242ce7ca8b32c4b39412d125879e8f2
	Issue introduced in 6.3 with commit d08089f649a0cfb2099c8551ac47eef0cc23fdf2 and fixed in 7.4-rc1 with commit 51efca72345acdbedc4af76782d464bd15ba50ff

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-99295

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/smb/client/transport.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/af78baeacd731a98531eaa3103bfe03f147cffb7
	https://git.kernel.org/stable/c/ecc327edd96a65ac177379664cc0972d8a23dfa4
	https://git.kernel.org/stable/c/558cb79cb242ce7ca8b32c4b39412d125879e8f2
	https://git.kernel.org/stable/c/51efca72345acdbedc4af76782d464bd15ba50ff