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 E14302BAE9 for ; Sat, 8 Jun 2024 12:53:19 +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=1717851200; cv=none; b=fguzcFK01uC6V/5YNkZ6fdiLjrvvBKrbeB4L+i/Pv7QD0GmPe9pp0i9sjnpHVjIvX564MXHNy0ynPYuMVhxjQEqopexY5x6WgdRBirNDYUWtNu48/g1LZmCzFJsbNQWaF4J557Eg6mH1ZqucvqskVLVNft1HMI0b7ImYct/WO20= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717851200; c=relaxed/simple; bh=WSkOiRdY5kwWCNGmSucAIYZ0GhrfeVCI3NYkoHw8sXQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kPojDzurEo12njYvP8qtlzP+3jiP5kkjD510y/1FDnuQeYotCXEFJVAKqAmdKHHMtin+ZAb+vQszdUZR57wdG99qXPwlPoL246xWyzit3k8LUfQa6VubEKeu9nC0E2FWSIStDb8KyU/C+bveJOzBIQWJAdMxTbH2k86YPRGkKfA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Q5DkNq/g; 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="Q5DkNq/g" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2517C2BD11; Sat, 8 Jun 2024 12:53:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1717851199; bh=WSkOiRdY5kwWCNGmSucAIYZ0GhrfeVCI3NYkoHw8sXQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Q5DkNq/gfC4suLGMOVMJYq6MGQ1yNxJebXq1x+KuLZDM/9rEtR8qO2S2aLnxGPRlm ibmSBd7qLIcuGaL662JoX+dKWT1cwbS5L0ZkPda7HlSwsst0kjBel9MzqTCzS+RU4a tDjtVXNNbtxya+Ry/kXhmS+quH8UgdYKJdXR+8nQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-36967: KEYS: trusted: Fix memory leak in tpm2_key_encode() Date: Sat, 8 Jun 2024 14:53:04 +0200 Message-ID: <2024060804-CVE-2024-36967-b73d@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=2450; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WSkOiRdY5kwWCNGmSucAIYZ0GhrfeVCI3NYkoHw8sXQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkpIQY1nPYfWSfpKuWe6k+ztdXfYLEv2tRfXoDPIeRH6 8OtMyZ1xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwEQOHWdYcGoyW3M8d/eVjuN5 61ZcZ9P0+K6fzzBPJeyHk412Uc3vJCPHNuWrrS/q778DAA== 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: KEYS: trusted: Fix memory leak in tpm2_key_encode() 'scratch' is never freed. Fix this by calling kfree() in the success, and in the error case. The Linux kernel CVE team has assigned CVE-2024-36967 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit f2219745250f and fixed in 5.15.160 with commit 1e6914fa8e77 Issue introduced in 5.13 with commit f2219745250f and fixed in 6.1.92 with commit 5d91238b590b Issue introduced in 5.13 with commit f2219745250f and fixed in 6.6.32 with commit e62835264d03 Issue introduced in 5.13 with commit f2219745250f and fixed in 6.8.11 with commit 189c768932d4 Issue introduced in 5.13 with commit f2219745250f and fixed in 6.9.2 with commit cf26a92f560e Issue introduced in 5.13 with commit f2219745250f and fixed in 6.10-rc1 with commit ffcaa2172cc1 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-36967 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: security/keys/trusted-keys/trusted_tpm2.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/1e6914fa8e7798bcf3ce4a5b96ea4ac1d5571cdf https://git.kernel.org/stable/c/5d91238b590bd883c86ba7707c5c9096469c08b7 https://git.kernel.org/stable/c/e62835264d0352be6086975f18fdfed2b5520b13 https://git.kernel.org/stable/c/189c768932d435045b1fae12bf63e53866f06a28 https://git.kernel.org/stable/c/cf26a92f560eed5d6ddc3d441cc645950cbabc56 https://git.kernel.org/stable/c/ffcaa2172cc1a85ddb8b783de96d38ca8855e248