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

CVE-2026-98162: Linux Kernel SMB Server DOS Vulnerability

CVE-2026-98162 is a denial of service flaw in the Linux kernel SMB server causing tree connection leaks in smb2_tree_connect(). This article covers technical details, affected versions, impact, and mitigation.

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-98162 Overview

CVE-2026-98162 is a resource leak vulnerability in the Linux kernel's ksmbd in-kernel SMB server. The flaw resides in smb2_tree_connect(), where a failure in ksmbd_iov_pin_rsp() does not trigger disconnection of a newly established tree connection. The tree connection remains stored in sess->tree_conns, and both the global tree connection counter and the per-share connection count are incremented without a corresponding cleanup path.

An attacker able to initiate SMB2 tree connect requests against a vulnerable ksmbd instance can repeatedly trigger the failure path and exhaust server resources over time.

Critical Impact

Repeated triggering of the failure path leaks tree connection objects and inflates reference counters, degrading SMB service availability on affected Linux kernel builds.

Affected Products

  • Linux kernel builds shipping the ksmbd SMB server module prior to the fix commits
  • Distributions and appliances exposing ksmbd for SMB file sharing
  • Stable kernel trees prior to backport of commits 39f2032096715daae5f6fd0f587ca7a474b019df and a6c88e5e3a75f1e4a98ad4bc4037465ccd7925bc

Discovery Timeline

  • 2026-09-25 - CVE-2026-98162 published to NVD
  • 2026-09-30 - Last updated in NVD database

Technical Details for CVE-2026-98162

Vulnerability Analysis

The vulnerability resides in the SMB2 tree connect handler within the ksmbd kernel module. During normal processing, smb2_tree_connect() calls ksmbd_tree_conn_connect(), which stores the new tree connection in the session's tree_conns xarray via xa_store(&sess->tree_conns, tree_conn->id, tree_conn). The code then increments KSMBD_COUNTER_TREE_CONNS and calls ksmbd_share_tree_conn_inc(sc) to track the share-level reference.

The failure occurs when the subsequent ksmbd_iov_pin_rsp() call fails. The handler sets status.ret = KSMBD_TREE_CONN_STATUS_NOMEM and returns without invoking a disconnect routine. The already-registered tree connection object persists in the xarray, and the counters remain incremented. See the upstream fix commit and the stable backport commit for the corrected teardown sequence.

Root Cause

The root cause is a missing cleanup path in error handling. smb2_tree_connect() does not call the tree connection disconnect routine when ksmbd_iov_pin_rsp() reports an allocation or packaging failure. This leaves the tree connection registered in session state and biases per-share and global reference counts, classifying the issue as a kernel memory leak.

Attack Vector

The attack vector is network-based. A remote client authenticated to a share, or any client capable of reaching an SMB session on the vulnerable server, issues repeated SMB2 TREE_CONNECT requests that trigger ksmbd_iov_pin_rsp() failure conditions. Each failed request leaks a tree connection object and inflates reference counters, enabling a slow denial-of-service against the SMB service and consuming kernel memory over time.

No verified public exploit code is available for this issue.

Detection Methods for CVE-2026-98162

Indicators of Compromise

  • Elevated ksmbd tree connection counts that do not decrease after client sessions close.
  • Growth in kernel slab allocations tied to ksmbd tree connection structures over extended uptime.
  • Repeated SMB2 TREE_CONNECT requests from a single source correlated with KSMBD_TREE_CONN_STATUS_NOMEM responses in kernel logs.

Detection Strategies

  • Monitor the running Linux kernel version on SMB-serving hosts and compare against the fixed commits for ksmbd.
  • Track ksmbd share connection metrics and alert when per-share counters grow without matching disconnects.
  • Inspect dmesg and system journal entries for memory allocation failures emitted during SMB2 tree connect processing.

Monitoring Recommendations

  • Baseline normal tree connection counts per share and alert on sustained deviation.
  • Capture SMB2 protocol telemetry at network choke points to identify abnormal TREE_CONNECT request rates.
  • Correlate kernel slab usage trends with ksmbd workload to spot gradual memory consumption characteristic of the leak.

How to Mitigate CVE-2026-98162

Immediate Actions Required

  • Inventory Linux hosts running ksmbd and prioritize patching for internet-exposed or multi-tenant SMB servers.
  • Apply the upstream fix or the vendor-supplied kernel update that includes commits 39f2032096715daae5f6fd0f587ca7a474b019df and a6c88e5e3a75f1e4a98ad4bc4037465ccd7925bc.
  • Restrict SMB access to trusted network segments using firewall rules on TCP port 445.

Patch Information

The fix adds a disconnect call for the newly created tree connection when ksmbd_iov_pin_rsp() fails, ensuring the xarray entry is removed and the counters are decremented. Review the kernel.org mainline commit and the stable backport commit for exact changes and apply the kernel update appropriate to your distribution.

Workarounds

  • Disable the ksmbd module where SMB sharing is not required and rely on alternative file sharing mechanisms until patching.
  • Enforce network segmentation and firewall rules to limit which clients can reach the SMB service.
  • Schedule periodic restarts of the SMB service on unpatched hosts to reclaim leaked tree connection resources.

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.