Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792755710; b=0LIlKs9XUpyVvLC68AqWFC6zU2WfoyOb+lCAFnRgfJsBf1gcmTnKJNT18nXgxcBgMqRt JlkBCeabXXM4q2OHOMHWH5qEFk+o3kT3u3q7kDI9HAMhrI+CeZW90WxKugJ/QbkPPCuCs R9K832g+iRw1pVAR6Y859ztUOktDnXSlLTOO4o11vd/Tng/TqNTpBOEkNDUMsZwahGfuM QA32ebH/qfUcFullVCJpDhdmgsWA/hPtdWFP4l+8EGprq57CZplBHhdyoDi/e5bKRYhhv BLdXFu3O+IcRC9XOI7CbcvohA6KFHkY6aHTFVggFCK3ZwkknVUnMqpv7qXqtaV+x/8g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792755710; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=wWAz8MBge6a8EernMnmRee8GQtKUF0JOadCWnwEoOzY=; b=fNffDS7X+nFPk2xgaKEwHDmoC62avD7QhAoZ0/NMuLGij7phKz5Ksve/2gOaVKTuN5Ph yh3u0UtblVIee/rOdNNX4w9mzuohud99R7YePBi+oPLKLpbyvBW2LkowyAiO9SO7S+gEW SNHryJKZUTprGop+dqBMPK5Iz/y7wkfCoQ+shMQSh91IIAc/GGkyRgm3D8oExNAoi1KjS xfGQ34zJQMostTWBTN/zw7tsswzoHB8AXPIHzFvIf6ibfzoRk4SjFrW11TyyfudwrJLWn Fz8nHKHWKPp2GCX9hnOhOi+TpZxuEV5e8IGQ6x55tJ4hsdfn+7DpDLStu0AiBq5/bKQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=OUJWusvF; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF9A0606A31A for ; Fri, 23 Oct 2026 11:41:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=OUJWusvF Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15FF01F01825; Fri, 23 Oct 2026 11:41:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792755709; bh=wWAz8MBge6a8EernMnmRee8GQtKUF0JOadCWnwEoOzY=; h=From:To:Cc:Subject:Date:Reply-To; b=OUJWusvFbTTEDxBZVg0eRQyJq88flaDZjjQks2kNAdxQSIg6YUw//x2dZRQNss6j0 qvWZNFeG2VAJmSUREZjJ9a10e06xBo2iref0jUdTskIcrf2AmCZHz0+UY/jeh5Rbum k3AM3DtLqO1mNckTlInLSbbKP2a7MrBjW396PPOc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98870: ksmbd: remove stale channels from all sessions on teardown Date: Fri, 23 Oct 2026 13:37:18 +0200 Message-ID: <2026102318-CVE-2026-98870-c6fe@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3087; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=1o1Hyy2vYOtPZ3+No/BKZLwKq7dK0OBE53X6WYF37EM=; b=owGbwMvMwCRo6H6F97bub03G02pJDFm33d490XrOIii9xmZORjjL2fr1bzjsdhYJb+nl3fyb/ cmBg6cDOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiWq0Mc0UTf3/UXiehJre6 L9VzIt+HvfPdtzPMD3TLnvSP8cjWvzveHzoRnzx3UtWJmwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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. The Linux kernel CVE team has assigned CVE-2026-98870 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15.222 with commit e632f21a8bc0c59abc4960482836ac3782db93c0 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-98870 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/smb/server/mgmt/user_session.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/f8200bb4994e65a2e5c5b314789eeae39078619d https://git.kernel.org/stable/c/9cd6d714d3ca0cff296542dc989696884e41970f https://git.kernel.org/stable/c/b145f9b56c87f9c23ad5464ab0844dbc1de12b36 https://git.kernel.org/stable/c/a15cae16f4432a5ad919ee633e31b07178492955 https://git.kernel.org/stable/c/b10665730fbf6b5e45fe422badcbbc3f0df96ef5