CVE-2026-99386 in Linuxinfo

Summary

by MITRE • 11/19/2026

In the Linux kernel, the following vulnerability has been resolved:

smb: client: don't resurrect an exiting tcon from cached dir workers

cfids_laundromat_worker() bumps tcon->tc_count for every expired open cfid and queues cached_dir_offload_close() without checking whether the tcon is already being torn down. Racing with the final cifs_put_tcon(), the tcon comes back from zero and gets torn down twice:

T1 T2 cifs_put_tcon() --tc_count == 0, TID_EXITING tconInfoFree() free_cached_dirs() cancel_delayed_work_sync() cfids_laundromat_worker() ++tc_count == 1 queue_work(serverclose_wq) kfree(tcon->origin_fullpath) kfree(tcon) cached_dir_offload_close() close_cached_dir() [UAF]
cifs_put_tcon() tconInfoFree() [double free]

cached_dir_lease_break() also bumps tc_count without tc_lock, racing with the laundromat's locked update.

Take the tcon reference through a helper that refuses once the tcon is TID_EXITING or its refcount has dropped to zero. Queued put_work and close_work then always hold a tcon reference, so tconInfoFree() can't run before they finish and free_cached_dirs() doesn't need to flush any workqueue. If the laundromat can't get a reference, put the cfid back on the dying list for free_cached_dirs() to free; its handle goes away with the tree connection.

The lease break path finds the tcon on ses->tcon_list under cifs_tcp_ses_lock, so it can't see TID_EXITING, but it now takes tc_lock.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 11/22/2026

This vulnerability represents a critical race condition within the Linux kernel's Common Internet File System (CIFS) client implementation, specifically involving the lifecycle management of tree connections and their associated cached directory file identifiers. The core issue stems from improper reference counting synchronization in background worker threads that manage expired cache entries. When the system attempts to clean up stale data structures, it fails to adequately verify whether the underlying tree connection is already undergoing termination. This oversight allows multiple execution paths to interact with a deallocated or partially freed memory object, leading to severe stability and security implications including use-after-free scenarios and double free errors that can compromise kernel integrity.

The technical flaw originates in the cfids_laundromat_worker function, which is responsible for processing expired cached directory file identifiers. This worker increments the reference count of a tree connection by bumping tcon->tc_count without first verifying if the connection has been marked as exiting or if its reference count has already dropped to zero. Simultaneously, another thread executing cifs_put_tcon may determine that the reference count is zero and proceed with tearing down the structure via TID_EXITING state transitions. This creates a race condition where one path frees memory while another attempts to access it through queued work items like cached_dir_offload_close. The resulting use-after-free occurs when close_cached_dir accesses freed memory, followed by a double free error as tconInfoFree is invoked on an already deallocated object.

A secondary aspect of this vulnerability involves the lease break mechanism within the caching subsystem. The cached_dir_lease_break function also increments the tree connection reference count but does so without holding the necessary tc_lock synchronization primitive. This lack of locking allows it to race against the laundromat worker's locked updates, further destabilizing the reference counting logic and exacerbating the window for concurrent access violations that could lead to memory corruption or kernel panics under specific timing conditions.

The operational impact of this vulnerability is significant as it affects systems relying on CIFS mounts for network file sharing. Successful exploitation can result in denial of service through kernel crashes, potentially allowing local attackers with sufficient privileges to escalate their rights by exploiting the resulting instability. In more severe scenarios involving remote code execution vectors facilitated by memory corruption primitives derived from these race conditions, system compromise becomes possible. The vulnerability impacts both data integrity and availability for enterprise environments dependent on SMB protocol implementations within Linux kernels.

Mitigation strategies focus on enforcing strict synchronization protocols during reference count manipulation. Developers implemented a helper function that safely acquires tree connection references only when the structure is not in an exiting state or has not reached zero reference counts. This ensures that queued work items always maintain valid references, preventing premature deallocation by tconInfoFree and eliminating the need for complex flushing operations within free_cached_dirs. For lease break scenarios, acquiring tc_lock provides necessary serialization against concurrent modifications. Administrators should apply kernel updates containing these fixes immediately to restore proper lifecycle management of tree connections and eliminate the race conditions that enable memory corruption vulnerabilities in CIFS client implementations.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/19/2026

Moderation

accepted

CPE

ready

EPSS

0.00224

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!