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

ksmbd: only rebind the reopened file's own oplock on durable reconnect

ksmbd_reopen_durable_fd() walks the inode's m_op_list and rebinds every
detached oplock to the reconnecting session:

list_for_each_entry_rcu(op, &ci->m_op_list, op_entry,
lockdep_is_held(&ci->m_lock)) {
if (op->conn)
continue;
op->conn = ksmbd_conn_get(fp->conn);
op->sess = work->sess;
}

The only key is op->conn == NULL, which every detached durable handle on
that inode matches, not just the one owned by fp. When two sessions hold
durable handles on the same file and both disconnect, reconnecting one of
them adopts the other session's oplock: op->sess is overwritten with the
reconnecting session without taking a reference on it, while op->conn
pins the connection.

The sibling teardown path, session_fd_check(), keys on the identity of
the connection being torn down (op->conn == conn) rather than on shared
state, and so does not have this problem.

Once the adopting session is destroyed, ksmbd_session_destroy() frees it
while the foreign oplock still points at it. The reader in
ksmbd_close_fd_app_instance_id() validates only opinfo->conn, which is
still live thanks to the reference taken above, and then dereferences the
stale session:

if (!opinfo->conn) {
up_read(&fp->f_ci->m_lock);
goto out;
}

ft = &opinfo->sess->file_table;
write_lock(&ft->lock);

BUG: KASAN: slab-use-after-free in _raw_write_lock+0x74/0xd0
Write of size 4 at addr ffff88810a970528 by task kworker/0:0/9
Workqueue: ksmbd-io handle_ksmbd_work
Call Trace:
_raw_write_lock+0x74/0xd0
ksmbd_close_fd_app_instance_id+0x183/0x410
smb2_open+0x1346/0x4430
handle_ksmbd_work+0x2bb/0x7b0

Reached from an authenticated session against a share with the default
durable-handle and oplock configuration: two sessions open the same file
with a durable-v2 handle and an RH lease under distinct AppInstanceIds,
both log off, one reconnects with DH2C, and a later durable-v2 create
carrying the other AppInstanceId walks into the freed session.

Constrain the loop to the oplock owned by the file being reopened.
Published: 2026-09-11
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Use‑After‑Free in the Linux kernel that can lead to a crash or privilege escalation
Action: Immediate Patch
AI Analysis

Impact

The ksmbd module incorrectly rebinds all detached oplocks whose connection pointer is null when a durable handle is reopened. This action creates a stale reference to a destroyed session inside the oplock. Later, when the file is closed, the stale reference is dereferenced, leading to a kernel Address‑Space Exposure and a BUG that can cause a kernel panic. The flaw is a classic use‑after‑free condition and an improper reference handling problem.

Affected Systems

All systems running the Linux kernel that ship the ksmbd SMB server and have the default durable‑handle and oplock configuration enabled. Any distribution that allows multiple authenticated SMB sessions to open the same file with durable handles is affected; no specific kernel or distribution version is listed in the advisory.

Risk and Exploitability

The CVSS base score of 5.3 indicates moderate severity. The EPSS score is < 1%, and the vulnerability is not listed in CISA KEV. Exploitation requires an attacker to establish one or more authenticated SMB sessions on a share that permits durable handles, open the same file from distinct AppInstanceIds, then orchestrate a disconnect‑reconnect sequence so that a stale oplock reference is created and later dereferenced. If successfully triggered, a local or remote attacker could cause a kernel panic or obtain elevated privileges. The low EPSS and the need for specific session activities suggest a moderate risk in typical scenarios, but the potential for a kernel crash or privilege escalation warrants timely patching.

Generated by OpenCVE AI on September 13, 2026 at 01:36 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply a Linux kernel update that includes the ksmbd patch present in commit 3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7 or later.
  • Restart the ksmbd service and any related SMB services to ensure all sessions and oplocks are cleared.
  • If upgrading immediately is not possible, temporarily disable durable handles or configure the SMB share to disallow multiple sessions opening the same file with distinct AppInstanceIds until the patch is applied.

Generated by OpenCVE AI on September 13, 2026 at 01:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 12 Sep 2026 14:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Sat, 12 Sep 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Important


Sat, 12 Sep 2026 07:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Fri, 11 Sep 2026 23:45:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ksmbd: only rebind the reopened file's own oplock on durable reconnect ksmbd_reopen_durable_fd() walks the inode's m_op_list and rebinds every detached oplock to the reconnecting session: list_for_each_entry_rcu(op, &ci->m_op_list, op_entry, lockdep_is_held(&ci->m_lock)) { if (op->conn) continue; op->conn = ksmbd_conn_get(fp->conn); op->sess = work->sess; } The only key is op->conn == NULL, which every detached durable handle on that inode matches, not just the one owned by fp. When two sessions hold durable handles on the same file and both disconnect, reconnecting one of them adopts the other session's oplock: op->sess is overwritten with the reconnecting session without taking a reference on it, while op->conn pins the connection. The sibling teardown path, session_fd_check(), keys on the identity of the connection being torn down (op->conn == conn) rather than on shared state, and so does not have this problem. Once the adopting session is destroyed, ksmbd_session_destroy() frees it while the foreign oplock still points at it. The reader in ksmbd_close_fd_app_instance_id() validates only opinfo->conn, which is still live thanks to the reference taken above, and then dereferences the stale session: if (!opinfo->conn) { up_read(&fp->f_ci->m_lock); goto out; } ft = &opinfo->sess->file_table; write_lock(&ft->lock); BUG: KASAN: slab-use-after-free in _raw_write_lock+0x74/0xd0 Write of size 4 at addr ffff88810a970528 by task kworker/0:0/9 Workqueue: ksmbd-io handle_ksmbd_work Call Trace: _raw_write_lock+0x74/0xd0 ksmbd_close_fd_app_instance_id+0x183/0x410 smb2_open+0x1346/0x4430 handle_ksmbd_work+0x2bb/0x7b0 Reached from an authenticated session against a share with the default durable-handle and oplock configuration: two sessions open the same file with a durable-v2 handle and an RH lease under distinct AppInstanceIds, both log off, one reconnects with DH2C, and a later durable-v2 create carrying the other AppInstanceId walks into the freed session. Constrain the loop to the oplock owned by the file being reopened.
Title ksmbd: only rebind the reopened file's own oplock on durable reconnect
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-11T19:45:29.551Z

Reserved: 2026-09-11T19:38:34.739Z

Link: CVE-2026-89635

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-11T20:19:49.120

Modified: 2026-09-11T20:19:49.120

Link: CVE-2026-89635

cve-icon Redhat

Severity : Important

Publid Date: 2026-09-11T19:45:29Z

Links: CVE-2026-89635 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-13T01:45:07Z

Weaknesses
  • CWE-825

    Expired Pointer Dereference