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 6451980633 for ; Mon, 29 Jul 2024 17:40:35 +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=1722274835; cv=none; b=ecUZ8KhqNycTacKPcBf3YKmgDucawb1MCIUN3PQXY5VgIt/oRY1ETRT8uHA+HIu63CJIJWCU66TBSwGAl3Re9YT55BEuOkQZV6VFw7NA5l3MLPSR7f9WuSY7Qv2mGIc3HdYM8y703SMs1WV1bpxnUXzMtjkLS5dHyssRfUm6cls= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722274835; c=relaxed/simple; bh=9LkT7tccxXJ36BzaNjtD2cTOeA7ydA1jGPLAe+t/ku0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=loUnoySYpWcaAXUC0pcpU9bak2Rk5H39dFb/63qKj7do1+/wL7YFK2u0qw2OMAjumW4epWERhTKybDWwNTce+KJ/u3C+Cfy2sGM376aiPn5mK8pyB5LlceqPkA336xCWIDbAzFlYFrqT2YZwdypwO5LNQDN8EPie2ozl45fsLS0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sIz3zpp+; 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="sIz3zpp+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F5C9C32786; Mon, 29 Jul 2024 17:40:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722274835; bh=9LkT7tccxXJ36BzaNjtD2cTOeA7ydA1jGPLAe+t/ku0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=sIz3zpp+QpwnzjCTOUmAbjGIWX8eAaOFC6HccKhgj7aQaBuMIGL+nhLz1IDW9boxi o2+Mk9T6+iSiWpWXd+aEYpo9CeWRX1FpEHGTQkcBtNrMj0AFczteGW2lcPIFXSIxXM zFdjBg9D+IjiR4/lXGR4bWY9r5QRoC4ZbBwEMdv0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42098: crypto: ecdh - explicitly zeroize private_key Date: Mon, 29 Jul 2024 19:40:16 +0200 Message-ID: <2024072912-CVE-2024-42098-fe86@gregkh> X-Mailer: git-send-email 2.45.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=2596; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9LkT7tccxXJ36BzaNjtD2cTOeA7ydA1jGPLAe+t/ku0=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnLL//50PHs7TSOfB9v2fU3/7VtuV3wuOJn68vc/dPUu kuWzCl/1BHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATuXudYUFL+5silUNzc+ee m8QV4fhEQ5HVbjnDPKt+/haGcOMHfUut+I9olvFaLdzwEgA= 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: crypto: ecdh - explicitly zeroize private_key private_key is overwritten with the key parameter passed in by the caller (if present), or alternatively a newly generated private key. However, it is possible that the caller provides a key (or the newly generated key) which is shorter than the previous key. In that scenario, some key material from the previous key would not be overwritten. The easiest solution is to explicitly zeroize the entire private_key array first. Note that this patch slightly changes the behavior of this function: previously, if the ecc_gen_privkey failed, the old private_key would remain. Now, the private_key is always zeroized. This behavior is consistent with the case where params.key is set and ecc_is_key_valid fails. The Linux kernel CVE team has assigned CVE-2024-42098 to this issue. Affected and fixed versions =========================== Fixed in 5.15.162 with commit 39173b04abda Fixed in 6.1.97 with commit fd7ef325911e Fixed in 6.6.37 with commit 80575b252ab0 Fixed in 6.9.8 with commit d96187eb8e59 Fixed in 6.10 with commit 73e5984e540a 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-42098 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: crypto/ecdh.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/39173b04abda87872b43c331468a4a14f8f05ce8 https://git.kernel.org/stable/c/fd7ef325911eba1b7191b83cb580463242f2090d https://git.kernel.org/stable/c/80575b252ab0358b7e93895b2a510beb3cb3f975 https://git.kernel.org/stable/c/d96187eb8e59b572a8e6a68b6a9837a867ea29df https://git.kernel.org/stable/c/73e5984e540a76a2ee1868b91590c922da8c24c9