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 3B62B1B86E9 for ; Tue, 21 Jan 2025 12:18:50 +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=1737461931; cv=none; b=gQQ+B4MKlz5RJgScwXOkHcNq7mmq67Vxjwk4yFBsAme/3cNZfxOqGJ5SoavhAjU5JYrdJpJndeSq4DUl7ZidPkbqLFBOPU9g5ChtnBEEQaeBekRKXv7UKjC9RK+tPqdfmFa3eyNKZgx6b218rMGMK2QaeWQJAN/QncFM/5XypaU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737461931; c=relaxed/simple; bh=4yAoqJvd+VhbrWkoDAztVZXXHXTr2OL0KgzbpG3CXeA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TcROqXtOvPecWvLIV302nBdq4c8XvkdYVAaBpqL/uzfgb5P69Bv3yywFlOuuKIG056g0qJ7AX38Py0XHsC3LAz387xXg0VgPF0loYtjCrWX9GS2DF2N7z3jjr1gilblCaKQ8QIP3ZYKvOGzUMvjJJRWjwrncbFffHwKyarvOwXQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TlbTDnaF; 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="TlbTDnaF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F688C4CEDF; Tue, 21 Jan 2025 12:18:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1737461930; bh=4yAoqJvd+VhbrWkoDAztVZXXHXTr2OL0KgzbpG3CXeA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=TlbTDnaFLrzA5qk7WDb55SOALpn7CSuYAMvgTESV8rXo6gUuZvNm0RpfWIcv+2iCw 8WUxsisa95pAJD0QW4AJC4c1oquHBnba40Uqn/8Tx2UgaJukBYlogzwlMSEwW7jsVo AD7IR/FGUqCiJMpsDDcxRzy4hjHdvqF32O9mvaGI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21660: ksmbd: fix unexpectedly changed path in ksmbd_vfs_kern_path_locked Date: Tue, 21 Jan 2025 13:18:39 +0100 Message-ID: <2025012133-CVE-2025-21660-cfac@gregkh> X-Mailer: git-send-email 2.48.1 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=2591; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=4yAoqJvd+VhbrWkoDAztVZXXHXTr2OL0KgzbpG3CXeA=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn9E2aeXh8T9dqkK1LxecXxG4l+rfur7/+TczTbLSyVU FFkYVHZEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPhSGNYsFdT5WtB+TmWt12e niKv42+E2LzKYViw0GiP0UnGzrAlTLpO6eeKLktJp90FAA== 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: fix unexpectedly changed path in ksmbd_vfs_kern_path_locked When `ksmbd_vfs_kern_path_locked` met an error and it is not the last entry, it will exit without restoring changed path buffer. But later this buffer may be used as the filename for creation. The Linux kernel CVE team has assigned CVE-2025-21660 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1.113 with commit d1b2d2a9c912fc7b788985fbaf944e80f4b3f2af and fixed in 6.1.125 with commit 13e41c58c74baa71f34c0830eaa3c29d53a6e964 Issue introduced in 6.6.54 with commit 6ab95e27b77730de3fa2d601db3764490c5eede2 and fixed in 6.6.72 with commit 65b31b9d992c0fb0685c51a0cf09993832734fc4 Issue introduced in 6.12 with commit c5a709f08d40b1a082e44ffcde1aea4d2822ddd5 and fixed in 6.12.10 with commit 51669f4af5f7959565b48e55691ba92fabf5c587 Issue introduced in 6.12 with commit c5a709f08d40b1a082e44ffcde1aea4d2822ddd5 and fixed in 6.13 with commit 2ac538e40278a2c0c051cca81bcaafc547d61372 Issue introduced in 6.10.13 with commit d205cb1a13b37b2660df70a972dedc8c4ba1c2e8 Issue introduced in 6.11.2 with commit c1e27b70e79050530c671b9dab688386c86f039a 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-2025-21660 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/vfs.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/13e41c58c74baa71f34c0830eaa3c29d53a6e964 https://git.kernel.org/stable/c/65b31b9d992c0fb0685c51a0cf09993832734fc4 https://git.kernel.org/stable/c/51669f4af5f7959565b48e55691ba92fabf5c587 https://git.kernel.org/stable/c/2ac538e40278a2c0c051cca81bcaafc547d61372