From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C9953D39A for ; Wed, 21 Feb 2024 07:26:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708500380; cv=none; b=Vk86/CIQNcMTPWtyj17/5YPYt+lxWlq2MfRCneU03tokgDFU4FxhiYwrcndwcFybHketT8LdA+eB5Ta8v2SiroLTTX6btvUlT7bEqPyOiI4ZluVii6+X7ZiTWtPrOQI5mtR1gppZAEHNU+kvw+QSQsdl9RW+XsMDBcHfaEN22Jw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708500380; c=relaxed/simple; bh=+bIo5KZimU3rJQGsGvgo6agZSPveOzOlEqSo8Kz4Kuo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VXeDUErp/M4MXRsB3kNJJOw50Vm9ttiSJ1H8kLgdLV01CRYUKq9lWiqZ1LRi1FmUBfYI54gxBvC5ojUUewP3XjcUYb9sJzKBaL13KBxCsVMlLtzdhXBxlsJ6oXS2KfqMDKmmAVqq8UlJa1OqwGKouBvJqWLC8bPAUsdqu30kjD0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NKbr/TwC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="NKbr/TwC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83534C433F1; Wed, 21 Feb 2024 07:26:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708500380; bh=+bIo5KZimU3rJQGsGvgo6agZSPveOzOlEqSo8Kz4Kuo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=NKbr/TwCpgiGqn7vfrkWF7F55FXximwnBz8lIBJKCQNJLTPXYLIAeVSMaLAU9ddkt cTmoQ0VX/C/Mres6mr2x+l1HCXU5yDsD6fYbY8Fc2VXjXPpK1hEilIROjX1OsNo5y+ x01VTbUVFsM0zMzuiFfaE325Z99V3/tvLHIQFGBc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52442: ksmbd: validate session id and tree id in compound request Date: Wed, 21 Feb 2024 08:25:32 +0100 Message-ID: <2024022132-unvented-arguably-5ea9@gregkh> X-Mailer: git-send-email 2.43.2 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: X-Developer-Signature: v=1; a=openpgp-sha256; l=2118; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=+bIo5KZimU3rJQGsGvgo6agZSPveOzOlEqSo8Kz4Kuo=; b=owGbwMvMwCRo6H6F97bub03G02pJDKlXl+ZuW50SOW1TT9CqVLVdh64dfnIvitn/h9KGcLWHc YnxL3wDOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiLBYMc6U6L30zFDKQcz4Q 9L4rMCT4/iJ9N4a54ksMg55I1UVYevcvX/act2LBtFx2AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: ksmbd: validate session id and tree id in compound request `smb2_get_msg()` in smb2_get_ksmbd_tcon() and smb2_check_user_session() will always return the first request smb2 header in a compound request. if `SMB2_TREE_CONNECT_HE` is the first command in compound request, will return 0, i.e. The tree id check is skipped. This patch use ksmbd_req_buf_next() to get current command in compound. The Linux kernel CVE team has assigned CVE-2023-52442 to this issue. Affected and fixed versions =========================== Fixed in 5.15.145 with commit 017d85c94f02 Fixed in 6.1.53 with commit becb5191d1d5 Fixed in 6.4.16 with commit 4c2b350b2e26 Fixed in 6.5 with commit 3df0411e132e Please see https://www.kernel.org or 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-2023-52442 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/smb2pdu.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/017d85c94f02090a87f4a473dbe0d6ee0da72693 https://git.kernel.org/stable/c/becb5191d1d5fdfca0198a2e37457bbbf4fe266f https://git.kernel.org/stable/c/4c2b350b2e269e3fd17bbfa42de1b42775b777ac https://git.kernel.org/stable/c/3df0411e132ee74a87aa13142dfd2b190275332e