CVE-2026-99290 in Linuxinfo

Summary

by MITRE • 11/16/2026

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

ksmbd: fix use-after-free after a failed durable reconnect

ksmbd_reopen_durable_fd() republishes a detached durable handle in the reconnecting session's file table and takes no reference for that entry. If smb2_open() then fails, cleanup relies on the final ksmbd_fd_put() to remove the volatile id.

Two reconnects of the same handle can both take a lookup reference before either attaches it. If the one that reopens first then fails and drops its references first, the other request makes the final put through ksmbd_put_durable_fd(). That frees the handle without removing the first session's table entry, so tearing that session down writes to freed memory.

BUG: KASAN: slab-use-after-free in __close_file_table_ids+0x14d/0x740 [ksmbd]
Call Trace: __close_file_table_ids+0x14d/0x740 [ksmbd]
ksmbd_destroy_file_table+0x76/0x100 [ksmbd]
ksmbd_session_destroy+0xf8/0x480 [ksmbd]
ksmbd_dispose_sessions+0x13e/0x200 [ksmbd]
ksmbd_conn_sessions_cleanup+0x4c3/0x6d0 [ksmbd]
Freed by task 1030: __ksmbd_close_fd+0x97d/0x1000 [ksmbd]
smb2_open+0x14eb/0xd9f0 [ksmbd]

Commit 3515503322f4 ("ksmbd: fix durable reconnect error path file lifetime") handles a final put made by the reconnecting request, but not one made by another holder.

Remove the volatile id under the file-table lock on this error path, before the references are dropped, as ksmbd_close_fd() does on the request_open path just above. Removal then no longer depends on which holder makes the final put. The stale comment in the reconnect cleanup is updated to match. A successful reconnect is unchanged.

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

Analysis

by VulDB Data Team • 11/16/2026

The vulnerability identified in the Linux kernel's ksmbd subsystem represents a critical use-after-free condition arising from improper reference counting and synchronization during durable file handle reconnection attempts. This flaw specifically impacts the smb2_open functionality when handling persistent or durable connections, which are designed to maintain open file handles across network interruptions. The core issue lies within the ksmbd_reopen_durable_fd function, which is responsible for republishing a detached durable handle into the reconnecting session's file table. In this process, the code fails to take an additional reference count for the entry it inserts. This omission creates a race condition where multiple concurrent requests attempting to reopen the same durable handle can both acquire lookup references before either successfully attaches the handle to its respective session context.

The operational impact of this flaw manifests when one of these reconnecting sessions fails during the smb2_open process and proceeds to drop its reference count via ksmbd_fd_put. Because the initial insertion did not secure a proper reference, the first failure triggers the final release of the object through ksmbd_put_durable_fd, effectively freeing the underlying memory structure associated with the durable handle. However, the stale entry remains present in the file table of the other session that had also taken a lookup reference but has not yet completed its attachment process. Consequently, when the second session is eventually torn down or closed, it attempts to access and write to this now-freed memory location while iterating through its file table IDs. This results in a kernel slab-use-after-free error, as evidenced by KASAN reports pointing to __close_file_table_ids within the ksmbd module, potentially leading to system instability, denial of service, or arbitrary code execution if an attacker can control the data written to the freed memory region.

From a vulnerability classification perspective, this defect aligns with CWE-416, Use After Free, as it involves accessing memory after it has been released back to the allocator without ensuring that all references have been properly managed and removed from active structures. Furthermore, in the context of the MITRE ATT&CK framework for Linux systems, this vulnerability facilitates exploitation techniques related to privilege escalation or denial of service through kernel memory corruption. The lack of atomicity between removing the volatile identifier from the file table and dropping reference counts allows an attacker with network access to smb2 services to trigger concurrent reconnect attempts that exploit this timing window, thereby corrupting kernel state.

The resolution implemented in commit 3515503322f4 addresses this issue by enforcing strict synchronization during error paths. The fix modifies the code to remove the volatile identifier from the file table under the protection of the file-table lock before any reference counts are dropped. This approach mirrors the logic already present in ksmbd_close_fd for normal request_open operations, ensuring that removal is decoupled from which specific holder performs the final put operation. By securing the structural integrity of the file table prior to releasing references, the patch eliminates the window where a stale entry could point to freed memory. Additionally, the update corrects misleading comments regarding reconnect cleanup procedures and ensures that successful reconnections remain unaffected by these changes, maintaining performance while restoring security guarantees for durable handle management in the ksmbd server implementation.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/16/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!