CVE-2026-99289

ksmbd: fix app-instance non-durable supersede session UAF

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 app-instance non-durable supersede session UAF

ksmbd_close_fd_app_instance_id() supersedes a prior open that has the
same AppInstanceId. It reaches that open's session through opinfo->sess.
This pointer is not refcounted.

Session teardown detaches durable handles before it frees the session.
It does not detach a non-durable open. That open still points at the
session through opinfo->sess after the session is freed. Another session
can supersede the open at the same time. The supersede then takes a
write lock through the stale pointer, in the freed session's file table.

BUG: KASAN: slab-use-after-free in _raw_write_lock+0x71/0xd0
Call Trace:
_raw_write_lock+0x71/0xd0
ksmbd_close_fd_app_instance_id+0xd9/0x670 [ksmbd]
smb2_open+0x3e10/0xd910 [ksmbd]
Freed by task 212:
ksmbd_session_destroy+0x38d/0x480 [ksmbd]

Fix this by looking the session up by opinfo->session_id. The lookup
returns a reference, as smb2_break_collect_channels() does. Recheck that
opinfo->sess still points at it before using it.

Do the lookup without m_lock held. destroy_previous_session() takes
m_lock under the session table lock, and taking them in the other order
here would deadlock.

Analysis

AI-generated

Technical impact

The ksmbd component of the Linux kernel contains a defect where a close operation on an open file descriptor with a non‑durable app‑instance id may reference a session that has already been freed. The stale reference is not refcounted, causing a use‑after‑free that can lead to a kernel panic underslaught by KASAN, and potentially enabling execution of arbitrary code at kernel level.

Affected Systems

The issue affects the Linux kernel itself, as indicated by the vendor list containing "Linux:Linux" and the CPE identifying the Linux kernel. No specific build or version numbers were provided, so all kernel builds present before the patch are potentially vulnerable until the fix is applied via an updated kernel package.

Risk and Exploitability

The vulnerability is a high‑severity kernel use‑after‑free; it is not listed in CISA’s KEV and no EPSS score is available. Likely attack vectors are remote via SMB connections that trigger the supercede logic or local users that can manipulate the ksmbd file descriptors. The risk is therefore considered high due to kernel privilege escalation potential, but the exploit availability is unknown at this time, as no public exploits are reported.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update to a kernel version that includes the ksmbd use‑after‑free fix and reboot the system
  • If an update is not immediately possible, consider blocking or restricting SMB traffic to the affected hosts to reduce exposure
  • Disable the ksmbd module or service on the system if kernel updates cannot be applied in a timely manner

Generated by OpenCVE AI on November 16, 2026 at 11:29 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 app-instance non-durable supersede session UAF ksmbd_close_fd_app_instance_id() supersedes a prior open that has the same AppInstanceId. It reaches that open's session through opinfo->sess. This pointer is not refcounted. Session teardown detaches durable handles before it frees the session. It does not detach a non-durable open. That open still points at the session through opinfo->sess after the session is freed. Another session can supersede the open at the same time. The supersede then takes a write lock through the stale pointer, in the freed session's file table. BUG: KASAN: slab-use-after-free in _raw_write_lock+0x71/0xd0 Call Trace: _raw_write_lock+0x71/0xd0 ksmbd_close_fd_app_instance_id+0xd9/0x670 [ksmbd] smb2_open+0x3e10/0xd910 [ksmbd] Freed by task 212: ksmbd_session_destroy+0x38d/0x480 [ksmbd] Fix this by looking the session up by opinfo->session_id. The lookup returns a reference, as smb2_break_collect_channels() does. Recheck that opinfo->sess still points at it before using it. Do the lookup without m_lock held. destroy_previous_session() takes m_lock under the session table lock, and taking them in the other order here would deadlock.
Title ksmbd: fix app-instance non-durable supersede session UAF
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