CVE-2026-97562: smb: client: pin DFS superblock in iterator callback
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
smb: client: pin DFS superblock in iterator callback
tcon_super_cb() stores a raw superblock pointer, but __cifs_get_super() takes its active reference only after iterate_supers_type() has dropped s_umount and its passive reference. Concurrent DFS automount expiry can therefore free the superblock before cifs_sb_active() uses it.
A deterministic KASAN test reproduces the race as:
BUG: KASAN: slab-use-after-free in cifs_sb_active+0x77/0x80
The same test passes with this change applied.
Take the active reference in the callback while iterate_supers_type() still holds s_umount shared. cifs_put_tcp_super() remains the matching release.
The Linux kernel CVE team has assigned CVE-2026-97562 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.7 with commit bacd704a95ad0b93af995aae4a523aa046f46563 and fixed in 6.12.111 with commit ea43a15cea36dc5ddd832be5bddeac7dd804cbcf Issue introduced in 5.7 with commit bacd704a95ad0b93af995aae4a523aa046f46563 and fixed in 6.18.53 with commit a6b6561522212af852c9ad8a7dca8d59ef2c7377 Issue introduced in 5.7 with commit bacd704a95ad0b93af995aae4a523aa046f46563 and fixed in 7.2.7 with commit 5b01a8c0209690db75341528ec53fd87e0ac1460 Issue introduced in 5.7 with commit bacd704a95ad0b93af995aae4a523aa046f46563 and fixed in 7.3-rc3 with commit d806d5a85dcbe2a0f181b2f0f9f61ddfbefa1818
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-97562
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/misc.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/ea43a15cea36dc5ddd832be5bddeac7dd804cbcf https://git.kernel.org/stable/c/a6b6561522212af852c9ad8a7dca8d59ef2c7377 https://git.kernel.org/stable/c/5b01a8c0209690db75341528ec53fd87e0ac1460 https://git.kernel.org/stable/c/d806d5a85dcbe2a0f181b2f0f9f61ddfbefa1818