{"id":"CVE-2026-99295","state":"PUBLISHED","title":"smb: client: stop processing a read response after a receive error","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: stop processing a read response after a receive error\n\ncifs_read_iter_from_socket() may call cifs_reconnect() before returning an\nerror.  The reconnect path aborts pending mids and invokes their callbacks.\nThe callback can then release the cifs_io_subrequest containing rdata.\n\ncifs_readv_receive() nevertheless continues after a negative return and may\ndereference rdata in cifs_readv_discard().  KASAN reports the resulting\nUAF:\n\n  BUG: KASAN: slab-use-after-free in cifs_readv_receive\n  Read of size 4 by task cifsd\n  cifs_readv_receive (fs/smb/client/transport.c:1284)\n  cifs_demultiplex_thread (fs/smb/client/connect.c:1355)\n  kthread (kernel/kthread.c:436)\n  ret_from_fork (arch/x86/kernel/process.c:158)\n\n  Freed by task 148:\n  netfs_put_subrequest (fs/netfs/objects.c:267)\n  netfs_read_collection (fs/netfs/read_collect.c:460)\n  netfs_wait_for_in_progress (fs/netfs/misc.c:462)\n\nReturn the socket error immediately, as this path did before the iterator\nconversion.  This also avoids adding a negative length to total_read.","publishedAt":"2026-11-16T09:59:22.911Z","updatedAt":"2026-11-19T13:52:18.020Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d08089f649a0cfb2099c8551ac47eef0cc23fdf2","status":"affected","lessThan":"af78baeacd731a98531eaa3103bfe03f147cffb7","versionType":"git"},{"version":"d08089f649a0cfb2099c8551ac47eef0cc23fdf2","status":"affected","lessThan":"ecc327edd96a65ac177379664cc0972d8a23dfa4","versionType":"git"},{"version":"d08089f649a0cfb2099c8551ac47eef0cc23fdf2","status":"affected","lessThan":"558cb79cb242ce7ca8b32c4b39412d125879e8f2","versionType":"git"},{"version":"d08089f649a0cfb2099c8551ac47eef0cc23fdf2","status":"affected","lessThan":"51efca72345acdbedc4af76782d464bd15ba50ff","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/transport.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.3","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.61","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.2","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/transport.c"]}],"references":["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"],"weaknesses":[],"ingestedAt":"2026-11-19T13:58:06.563Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/99xxx/CVE-2026-99295.json","commit":"5284c0aaed448bdf5be406b31f52fecb38b554c5","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99295","state":"PUBLISHED","datePublished":"2026-11-16T09:59:22.911Z","dateUpdated":"2026-11-19T13:52:18.020Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.406Z"},"containers":{"cna":{"title":"smb: client: stop processing a read response after a receive error","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: stop processing a read response after a receive error\n\ncifs_read_iter_from_socket() may call cifs_reconnect() before returning an\nerror.  The reconnect path aborts pending mids and invokes their callbacks.\nThe callback can then release the cifs_io_subrequest containing rdata.\n\ncifs_readv_receive() nevertheless continues after a negative return and may\ndereference rdata in cifs_readv_discard().  KASAN reports the resulting\nUAF:\n\n  BUG: KASAN: slab-use-after-free in cifs_readv_receive\n  Read of size 4 by task cifsd\n  cifs_readv_receive (fs/smb/client/transport.c:1284)\n  cifs_demultiplex_thread (fs/smb/client/connect.c:1355)\n  kthread (kernel/kthread.c:436)\n  ret_from_fork (arch/x86/kernel/process.c:158)\n\n  Freed by task 148:\n  netfs_put_subrequest (fs/netfs/objects.c:267)\n  netfs_read_collection (fs/netfs/read_collect.c:460)\n  netfs_wait_for_in_progress (fs/netfs/misc.c:462)\n\nReturn the socket error immediately, as this path did before the iterator\nconversion.  This also avoids adding a negative length to total_read."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d08089f649a0cfb2099c8551ac47eef0cc23fdf2","status":"affected","lessThan":"af78baeacd731a98531eaa3103bfe03f147cffb7","versionType":"git"},{"version":"d08089f649a0cfb2099c8551ac47eef0cc23fdf2","status":"affected","lessThan":"ecc327edd96a65ac177379664cc0972d8a23dfa4","versionType":"git"},{"version":"d08089f649a0cfb2099c8551ac47eef0cc23fdf2","status":"affected","lessThan":"558cb79cb242ce7ca8b32c4b39412d125879e8f2","versionType":"git"},{"version":"d08089f649a0cfb2099c8551ac47eef0cc23fdf2","status":"affected","lessThan":"51efca72345acdbedc4af76782d464bd15ba50ff","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/transport.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.3","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.61","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.2","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/transport.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/af78baeacd731a98531eaa3103bfe03f147cffb7"},{"url":"https://git.kernel.org/stable/c/ecc327edd96a65ac177379664cc0972d8a23dfa4"},{"url":"https://git.kernel.org/stable/c/558cb79cb242ce7ca8b32c4b39412d125879e8f2"},{"url":"https://git.kernel.org/stable/c/51efca72345acdbedc4af76782d464bd15ba50ff"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - cifs_demultiplex_thread reads an SMB2 READ response from the server TCP socket and calls cifs_readv_receive. The server fills smb2_read_rsp.DataOffset and DataLength, then closes the connection so sock_recvmsg inside cifs_read_iter_from_socket fails. Those response bytes are the attacker-controlled input, and SMB over TCP is a routable transport.\nAC:L - The server chooses DataOffset between 103 and 255 so that, after cifs_read_iter_from_socket returns -ECONNABORTED, the unsigned server->total_read += length stays below pdu_size and cifs_readv_receive calls cifs_readv_discard. cifs_reconnect invokes smb2_readv_callback and blocks in TCP connect before that return, so netfs_wait_for_in_progress frees rdata first. The peer produces every step.\nPR:N - The attacker is the SMB server. cifs_demultiplex_thread calls cifs_readv_receive on the READ response with no check of a client-side credential; session setup authenticated the client to the server, not the server to the client. No capability on the victim is required.\nUI:N - cifs_issue_read already has an SMB2 READ in flight for normal file I/O or readahead on the mounted share. The server answers that request and drops the socket; no further human action is required to reach cifs_readv_receive.\nS:U - The use-after-free is in the same client kernel that owns the mount and cifsd. It does not cross a guest/host, IOMMU, or other security boundary.\nC:N - The dangling use is a 4-byte read of cifs_io_subrequest.result in cifs_readv_discard, passed only as dequeue_mid's malformed flag. That value is not copied to userspace or written back to the socket, and mid_execute_callback has already cleared mid->callback so the freed object is not pointer-chased.\nI:N - cifs_readv_discard does not store through the freed rdata pointer. It may set mid->mid_state on the mid still referenced by cifsd, and __release_mid then frees that mid. smb2_readv_callback cannot run a second time because mid->callback is already NULL.\nA:H - KASAN reports a slab use-after-free in cifsd at the rdata->result read. cifs_discard_remaining_data then blocks in sock_recvmsg on the just-reconnected socket, retrying the 7-second rcvtimeo until server_unresponsive (three echo intervals) calls cifs_reconnect again, so the only demultiplex thread stops servicing the session and the server can repeat it."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-19T13:52:18.020Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.12.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.18.61"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"7.3.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}