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 639122C1AC for ; Wed, 28 Feb 2024 08:18:30 +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=1709108310; cv=none; b=Dagoqk3h6A1dcvk+HpLf74KdiX4FPA89ystR8t2fgH4i6NGxfy988gqQE7AHLRd5hTx97eRb0aflpdeaRg9HAFCi1esSe4lk+qgvi16evcf/xjV2JQhkCAFiTNRiS6hWFbUnKUZGt2kNMWGc8x/EyPCnfsk/ZPnMoIZlt+DPQfg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709108310; c=relaxed/simple; bh=ZxBkEBFfQ1Yw5Hjwq0ACRoqYye0J8PDpnPyhog5zH0U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZH/ktIReKfpQRoRl6toLwpM9WyalHt2REjRfToTfQNITzj5FkKhneEZTSrMMJg3wYQ0Rvt6DDaQzjSOUWfB0J6l6/TlwzO2ELIIe8Cb8Zn5/Jj0xxDdiW+ww0U+oMIcghApa36CUjnYutHssJ7yUZOJY/4u3dCXSMUpMNchgJt0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IOiNu/7a; 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="IOiNu/7a" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7D71C433F1; Wed, 28 Feb 2024 08:18:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709108310; bh=ZxBkEBFfQ1Yw5Hjwq0ACRoqYye0J8PDpnPyhog5zH0U=; h=From:To:Cc:Subject:Date:Reply-to:From; b=IOiNu/7andviGOqIwlqUz4lWEYVZu+QnDLm2qMefBDrsY5uHdQthmEXqO7rOZrlBV rs+TrcVHLWEow5vPx2xiQpqd9PXns8nt0RPUtd/aoZmdwjcKVcqc0S5EEXGAuvxqKM zYIdkos1qLUDT8iFkID9wrb2oTQG/qRFaeSn4gJ0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: gregkh@kernel.org Subject: CVE-2021-47009: KEYS: trusted: Fix memory leak on object td Date: Wed, 28 Feb 2024 09:14:59 +0100 Message-ID: <2024022830-CVE-2021-47009-3f56@gregkh> X-Mailer: git-send-email 2.44.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=2303; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=zDncxNe0UicD7bKlQyWaVHaWTxNUwCtr1MfNnzx5TYM=; b=owGbwMvMwCRo6H6F97bub03G02pJDKn3XqcxmLSIxRmG+G10fb4+zyG0WcR3ym9Ok7MSF88s9 polE+TfEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhvCxSkAEzG7zzDfeWmBkWB1XUkX7wbp t+bzWq5+ZrFnWLCrMOpOImtSidaGpJqt1q94p97Qfg4A X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: gregkh@kernel.org Description =========== In the Linux kernel, the following vulnerability has been resolved: KEYS: trusted: Fix memory leak on object td Two error return paths are neglecting to free allocated object td, causing a memory leak. Fix this by returning via the error return path that securely kfree's td. Fixes clang scan-build warning: security/keys/trusted-keys/trusted_tpm1.c:496:10: warning: Potential memory leak [unix.Malloc] The Linux kernel CVE team has assigned CVE-2021-47009 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10.20 with commit 9d83cc1a1e7f and fixed in 5.10.38 with commit 31c9a4b24d86 Issue introduced in 5.11.3 with commit 8cfc8d629421 and fixed in 5.11.22 with commit 1c4031014106 Issue introduced in 5.12 with commit 5df16caada3f and fixed in 5.12.5 with commit 3e24fbd37e72 Issue introduced in 5.12 with commit 5df16caada3f and fixed in 5.13 with commit 83a775d5f9bf 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-2021-47009 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_tpm1.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/31c9a4b24d86cbb36ff0d7a085725a3b4f0138c8 https://git.kernel.org/stable/c/1c4031014106aff48e1e686e40101c31eab5d44c https://git.kernel.org/stable/c/3e24fbd37e72e8a67b74991970fecc82d14f57af https://git.kernel.org/stable/c/83a775d5f9bfda95b1c295f95a3a041a40c7f321