CVE-2026-99322 in Linux
Summary
by MITRE • 11/19/2026
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: rebind completed CREATE replays without draining the old channel
A completed DurableHandleReqV2 CREATE can be replayed through another channel while its original channel is exiting. The existing replay path returns the open but leaves its connection and oplock references pointing at the old channel. Its open count also stays on that channel, and a later CLOSE through the surviving channel decrements the wrong counter.
After checking the owner, lease key and persistent flag, verify that an active open is still published in the requesting session's file table. Do this even when no oplock was granted, and before processing a consumed replay. Do not read a borrowed opinfo session pointer for this check.
Keep a healthy original binding. If the original channel is exiting or releasing, move the open and its own oplock references to the requesting channel. Serialize this with CLOSE using the session file-table lock, and with detach, reconnect and notification snapshots using m_lock. The earlier lock index and lease-table changes make their lifetimes independent of this connection change. No old-channel r_count wait is needed, including when an unrelated request remains active there.
Account final close against fp->conn in one place, balance durable detach and reconnect, and transfer the count with a replay binding change. A final global lookup put may run after CLOSE has removed the volatile id; unlink the open from the inode list on that final close as well.
A live completed CREATE replay may follow a break that lowered the durable open's batch oplock. Apply the batch eligibility check only to detached reconnects, while retaining the owner, lease key and persistent flag checks for active replays.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/21/2026
The vulnerability in question resides within the ksmbd server implementation of the Linux kernel, specifically affecting the handling of SMB3 durable handle rebind operations during channel transitions. The core technical flaw involves a race condition where a completed DurableHandleReqV2 CREATE request is replayed through an alternative network channel while its original connection channel is in the process of exiting or being released. In this scenario, the existing replay logic incorrectly returns the file open structure but fails to update internal references, leaving connection and oplock pointers directed at the defunct old channel rather than the active new one. Consequently, the reference count for the open remains associated with the original channel, creating a state inconsistency that persists until further operations are performed on the handle.
This misalignment in resource tracking leads directly to operational integrity failures when subsequent commands interact with the affected file descriptor. Specifically, if a CLOSE request is issued through the surviving active channel, it decrements the reference counter of the old, exiting channel instead of the correct one associated with the current session state. This discrepancy results in incorrect accounting of open files and oplocks, potentially leading to resource leaks or premature release of kernel objects that are still logically referenced by other parts of the system. The flaw is particularly insidious because it involves complex interactions between durable handles, lease keys, persistent flags, and multi-channel SMB3 features, requiring precise synchronization across multiple locking mechanisms to prevent state corruption.
To mitigate this vulnerability, the resolution implements a rigorous validation sequence before processing any consumed replay or active rebind operation. The system now verifies that an active open is still properly published in the requesting session's file table, ensuring consistency even when no oplock has been granted. This check avoids reading borrowed pointers from potentially unstable sessions and instead relies on direct lookups within the secure context of the current request. By enforcing this validation early in the processing pipeline, the kernel prevents the establishment of invalid bindings that could lead to the aforementioned reference counting errors.
The fix also introduces robust state management for channel transitions by ensuring a healthy original binding is maintained or correctly transferred. If the analysis determines that the original channel is exiting or releasing resources, the open structure and its associated oplock references are explicitly moved to the requesting new channel. This transfer operation is serialized using the session file-table lock to prevent concurrent modifications during CLOSE operations, while additional synchronization via m_lock handles detach, reconnect, and notification snapshot scenarios. These measures ensure that lifetime dependencies of lease tables and lock indices remain independent of transient connection changes, eliminating the need for complex wait states on old-channel reference counts even when unrelated requests are still active there.
Furthermore, the implementation standardizes accounting procedures to guarantee accurate resource lifecycle management across all close operations. Final closes now consistently account against the correct file pointer connection structure in a single code path, balancing durable detach and reconnect logic while correctly transferring counts during replay binding changes. A final global lookup put operation is managed carefully after volatile identifiers are removed by CLOSE commands, ensuring that opens are properly unlinked from inode lists upon their definitive closure. This comprehensive approach prevents memory leaks and use-after-free conditions that could arise from orphaned references or double-frees resulting from the previous flawed logic.
From a threat modeling perspective, this vulnerability aligns with CWE-362, Concurrent Execution using Shared Resource with Improper Synchronization, as it involves race conditions in shared kernel data structures during multi-channel operations. It also relates to CWE-401, Missing Release of Memory after Effective Lifetime, due to the potential for resource leaks caused by incorrect reference counting and state management. In terms of MITRE ATT&CK mapping, this flaw could potentially be leveraged within the T1562.001 technique, Impair Defenses: Disable or Modify Tools, if an attacker can trigger a denial-of-service condition through crafted multi-channel SMB requests that exhaust kernel resources or cause instability in file server operations. The remediation effectively closes these attack vectors by enforcing strict synchronization and state validation during critical channel transition events.