CVE-2026-99290

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

Published Nov 16, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

A use‑after‑free bug in the Linux ksmbd module causes a kernel memory corruption when a durable SMB session reconnect fails. The flaw allows the freeing of a handle while other requests still hold references, leading to writes into freed memory during session teardown. If exploited, an attacker could induce a kernel panic or potentially execute arbitrary code with kernel privileges.

Affected Systems

All Linux kernel builds that contain the ksmbd component and the durable reconnect logic are vulnerable. The patch is applied across kernel releases, so systems running current kernels without the update are affected.

Risk and Exploitability

The vulnerability is a classic use‑after‑free in kernel space, a high‑severity weakness that can lead to privilege escalation. The EPSS score is not available and the issue is not listed in CISA KEV, but the nature of the flaw indicates a high likelihood of exploitation in a capable environment. The likely attack vector involves provoking a durable SMB session reconnect failure, which could be achieved by manipulating SMB session handling (for example by sending specially crafted reconnection requests) or by using post‑compromise steps to trigger the failure. This inference is drawn from the description of the flaw. The lack of publicly available exploits means the risk remains potential until a proof‑of‑concept is released.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to the latest release that contains the committed fix (3515503322f4) for the ksmbd module.
  • If a kernel upgrade is not feasible, configure smb.conf or other system settings to disable durable SMB reconnects (for example, unset the "DurableClientLifetime" or related parameters) so that the vulnerable path cannot be exercised.
  • Monitor kernel logs for KASAN or use‑after‑free messages and any kernel panics; investigate and apply patches as soon as they become available.

Generated by OpenCVE AI on November 16, 2026 at 12:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description 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.
Title ksmbd: fix use-after-free after a failed durable reconnect
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 16, 2026, 9:59 AM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Nov 16, 2026, 10:17 AM
Modified
Nov 16, 2026, 10:17 AM