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-98115 Overview
CVE-2026-98115 is a race condition in the Linux kernel's ksmbd in-kernel SMB server. The flaw affects session teardown during SMB3 multichannel logoff operations. SMB3 multichannel allows a single session to run requests across multiple connections. When a client issues LOGOFF while other channels still process requests, ksmbd can free shared session objects before all bound channels drain. The vulnerability also involves deferred byte-range locks that remain counted as running requests and synchronous CANCEL handling that must invoke cancellation callbacks exactly once. Authenticated remote attackers on networks reachable to the SMB server can trigger the condition.
Critical Impact
An authenticated attacker on the network can trigger use-after-free conditions in ksmbd, leading to kernel memory corruption, denial of service, or potential code execution in kernel context.
Affected Products
- Linux kernel versions containing the ksmbd SMB3 server with multichannel support
- Distributions shipping vulnerable ksmbd prior to the referenced upstream commits
- Server deployments exposing SMB over the network via ksmbd
Discovery Timeline
- 2026-09-25 - CVE-2026-98115 published to NVD
- 2026-09-30 - Last updated in NVD database
Technical Details for CVE-2026-98115
Vulnerability Analysis
The defect lives in ksmbd session lifecycle management. SMB3 multichannel binds multiple TCP connections to a single logical session. During SMB2 LOGOFF, ksmbd tears down the session and frees shared session objects. If other channels still hold in-flight requests, references to those shared objects can be used after free. The patch introduces a drain step that waits for all bound channels to quiesce before releasing session state.
Two request classes complicated the drain. Deferred byte-range locks are counted as running requests but only wake when their file closes. The fix wakes blocked locks during the drain without unpublishing or modifying the file objects. Synchronous CANCEL requests must invoke their cancellation callback to wake pending operations, while CHANGE_NOTIFY completion remains tied to the asynchronous path.
Session teardown is also serialized with channel registration and previous-session cleanup. Atomic work-state transitions ensure LOGOFF, CANCEL, and connection teardown invoke each cancellation callback only once, preventing double-wake and double-free paths.
Root Cause
The root cause is a race condition between SMB3 multichannel session logoff and in-flight requests on bound channels. Shared session objects were released without synchronizing against channel registration, previous-session cleanup, deferred lock drains, and concurrent cancellation callbacks.
Attack Vector
An authenticated remote attacker with SMB access can establish multiple channels bound to one session, submit requests that produce deferred lock waits or asynchronous notifications, and race a LOGOFF against pending CANCEL and connection teardown. Repeated attempts can trigger use-after-free conditions on session structures.
Technical details are available in the upstream fixes: Linux Kernel Commit a7e6df0 and Linux Kernel Commit d121680.
Detection Methods for CVE-2026-98115
Indicators of Compromise
- Kernel oops or BUG: messages referencing ksmbd session, channel, or lock structures in dmesg and /var/log/kern.log
- Unexpected ksmbd crashes or SMB service restarts coinciding with client LOGOFF activity
- KASAN reports flagging use-after-free in ksmbd session teardown paths on debug kernels
Detection Strategies
- Monitor kernel ring buffer for faults originating in ksmbd_server module functions, especially around session logoff and channel binding
- Correlate SMB client reconnection storms with concurrent multichannel sessions targeting the same server
- Baseline ksmbd process stability and alert on repeated worker crashes or soft lockups
Monitoring Recommendations
- Enable kernel crash collection with kdump on servers running ksmbd to capture evidence of exploitation attempts
- Forward kernel logs to a centralized SIEM and alert on ksmbd fault signatures
- Track SMB session churn metrics such as logoff rate and channel bind count per source address
How to Mitigate CVE-2026-98115
Immediate Actions Required
- Apply the upstream kernel patches referenced below and reboot into the fixed kernel
- Restrict SMB access to trusted network segments using host firewalls and network ACLs
- Disable ksmbd on systems that do not require an in-kernel SMB server and use a userspace alternative where feasible
Patch Information
The fix is upstream in the Linux kernel. See Linux Kernel Commit a7e6df0 and Linux Kernel Commit d121680. Apply vendor-provided kernel updates from your distribution as they become available.
Workarounds
- Unload the ksmbd module with modprobe -r ksmbd where SMB service is not required
- Block inbound TCP 445 at the perimeter and allow only authenticated management hosts
- Require strong authentication and disable guest or anonymous SMB access to limit the attacker pool
# Disable and unload ksmbd where not required
sudo systemctl stop ksmbd.service
sudo systemctl disable ksmbd.service
sudo modprobe -r ksmbd
# Restrict SMB access with firewalld
sudo firewall-cmd --permanent --remove-service=samba
sudo firewall-cmd --permanent --add-rich-rule=\
'rule family="ipv4" source address="10.0.0.0/24" port port="445" protocol="tcp" accept'
sudo firewall-cmd --reload
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

