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 5EE0C160873 for ; Tue, 18 Jun 2024 19:20:32 +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=1718738433; cv=none; b=W8AVpG3YboLp9386GYA4mNEEzBlNXQilgfr0iD/klEKOPu27+2dfBplBUY7MqDOlwMvah+gsihUv6rCfL0vL78Aha3S8ym3EihtZT4ACsS8KvzNsJQclnhCOTCZ7ePxt0KjxcgZNw84GQU1eaFoDjsKRyWzxwmoD0DrdE2n7IkQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718738433; c=relaxed/simple; bh=e9MJ8WSmADEl8dr6KSKs1QzX0DBHcZUNNSvuDvcXFzU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XuS8l5OoQ2oRLsWGs4XQ4u9N3mx1oXE+GNwCVFAeWUP9Hra+9m1PZtgubGTfTAm0WQ3hDlTnPHY5UawMPK0gtmZbitrmL3NVkfkgc3DPRI2uFAVOd1ritU2gIPf+RsSqxQffitSQEh5PCAmU/bkamS4mbDq1IkdrzXttP3sJEKM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RDieXoHn; 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="RDieXoHn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77B95C3277B; Tue, 18 Jun 2024 19:20:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718738432; bh=e9MJ8WSmADEl8dr6KSKs1QzX0DBHcZUNNSvuDvcXFzU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=RDieXoHnS8vn2kC+rtz5S+6OKUkGnQ7SKk3GGa8RkKCfP6IASglIUH6zx5bi1s9JN OE7KM01zK3us5q1B7D8BI1S4QrUFsZ+V/hqmlJ16K2CbRf1AJuhOc8VzYTc2PelMTG RvLR6wWDive6G6jFdBOsnHfI4FGuG54mDX42dRXM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-36975: KEYS: trusted: Do not use WARN when encode fails Date: Tue, 18 Jun 2024 21:20:29 +0200 Message-ID: <2024061828-CVE-2024-36975-6719@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=2879; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=e9MJ8WSmADEl8dr6KSKs1QzX0DBHcZUNNSvuDvcXFzU=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmFd/88mpTjs8+QVWhd9VeHlW4ZXq7rdx4zLat+l/A+Z +K0LzZbO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi83oYFky72H/Nym6S2qzD tZtPhmof22zTqM4wT4HpdrOP7fWY7JR8/iWBhy8X3by/HwA= 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: Do not use WARN when encode fails When asn1_encode_sequence() fails, WARN is not the correct solution. 1. asn1_encode_sequence() is not an internal function (located in lib/asn1_encode.c). 2. Location is known, which makes the stack trace useless. 3. Results a crash if panic_on_warn is set. It is also noteworthy that the use of WARN is undocumented, and it should be avoided unless there is a carefully considered rationale to use it. Replace WARN with pr_err, and print the return value instead, which is only useful piece of information. The Linux kernel CVE team has assigned CVE-2024-36975 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit f2219745250f and fixed in 5.15.160 with commit 96f650995c70 Issue introduced in 5.13 with commit f2219745250f and fixed in 6.1.92 with commit 681935009fec Issue introduced in 5.13 with commit f2219745250f and fixed in 6.6.32 with commit 1c652e1e1067 Issue introduced in 5.13 with commit f2219745250f and fixed in 6.8.11 with commit d32c6e09f7c4 Issue introduced in 5.13 with commit f2219745250f and fixed in 6.9.2 with commit ff91cc12faf7 Issue introduced in 5.13 with commit f2219745250f and fixed in 6.10-rc1 with commit 050bf3c793a0 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-36975 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/96f650995c70237b061b497c66755e32908f8972 https://git.kernel.org/stable/c/681935009fec3fc22af97ee312d4a24ccf3cf087 https://git.kernel.org/stable/c/1c652e1e10676f942149052d9329b8bf2703529a https://git.kernel.org/stable/c/d32c6e09f7c4bec3ebc4941323f0aa6366bc1487 https://git.kernel.org/stable/c/ff91cc12faf798f573dab2abc976c1d5b1862fea https://git.kernel.org/stable/c/050bf3c793a07f96bd1e2fd62e1447f731ed733b