CVE-2026-98870: ksmbd: remove stale channels from all sessions on teardown

Published Oct 23, 2026
·
Updated

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

ksmbd: remove stale channels from all sessions on teardown

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

if (conn->binding) { hashforeachsafe(sessionstable, ...) ksmbdchanndel(conn, sess); }

conn->binding is a transient flag: it is cleared once a binding SESSIONSETUP completes, and also by a subsequent non-binding SESSIONSETUP 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 ksmbdchannlist and then clears conn->binding leaves that channel behind when it disconnects: the channel, whose chann->conn points at the now freed struct ksmbdconn, stays on the owner session's list.

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

xaforeach(&sess->ksmbdchannlist, channid, chann) if (chann->conn != conn) ksmbdconnsetexiting(chann->conn); / freed /

which is a use-after-free write into the freed ksmbdconn (the same stale channel is also walked by showprocsession() 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.

Affected Software

1 affected component
Linux Linux kernel

Event History

Oct 23, 2026
CVE Published
via MITRE·11:37 AM
Data Sourced
via MITRE·11:37 AM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203