CVE-2026-97562 PUBLISHED

smb: client: pin DFS superblock in iterator callback

Assigner: Linux
Reserved: 24.09.2026 Published: 25.09.2026 Updated: 25.09.2026

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.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS Score: 7.5

AV:N - The racing side is started by the remote SMB server: dropping the session or replying STATUS_NETWORK_NAME_DELETED makes the client run smb2_reconnect() -> cifs_tree_connect() -> cifs_get_dfs_tcon_super() -> __cifs_get_super(). There, tcon_super_cb() saves a raw superblock pointer that is used after s_umount is released. AC:H - The server can force reconnects repeatedly, but the superblock is only freed if a DFS-link automount expires via cifs_expire_automounts() (a 500s periodic timer, idle submount only) inside the small gap between iterate_supers_type() returning and cifs_sb_active(). The attacker does not control that timing. PR:N - The attacker is the SMB/DFS server or a network peer that can reset the client's session. Forcing the client's tree reconnect needs no account or privilege on the client. UI:R - A victim must have mounted a DFS share with an automounted DFS link from the attacker-reachable server (cifs mounts need real CAP_SYS_ADMIN, not a user namespace), and the link must be idle long enough to expire. S:U - The use-after-free corrupts memory in the same kernel that runs the CIFS client, so no separate security authority is crossed. C:H - After the freed super_block and cifs_sb_info are reused, the reconnect path keeps reading them (cifs_sb_active() on freed memory, then CIFS_SB(sb) fields in tree_connect_dfs_target()), so reclaimed slab contents can be read. I:H - cifs_sb_active() increments counters in the freed cifs_sb/sb, and cifs_update_super_prepath() frees and replaces cifs_sb->prepath in the freed cifs_sb_info. Both are writes into freed memory that can be turned into heap corruption. A:H - The fix commit reports a KASAN slab-use-after-free in cifs_sb_active(); without KASAN the corrupted superblock refcounts and the later cifs_put_tcp_super()/deactivate_super() can crash the kernel.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from bacd704a95ad0b93af995aae4a523aa046f46563 to ea43a15cea36dc5ddd832be5bddeac7dd804cbcf (excl.)
  • affected from bacd704a95ad0b93af995aae4a523aa046f46563 to a6b6561522212af852c9ad8a7dca8d59ef2c7377 (excl.)
  • affected from bacd704a95ad0b93af995aae4a523aa046f46563 to 5b01a8c0209690db75341528ec53fd87e0ac1460 (excl.)
  • affected from bacd704a95ad0b93af995aae4a523aa046f46563 to d806d5a85dcbe2a0f181b2f0f9f61ddfbefa1818 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 5.7 is affected
  • unaffected from 0 to 5.7 (excl.)
  • unaffected from 6.12.111 to 6.12.* (incl.)
  • unaffected from 6.18.53 to 6.18.* (incl.)
  • unaffected from 7.2.7 to 7.2.* (incl.)
  • unaffected from 7.3-rc3 to * (incl.)

References