CVE-2026-98175: smb: client: cancel reconnect work in clean_demultiplex_info()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
smb: client: cancel reconnect work in clean_demultiplex_info()
clean_demultiplex_info() cancels server->echo delayed work but not server->reconnect, which can cause a use-after-free when the demultiplex thread exits while a reconnect work is still queued:
cifs_demultiplex_thread()
cifs_readv_from_socket()
cifs_reconnect()
__cifs_reconnect()
cifs_queue_server_reconn()
mod_delayed_work(cifsiod_wq, &server->reconnect, 0)
clean_demultiplex_info()
cancel_delayed_work_sync(&server->echo) // echo canceled
// reconnect NOT canceled
kfree_sensitive(server) // server freed ...later, on cifsiod_wq:
smb2_reconnect_server()
server->srv_count // UAF read of freed server
Fix this by canceling server->reconnect delayed work in clean_demultiplex_info() before the server is freed, the same way cifs_put_tcp_session() already does.
The Linux kernel CVE team has assigned CVE-2026-98175 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.10 with commit 53e0e11efe9289535b060a51d4cf37c25e0d0f2b and fixed in 6.6.158 with commit 180380272f116dbd2b0354c5c7872e112e519149 Issue introduced in 4.10 with commit 53e0e11efe9289535b060a51d4cf37c25e0d0f2b and fixed in 6.12.112 with commit e3f6a779433d13aafb5edab59e4f9313051e8a52 Issue introduced in 4.10 with commit 53e0e11efe9289535b060a51d4cf37c25e0d0f2b and fixed in 6.18.54 with commit 7ab9ceedd860216fb97f2d8574cbe58b8906f42a Issue introduced in 4.10 with commit 53e0e11efe9289535b060a51d4cf37c25e0d0f2b and fixed in 7.2.8 with commit 2e5103e11a17c274715dd56cf185eeedccf686b8 Issue introduced in 4.10 with commit 53e0e11efe9289535b060a51d4cf37c25e0d0f2b and fixed in 7.3-rc4 with commit c65eae6f61d1778ff7a82e4aae4080e26f486af1 Issue introduced in 3.10.107 with commit e008a962311a875a828cbae54b43285858aaa6c8 Issue introduced in 3.12.70 with commit 123b228a09b90b50b0a9d6eb8294cf0c42efc029 Issue introduced in 3.16.42 with commit 0ba4c6eaaacbcc4b18f51bb3b1567c65a8fecca9 Issue introduced in 3.18.47 with commit d0d2a4c82942e2f51e4984beea1f7e5a994bd06c Issue introduced in 4.1.38 with commit 15a12fbbf365a483b1c19f9caeb707b3bea77e10 Issue introduced in 4.4.40 with commit f0b715409cb9cf7e21e690f9b163047739761962 Issue introduced in 4.8.16 with commit ff04da387c10b6bf7b510392742c8cd46c130fd6 Issue introduced in 4.9.1 with commit 48f9526f4dcb4b132fe0dc2450835311e3b013a6
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-98175
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/connect.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/180380272f116dbd2b0354c5c7872e112e519149 https://git.kernel.org/stable/c/e3f6a779433d13aafb5edab59e4f9313051e8a52 https://git.kernel.org/stable/c/7ab9ceedd860216fb97f2d8574cbe58b8906f42a https://git.kernel.org/stable/c/2e5103e11a17c274715dd56cf185eeedccf686b8 https://git.kernel.org/stable/c/c65eae6f61d1778ff7a82e4aae4080e26f486af1