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 AAA8129CEF for ; Mon, 21 Oct 2024 12:18:58 +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=1729513138; cv=none; b=MQrMjxxQWwfIPqlF2XJWNqtKkO8rJc7gsQ359EAN/RsGzhjfVieHBKiJgi9xccFnF5bjeCuTs4XK6iQSkBwhetZbej4vomauhgIHDuLIH+8+CHmEnxvdN1atgMyWbmZFkgsaly/lZVbMhSZ0OTLEo4Mb/zyLMw875Qr2pDjWJSg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729513138; c=relaxed/simple; bh=X89s9TEBVC5++Z2clcADwruP4qUFPZ8WzGEBLnzb4ns=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=r+FBhzW8nhTuSBr9+alekxMbBtlAVVonmcEw90SQiou4gj8MfyMbBeUwt83Kf/R4j8X/UJZBOkf5y3Ezym9ysIfp7ygGFe5vvCf9xTwBlAZwDImifGY4aC4pZJlIXP8i+6PbFF4AX/6pJgr3DaZ1RYzxhe5xruhBEV2ltHsiOZQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LUzzlQlA; 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="LUzzlQlA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF9C9C4CEC3; Mon, 21 Oct 2024 12:18:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729513138; bh=X89s9TEBVC5++Z2clcADwruP4qUFPZ8WzGEBLnzb4ns=; h=From:To:Cc:Subject:Date:Reply-to:From; b=LUzzlQlAVoNOJhbaukh+8lCC2gZXOm/VFdrfN+oMvOpDNHcV58X8i9YCiOHImymsa 88n/VOb1G0Vgz9sDbPfEZsJjpv0Su8IFcCY4/NTmau/WPrSzsvy2MKKS4Sz32LN2Sk PzNzg55mbB3iETD5f0YWIQBgh2kHqvPRcvSfSyWw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-49851: tpm: Clean up TPM space after command failure Date: Mon, 21 Oct 2024 14:18:53 +0200 Message-ID: <2024102152-CVE-2024-49851-edd9@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=2908; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=X89s9TEBVC5++Z2clcADwruP4qUFPZ8WzGEBLnzb4ns=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlibmt0d+rs0zz+d+afsKrs437zTY9eV/Mq+TjBXOt/b lFjrM+TjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIy2yGBfukZtzKSNo00+rc 3dwlLb2zGH+u38wwz1R8YZMby5G/lRfWKX/wfbTgArNHFAA= 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: tpm: Clean up TPM space after command failure tpm_dev_transmit prepares the TPM space before attempting command transmission. However if the command fails no rollback of this preparation is done. This can result in transient handles being leaked if the device is subsequently closed with no further commands performed. Fix this by flushing the space in the event of command transmission failure. The Linux kernel CVE team has assigned CVE-2024-49851 to this issue. Affected and fixed versions =========================== Issue introduced in 4.12 with commit 745b361e989a and fixed in 5.10.227 with commit 2c9b228938e9 Issue introduced in 4.12 with commit 745b361e989a and fixed in 5.15.168 with commit ebc4e1f4492d Issue introduced in 4.12 with commit 745b361e989a and fixed in 6.1.113 with commit c84ceb546f30 Issue introduced in 4.12 with commit 745b361e989a and fixed in 6.6.54 with commit 82478cb8a23b Issue introduced in 4.12 with commit 745b361e989a and fixed in 6.10.13 with commit adf4ce162561 Issue introduced in 4.12 with commit 745b361e989a and fixed in 6.11.2 with commit 3f9f72d843c9 Issue introduced in 4.12 with commit 745b361e989a and fixed in 6.12-rc1 with commit e3aaebcbb7c6 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-49851 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: drivers/char/tpm/tpm-dev-common.c drivers/char/tpm/tpm2-space.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/2c9b228938e9266a1065a3f4fe5c99b7235dc439 https://git.kernel.org/stable/c/ebc4e1f4492d114f9693950621b3ea42b2f82bec https://git.kernel.org/stable/c/c84ceb546f30432fccea4891163f7050f5bee5dd https://git.kernel.org/stable/c/82478cb8a23bd4f97935bbe60d64528c6d9918b4 https://git.kernel.org/stable/c/adf4ce162561222338cf2c9a2caa294527f7f721 https://git.kernel.org/stable/c/3f9f72d843c92fb6f4ff7460d774413cde7f254c https://git.kernel.org/stable/c/e3aaebcbb7c6b403416f442d1de70d437ce313a7