From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 88836C32771 for ; Fri, 19 Aug 2022 14:42:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:From:Cc:To :Subject:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=VmSmJThNySYcB6R3dj8faHTAxZEXpMfYqnm8jUrAepY=; b=LZo7Dren6ojDXW 4HYynjQ6im6a4gyKih02jMj/s3fRjCtbXiGVbDzehTOiprNLYKnxQZeV/dmXK1v4STnhBx7zMlwX8 NQPQGWzuqeMUMYmAPC3pB+U3payUVKvrWa53+nscyk7PtHV76Ln3mS2DBOviY4CQORXODQRW/Lon7 wt0CtYEw6S0jOxtDKp6z+xnpJygpWF3oaFK/qNcihcLnk+3K30x+tuxJGSnKqiSlaH3V5v6aILbnq 3df5QWF2Oh9q2Uap/VG1PiFkuFwXYrlgXl4MBTMEw9yg87Sk8CLqYMo39VqU7UhJFvZtj0UlyRuMW bMrHNRn9ykIRZBbOjcNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oP3Cn-009anl-N9; Fri, 19 Aug 2022 14:42:37 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oP3Ck-009alM-V6 for kexec@lists.infradead.org; Fri, 19 Aug 2022 14:42:36 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CB2686143D; Fri, 19 Aug 2022 14:42:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99182C433D6; Fri, 19 Aug 2022 14:42:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660920151; bh=oHGL3T+eMa7pw8xgXMSZkHc8SN9Aur8c1PIVM35uBkQ=; h=Subject:To:Cc:From:Date:From; b=Ky6VetIGgfbgs2YCSFStDFmNiEBd1OBOSa1+eu3IcW8lKIODFOzZK8R7qwRoT2nEN rylP4vt5rXxZC/sclBl3IZ+qLcmg4qLTJvhP9oawlgXZS1oXiRPCV8yLuW5WE4zTYf ACw4kNRSaUrOa9AQtXetgHhrCXOYtq8e5vbjfcUQ= Subject: Patch "arm64: kexec_file: use more system keyrings to verify kernel image signature" has been added to the 5.19-stable tree To: bhe@redhat.com,coxu@redhat.com,gregkh@linuxfoundation.org,kexec@lists.infradead.org,msuchanek@suse.de,will@kernel.org,zohar@linux.ibm.com Cc: From: Date: Fri, 19 Aug 2022 16:42:28 +0200 Message-ID: <166092014840107@kroah.com> MIME-Version: 1.0 X-stable: commit X-Patchwork-Hint: ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220819_074235_132053_15823418 X-CRM114-Status: GOOD ( 17.26 ) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+kexec=archiver.kernel.org@lists.infradead.org This is a note to let you know that I've just added the patch titled arm64: kexec_file: use more system keyrings to verify kernel image signature to the 5.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: arm64-kexec_file-use-more-system-keyrings-to-verify-kernel-image-signature.patch and it can be found in the queue-5.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From 0d519cadf75184a24313568e7f489a7fc9b1be3b Mon Sep 17 00:00:00 2001 From: Coiby Xu Date: Thu, 14 Jul 2022 21:40:26 +0800 Subject: arm64: kexec_file: use more system keyrings to verify kernel image signature From: Coiby Xu commit 0d519cadf75184a24313568e7f489a7fc9b1be3b upstream. Currently, when loading a kernel image via the kexec_file_load() system call, arm64 can only use the .builtin_trusted_keys keyring to verify a signature whereas x86 can use three more keyrings i.e. .secondary_trusted_keys, .machine and .platform keyrings. For example, one resulting problem is kexec'ing a kernel image would be rejected with the error "Lockdown: kexec: kexec of unsigned images is restricted; see man kernel_lockdown.7". This patch set enables arm64 to make use of the same keyrings as x86 to verify the signature kexec'ed kernel image. Fixes: 732b7b93d849 ("arm64: kexec_file: add kernel signature verification support") Cc: stable@vger.kernel.org # 105e10e2cf1c: kexec_file: drop weak attribute from functions Cc: stable@vger.kernel.org # 34d5960af253: kexec: clean up arch_kexec_kernel_verify_sig Cc: stable@vger.kernel.org # 83b7bb2d49ae: kexec, KEYS: make the code in bzImage64_verify_sig generic Acked-by: Baoquan He Cc: kexec@lists.infradead.org Cc: keyrings@vger.kernel.org Cc: linux-security-module@vger.kernel.org Co-developed-by: Michal Suchanek Signed-off-by: Michal Suchanek Acked-by: Will Deacon Signed-off-by: Coiby Xu Signed-off-by: Mimi Zohar Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/kexec_image.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) --- a/arch/arm64/kernel/kexec_image.c +++ b/arch/arm64/kernel/kexec_image.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -130,18 +129,10 @@ static void *image_load(struct kimage *i return NULL; } -#ifdef CONFIG_KEXEC_IMAGE_VERIFY_SIG -static int image_verify_sig(const char *kernel, unsigned long kernel_len) -{ - return verify_pefile_signature(kernel, kernel_len, NULL, - VERIFYING_KEXEC_PE_SIGNATURE); -} -#endif - const struct kexec_file_ops kexec_image_ops = { .probe = image_probe, .load = image_load, #ifdef CONFIG_KEXEC_IMAGE_VERIFY_SIG - .verify_sig = image_verify_sig, + .verify_sig = kexec_kernel_verify_pe_sig, #endif }; Patches currently in stable-queue which might be from coxu@redhat.com are queue-5.19/arm64-kexec_file-use-more-system-keyrings-to-verify-kernel-image-signature.patch queue-5.19/kexec-keys-make-the-code-in-bzimage64_verify_sig-generic.patch _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec