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 1E8171DD9BD for ; Tue, 5 Nov 2024 17:11:51 +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=1730826711; cv=none; b=XqbS6HPKnpxpSxJxTb6vg0M91hyk4x8K+Pe9gHs0dxN+PsW30GkqFRHkx03wcjaFtPCBUUQbh/TIhU9T49UXCcRSGSSfl6tuZ4M7O1B6XAsMJjyon73cgu2+wMQ+w7V89okHKQLi6PFo8DpwNsvTq3Yvhff3QNGEIweknBiluSc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730826711; c=relaxed/simple; bh=/yyD+uftBT5HSnCMx7sPsWmu3hrvolNh3qoMb/+NHbg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TMqhffOSv5V6iHzOf2B1amv7LNSZCayq5XEVgsG3sVxW6cHijGTQaspJ7rNkja3w47Gw353rmjF6VeAVsmSKEA0tYMKfGeUhzAYfltAuLu76l2XWREK4FEtBFwZ/yY3Jd5/VUWlQb9avEuEiwgKEf2ANITKBcY6aw+m+5zL/51A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LfD/+ZzX; 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="LfD/+ZzX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9780BC4CECF; Tue, 5 Nov 2024 17:11:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730826711; bh=/yyD+uftBT5HSnCMx7sPsWmu3hrvolNh3qoMb/+NHbg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=LfD/+ZzXjr7sLXaZo//XZFQFrn58cFYWn+VaN4EwPQoU3PmjQ3dbJZza5VCAVVIAY heRfXu9e5BLzbgubYao7hT6A7StEOZnRihS/1Po2NWkWBeDTyE/JdAQReYUHU/gQrt jbz0PfwXSke6ZCPh4yACgkUIjEXClkAB+ibfQsJk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50120: smb: client: Handle kstrdup failures for passwords Date: Tue, 5 Nov 2024 18:11:09 +0100 Message-ID: <2024110556-CVE-2024-50120-07e2@gregkh> X-Mailer: git-send-email 2.47.0 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=2212; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/yyD+uftBT5HSnCMx7sPsWmu3hrvolNh3qoMb/+NHbg=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlagQvM3tXf2287oZQtY9L7fTNmRfpOOCcrahf4QP7Nt ncGCy2PdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEnI8wLNjv75yg057yd6vW RvPG8rNvXnit2sywoPvJe6Ha3zYTW5cV5/PdPBkSLZRyDAA= 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: smb: client: Handle kstrdup failures for passwords In smb3_reconfigure(), after duplicating ctx->password and ctx->password2 with kstrdup(), we need to check for allocation failures. If ses->password allocation fails, return -ENOMEM. If ses->password2 allocation fails, free ses->password, set it to NULL, and return -ENOMEM. The Linux kernel CVE team has assigned CVE-2024-50120 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6.24 with commit 7e8cffa4f85e and fixed in 6.6.59 with commit 35dbac8c328d Issue introduced in 6.9 with commit c1eb537bf456 and fixed in 6.11.6 with commit 35488799b0ab Issue introduced in 6.9 with commit c1eb537bf456 and fixed in 6.12-rc5 with commit 9a5dd6115139 Issue introduced in 6.7.12 with commit e78308a6dcab Issue introduced in 6.8.3 with commit 2a0fc63f1f4f 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-2024-50120 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/client/fs_context.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/35dbac8c328d6afe937cd45ecd41d209d0b9f8b8 https://git.kernel.org/stable/c/35488799b0ab6e4327f82e1d9209a60805665b37 https://git.kernel.org/stable/c/9a5dd61151399ad5a5d69aad28ab164734c1e3bc