Message ID | 20230813021531.1382815-3-nayna@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp2008485vqi; Sat, 12 Aug 2023 20:42:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGmbT0Be+/Ya7JiZ4pvnli8IwXpGIxYoPaXQ+8AJi4OwVFBi2i99mn2jTGwBWI/tBaQH4dm X-Received: by 2002:aa7:c2d3:0:b0:523:4996:a4f9 with SMTP id m19-20020aa7c2d3000000b005234996a4f9mr4590742edp.34.1691898131199; Sat, 12 Aug 2023 20:42:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691898131; cv=none; d=google.com; s=arc-20160816; b=oqgBe31EMgPFwxJLZ6IjITBxq7wOTaWrfCuwjqJobOYPdjjgMrLrmaDK1nB2AWRd4H Mi9thMgazihU3FgUuBqkUc4uE+OjntAK/KfjRtn9vPuJCjxjIOokAcYPEnr00k3chLKX s8d9zBDW8GneqyEW6a0YZv/lKqgC41QG+KZD7RpciSEhin6UfAYQ2QCnbqbCqdtICWKm HY0kxXYw2geFBxFTpCvZmIs+wz4b1V7KGRIkb25xbA6VHe9Ek0eRNGXj+gFFtSXNWtRW eQrg77uluY7XsctP/J54ZAdJe9BkrER5U37iU9tBSHEtx5ecFLuMCrJEDqiYlHP26qir 6tZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+Ki1oKIwDxjtgyY+7vdefE9L5j5AW/bixMirZNbv5xM=; fh=0HZxfkAJyx3Soo8VtDkZ0DPjkqS1NGJP1dkSl6x0XCg=; b=WB/MlwfGw8O7Yoo8gp5lit77ZaGjBP1Cs1LILA4JysEI15vZiCR7JypacsyVsXNruL DHbQYrEHe0TwIrMZk6QA3lz6F0tdcd6Y4vf7Y5Kbp8Rc8zF/kR2VQRqGwM3+w40ULqw2 aLKb6q7D8E2wG4ttNS7yAuMKeO4557ZgoElhoBTZ6pI2QQ4rlBYY2WlBdBswz8HEWl0F gXWfwq8oD9xjMKiUOlDdFw3hShqGU5cQCaLslEM/YOYWMblMZWYKNXWK/oXAMq+2cQoo IH7EgPTbyvf69ibh11i6d1brZ7pQZFGBlGEUH0tzyv1W3lEqZlO9tTpdyWiGMj9xXmsi 6uJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ZvjUsqPb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z6-20020aa7cf86000000b0052275937198si5648933edx.628.2023.08.12.20.41.33; Sat, 12 Aug 2023 20:42:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ZvjUsqPb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230245AbjHMCQF (ORCPT <rfc822;shaohuahua6@gmail.com> + 99 others); Sat, 12 Aug 2023 22:16:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbjHMCP7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 12 Aug 2023 22:15:59 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A480D7; Sat, 12 Aug 2023 19:16:02 -0700 (PDT) Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37D26frd006382; Sun, 13 Aug 2023 02:15:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=+Ki1oKIwDxjtgyY+7vdefE9L5j5AW/bixMirZNbv5xM=; b=ZvjUsqPb1P7t4n9Na9JpD/dIC8opKoZDsGPu7gATYUcBLXq/z93zoAecqipGkipIaI8w wgU1XZGCYXmPkvbDdlH4ztxpsLTq802IZ5Avoj35J88m4Zh1AMU0GCDFCdMGzhrYC4P/ krDX+YUXfsLZ4IDWnEpsOy3dKouZ1c420LYvePQa7JXBg+S8b9gHoXNJEiX6l8JgqXj4 AqbcNAN25B3UIf4RsazNba81DNWSW3SZ+WpKIAHQb7N5k12Ytc9PlxZRuvGmJcj7nWYs LkAaicEH7OR+gBAuKtiS5sCiRYIUrZMnBqzJWhvgE8ovlgJj0vKDGQsUvZh7jo/lOnvI iQ== Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3senyj0ag4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 13 Aug 2023 02:15:48 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 37D1GYBx017899; Sun, 13 Aug 2023 02:15:47 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3se376qb3g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 13 Aug 2023 02:15:47 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 37D2Fi1x21037618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 13 Aug 2023 02:15:45 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D43AA2004B; Sun, 13 Aug 2023 02:15:44 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C328620040; Sun, 13 Aug 2023 02:15:42 +0000 (GMT) Received: from li-4b5937cc-25c4-11b2-a85c-cea3a66903e4.ibm.com (unknown [9.61.3.84]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Sun, 13 Aug 2023 02:15:42 +0000 (GMT) From: Nayna Jain <nayna@linux.ibm.com> To: linux-integrity@vger.kernel.org Cc: Mimi Zohar <zohar@linux.ibm.com>, Jarkko Sakkinen <jarkko@kernel.org>, Eric Snowberg <eric.snowberg@oracle.com>, Paul Moore <paul@paul-moore.com>, linux-security-module@vger.kernel.org, linuxppc-dev <linuxppc-dev@lists.ozlabs.org>, linux-kernel@vger.kernel.org, Nayna Jain <nayna@linux.ibm.com> Subject: [PATCH v3 2/6] integrity: ignore keys failing CA restrictions on non-UEFI platform Date: Sat, 12 Aug 2023 22:15:27 -0400 Message-Id: <20230813021531.1382815-3-nayna@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20230813021531.1382815-1-nayna@linux.ibm.com> References: <20230813021531.1382815-1-nayna@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 49hTOhTodGLnNVQfdBd1ia4D0jdHCKer X-Proofpoint-GUID: 49hTOhTodGLnNVQfdBd1ia4D0jdHCKer X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-12_27,2023-08-10_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 malwarescore=0 phishscore=0 impostorscore=0 adultscore=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308130016 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774083774802525550 X-GMAIL-MSGID: 1774083774802525550 |
Series |
Enable loading local and third party keys on PowerVM guest
|
|
Commit Message
Nayna Jain
Aug. 13, 2023, 2:15 a.m. UTC
On non-UEFI platforms, handle restrict_link_by_ca failures differently.
Certificates which do not satisfy CA restrictions on non-UEFI platforms
are ignored.
Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
Reviewed-and-tested-by: Mimi Zohar <zohar@linux.ibm.com>
---
security/integrity/platform_certs/machine_keyring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Sun Aug 13, 2023 at 5:15 AM EEST, Nayna Jain wrote: > On non-UEFI platforms, handle restrict_link_by_ca failures differently. > > Certificates which do not satisfy CA restrictions on non-UEFI platforms > are ignored. > > Signed-off-by: Nayna Jain <nayna@linux.ibm.com> > Reviewed-and-tested-by: Mimi Zohar <zohar@linux.ibm.com> > --- > security/integrity/platform_certs/machine_keyring.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/security/integrity/platform_certs/machine_keyring.c b/security/integrity/platform_certs/machine_keyring.c > index 7aaed7950b6e..389a6e7c9245 100644 > --- a/security/integrity/platform_certs/machine_keyring.c > +++ b/security/integrity/platform_certs/machine_keyring.c > @@ -36,7 +36,7 @@ void __init add_to_machine_keyring(const char *source, const void *data, size_t > * If the restriction check does not pass and the platform keyring > * is configured, try to add it into that keyring instead. > */ > - if (rc && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) > + if (rc && efi_enabled(EFI_BOOT) && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) > rc = integrity_load_cert(INTEGRITY_KEYRING_PLATFORM, source, > data, len, perm); > > -- > 2.31.1 Acked-by: Jarkko Sakkinen <jarkko@kernel.org> BR, Jarkko
On Wed Aug 16, 2023 at 3:58 PM EEST, Mimi Zohar wrote: > On Mon, 2023-08-14 at 20:38 +0300, Jarkko Sakkinen wrote: > > On Sun Aug 13, 2023 at 5:15 AM EEST, Nayna Jain wrote: > > > On non-UEFI platforms, handle restrict_link_by_ca failures differently. > > > > > > Certificates which do not satisfy CA restrictions on non-UEFI platforms > > > are ignored. > > > > > > Signed-off-by: Nayna Jain <nayna@linux.ibm.com> > > > Reviewed-and-tested-by: Mimi Zohar <zohar@linux.ibm.com> > > > --- > > > security/integrity/platform_certs/machine_keyring.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/security/integrity/platform_certs/machine_keyring.c b/security/integrity/platform_certs/machine_keyring.c > > > index 7aaed7950b6e..389a6e7c9245 100644 > > > --- a/security/integrity/platform_certs/machine_keyring.c > > > +++ b/security/integrity/platform_certs/machine_keyring.c > > > @@ -36,7 +36,7 @@ void __init add_to_machine_keyring(const char *source, const void *data, size_t > > > * If the restriction check does not pass and the platform keyring > > > * is configured, try to add it into that keyring instead. > > > */ > > > - if (rc && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) > > > + if (rc && efi_enabled(EFI_BOOT) && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) > > > rc = integrity_load_cert(INTEGRITY_KEYRING_PLATFORM, source, > > > data, len, perm); > > > > > > -- > > > 2.31.1 > > > > Acked-by: Jarkko Sakkinen <jarkko@kernel.org> > > Hi Jarkko, > > Without the following two commits in your master branch, the last patch > in this series "[PATCH v4 6/6] integrity: PowerVM support for loading > third party code signing keys" doesn't apply cleanly. > > - commit 409b465f8a83 ("integrity: Enforce digitalSignature usage in > the ima and evm keyrings") > - commit e34a6c7dd192 ("KEYS: DigitalSignature link restriction") > > If you're not planning on upstreaming this patch set, I'd appreciate > your creating a topic branch with these two commits. They reside now in my -next. I'll send PR for the next release Fri. > -- > thanks, > > Mimi BR, Jarkko
diff --git a/security/integrity/platform_certs/machine_keyring.c b/security/integrity/platform_certs/machine_keyring.c index 7aaed7950b6e..389a6e7c9245 100644 --- a/security/integrity/platform_certs/machine_keyring.c +++ b/security/integrity/platform_certs/machine_keyring.c @@ -36,7 +36,7 @@ void __init add_to_machine_keyring(const char *source, const void *data, size_t * If the restriction check does not pass and the platform keyring * is configured, try to add it into that keyring instead. */ - if (rc && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) + if (rc && efi_enabled(EFI_BOOT) && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) rc = integrity_load_cert(INTEGRITY_KEYRING_PLATFORM, source, data, len, perm);