Skip to main content
Vulnerability Database/CVE-2026-98173

CVE-2026-98173: Linux Kernel Use-After-Free Vulnerability

CVE-2026-98173 is a use-after-free flaw in the Linux kernel SMB client that occurs during channel addition when concurrent interface refresh operations can free memory still being accessed. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98173 Overview

CVE-2026-98173 is a use-after-free vulnerability in the Linux kernel's SMB client code, specifically in the cifs_try_adding_channels() function. The flaw affects how the kernel iterates the ses->iface_list structure while concurrent interface refresh operations can free list entries. When cifs_ses_add_channel() drops iface_lock during execution, a parallel SMB3_request_interfaces() call may release the next interface entry (niface), leaving the iterator pointing to freed memory. Subsequent dereferences of niface->iface_head.next and reads of iface->rdma_capable or iface->is_active operate on freed memory. The issue has been resolved upstream in the Linux kernel stable tree.

Critical Impact

Memory corruption through use-after-free in the kernel SMB client can lead to kernel crashes, data corruption, or potential privilege escalation under race conditions involving SMB multichannel interface refresh.

Affected Products

  • Linux kernel SMB client (fs/smb/client)
  • Systems using CIFS/SMB3 multichannel with dynamic interface refresh
  • Linux distributions shipping affected kernel versions prior to the stable patches

Discovery Timeline

  • 2026-10-06 - CVE-2026-98173 published to NVD
  • 2026-10-07 - Last updated in NVD database

Technical Details for CVE-2026-98173

Vulnerability Analysis

The vulnerability resides in cifs_try_adding_channels(), which iterates ses->iface_list using list_for_each_entry_safe_from(). The macro captures the next list entry (niface) while holding iface_lock. The loop body then releases iface_lock for the full duration of the cifs_ses_add_channel() call, creating an unlocked window.

During this window, a concurrent interface refresh initiated through SMB3_request_interfaces() and parse_server_interfaces() can mark all interfaces inactive. The refresh then removes and frees entries that are not re-advertised using list_del() followed by kref_put(). The release callback release_iface() performs a bare kfree() without additional synchronization.

Because niface typically holds no channel reference, the list reference is its last. The entry is freed inside the unlocked window. When the loop continues, the iterator advance dereferences niface->iface_head.next, and subsequent reads of iface->rdma_capable and iface->is_active operate on freed memory [CWE-416].

Root Cause

The root cause is unsafe retention of an unreferenced list pointer across a lock-dropping window. The list_for_each_entry_safe_from() iterator captures niface without taking a reference, assuming the list remains stable. Concurrent refresh paths violate that assumption by freeing entries without coordinating with iterators that have released iface_lock.

Attack Vector

Triggering the vulnerability requires a race between SMB multichannel setup and interface refresh events. An attacker-controlled or malicious SMB server can advertise interface lists that trigger refresh cycles while the client is attempting to add channels. Reliable exploitation requires precise timing to free the captured niface entry inside the unlocked window.

The upstream fix re-scans the list from the head under iface_lock for each channel attempt, takes a kref on the selected candidate, and passes only that referenced candidate to cifs_ses_add_channel(). A per-pass attempts cap prevents a flapping interface refresh from spinning the inner loop within a single tries increment. Refer to the Kernel Git Commit c941f1e for the authoritative patch.

Detection Methods for CVE-2026-98173

Indicators of Compromise

  • Kernel oops or panic messages referencing cifs_try_adding_channels or cifs_ses_add_channel in dmesg or /var/log/kern.log
  • KASAN use-after-free reports pointing to release_iface or iface_list traversal paths
  • Unexpected SMB client crashes correlated with interface refresh events on multichannel-enabled mounts

Detection Strategies

  • Enable CONFIG_KASAN on test kernels to surface use-after-free accesses in CIFS code paths
  • Monitor kernel ring buffer for repeated cifs subsystem faults on hosts mounting SMB3 shares with multichannel enabled
  • Correlate SMB session reconnects and interface advertisement changes with kernel exception events

Monitoring Recommendations

  • Collect kernel crash dumps and dmesg output centrally for forensic review of CIFS-related faults
  • Alert on anomalous SMB server behavior that rapidly cycles interface advertisements against Linux clients
  • Track kernel versions across the fleet to confirm patch coverage on hosts mounting SMB shares

How to Mitigate CVE-2026-98173

Immediate Actions Required

  • Apply the stable kernel updates referenced in the upstream commits as soon as distribution packages are available
  • Inventory Linux hosts using CIFS/SMB3 multichannel and prioritize patching for servers mounting shares from untrusted networks
  • Restrict SMB client connections to trusted file servers until patches are deployed

Patch Information

The vulnerability is resolved in upstream Linux kernel stable trees. Reference commits include Kernel Git Commit c941f1e, Kernel Git Commit d034e83, Kernel Git Commit e99040e, and Kernel Git Commit ec36b38. Deploy the vendor-supplied kernel package that incorporates these fixes and reboot affected hosts.

Workarounds

  • Disable SMB multichannel on CIFS mounts by omitting the multichannel mount option or setting max_channels=1
  • Limit SMB client usage to trusted servers that do not frequently refresh interface advertisements
  • Isolate workloads that must use multichannel on hardened network segments until patched kernels are deployed

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.