{"id":"CVE-2026-98870","published":"2026-10-23T12:18:20.397","lastModified":"2026-10-24T14:16:47.773","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: remove stale channels from all sessions on teardown\n\nksmbd_sessions_deregister() removes a connection's channels from other\nsessions' channel lists only while conn->binding is still set:\n\n\tif (conn->binding) {\n\t\thash_for_each_safe(sessions_table, ...)\n\t\t\tksmbd_chann_del(conn, sess);\n\t}\n\nconn->binding is a transient flag: it is cleared once a binding\nSESSION_SETUP completes, and also by a subsequent non-binding\nSESSION_SETUP on the same connection (a reauthentication on a bound\nchannel, or a new SessionId==0 setup). A connection that has bound a\nchannel into another session's ksmbd_chann_list and then clears\nconn->binding leaves that channel behind when it disconnects: the\nchannel, whose chann->conn points at the now freed struct ksmbd_conn,\nstays on the owner session's list.\n\nWhen the owning connection later tears down, the second loop\ndereferences the stale channel:\n\n\txa_for_each(&sess->ksmbd_chann_list, chann_id, chann)\n\t\tif (chann->conn != conn)\n\t\t\tksmbd_conn_set_exiting(chann->conn);   /* freed */\n\nwhich is a use-after-free write into the freed ksmbd_conn (the same\nstale channel is also walked by show_proc_session() through /proc). The\nsession is leaked as well, because its channel list never empties.\n\nRemove the conn->binding gate so a connection always removes its\nchannels from every session on teardown.","cvssScore":8.8,"cvssSeverity":"HIGH","cvssVector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","cwes":[],"vendors":[],"products":[],"references":[{"url":"https://git.kernel.org/stable/c/9cd6d714d3ca0cff296542dc989696884e41970f","tags":[]},{"url":"https://git.kernel.org/stable/c/a15cae16f4432a5ad919ee633e31b07178492955","tags":[]},{"url":"https://git.kernel.org/stable/c/b10665730fbf6b5e45fe422badcbbc3f0df96ef5","tags":[]},{"url":"https://git.kernel.org/stable/c/b145f9b56c87f9c23ad5464ab0844dbc1de12b36","tags":[]},{"url":"https://git.kernel.org/stable/c/f8200bb4994e65a2e5c5b314789eeae39078619d","tags":[]}],"exploitRefs":[],"hasPoc":false,"ai":null}