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

ksmbd: remove stale channels from all sessions on teardown

ksmbd_sessions_deregister() removes a connection's channels from other
sessions' channel lists only while conn->binding is still set:

if (conn->binding) {
hash_for_each_safe(sessions_table, ...)
ksmbd_chann_del(conn, sess);
}

conn->binding is a transient flag: it is cleared once a binding
SESSION_SETUP completes, and also by a subsequent non-binding
SESSION_SETUP on the same connection (a reauthentication on a bound
channel, or a new SessionId==0 setup). A connection that has bound a
channel into another session's ksmbd_chann_list and then clears
conn->binding leaves that channel behind when it disconnects: the
channel, whose chann->conn points at the now freed struct ksmbd_conn,
stays on the owner session's list.

When the owning connection later tears down, the second loop
dereferences the stale channel:

xa_for_each(&sess->ksmbd_chann_list, chann_id, chann)
if (chann->conn != conn)
ksmbd_conn_set_exiting(chann->conn); /* freed */

which is a use-after-free write into the freed ksmbd_conn (the same
stale channel is also walked by show_proc_session() through /proc). The
session is leaked as well, because its channel list never empties.

Remove the conn->binding gate so a connection always removes its
channels from every session on teardown.
Published: 2026-10-23
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: Use‑after‑free causing memory corruption and potential code execution (inference)
Action: Apply patch
AI Analysis

Impact

The Linux kernel’s ksmbd implementation incorrectly removes stale channel references only when a connection’s binding flag is set. After a channel is bound to another session and the flag is cleared, the channel remains in the owning session’s list. When that session subsequently tears down, the kernel dereferences the freed channel structure, resulting in a use‑after‑free write. This memory corruption vulnerability may allow an attacker to execute arbitrary code or cause a denial of service (inference). The flaw is a classic use‑after‑free weakness.

Affected Systems

All Linux kernel deployments that provide the ksmbd SMB service are affected. No specific kernel version identifiers are listed in the advisory, so the vulnerability may exist in any kernel revision that contains the legacy ksmbd channel‑cleanup logic.

Risk and Exploitability

The EPSS score is <1% and the vulnerability is not listed in the CISA KEV catalog, indicating it has not yet been observed in the wild. The CVSS score of 8.8 reflects a high severity rating for this use‑after‑free bug. Exploitation would require an attacker able to establish one or more authenticated SMB sessions, which can be achieved remotely from any machine that can reach the ksmbd service (inference). The attack surface is therefore significant for systems exposing SMB and likely requires kernel privilege escalation to fully exploit the memory corruption (inference).

Generated by OpenCVE AI on October 26, 2026 at 13:28 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a Linux kernel version that includes the ksmbd channel cleanup patch.
  • If an upgrade is not immediately possible, disable or block the kernel’s SMB (ksmbd) service to reduce the attack surface.
  • Continuously monitor system logs for anomalous kernel panics or memory corruption signs and apply security updates as soon as they become available.

Generated by OpenCVE AI on October 26, 2026 at 13:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 26 Oct 2026 12:15:00 +0000


Sat, 24 Oct 2026 17:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Sat, 24 Oct 2026 14:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

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


Fri, 23 Oct 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux

Fri, 23 Oct 2026 14:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Fri, 23 Oct 2026 12:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ksmbd: remove stale channels from all sessions on teardown ksmbd_sessions_deregister() removes a connection's channels from other sessions' channel lists only while conn->binding is still set: if (conn->binding) { hash_for_each_safe(sessions_table, ...) ksmbd_chann_del(conn, sess); } conn->binding is a transient flag: it is cleared once a binding SESSION_SETUP completes, and also by a subsequent non-binding SESSION_SETUP on the same connection (a reauthentication on a bound channel, or a new SessionId==0 setup). A connection that has bound a channel into another session's ksmbd_chann_list and then clears conn->binding leaves that channel behind when it disconnects: the channel, whose chann->conn points at the now freed struct ksmbd_conn, stays on the owner session's list. When the owning connection later tears down, the second loop dereferences the stale channel: xa_for_each(&sess->ksmbd_chann_list, chann_id, chann) if (chann->conn != conn) ksmbd_conn_set_exiting(chann->conn); /* freed */ which is a use-after-free write into the freed ksmbd_conn (the same stale channel is also walked by show_proc_session() through /proc). The session is leaked as well, because its channel list never empties. Remove the conn->binding gate so a connection always removes its channels from every session on teardown.
Title ksmbd: remove stale channels from all sessions on teardown
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 Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-24T14:09:26.805Z

Reserved: 2026-09-25T10:25:14.377Z

Link: CVE-2026-98870

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-23T12:18:20.397

Modified: 2026-10-24T14:16:47.773

Link: CVE-2026-98870

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-23T00:00:00Z

Links: CVE-2026-98870 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-26T13:30:08Z

Weaknesses
  • CWE-825

    Expired Pointer Dereference