All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org, Nayna Jain <nayna@linux.ibm.com>
Subject: [PATCH 2/6] integrity: ignore keys failing CA restrictions on non-UEFI platform
Date: Fri, 14 Jul 2023 11:34:31 -0400	[thread overview]
Message-ID: <20230714153435.28155-3-nayna@linux.ibm.com> (raw)
In-Reply-To: <20230714153435.28155-1-nayna@linux.ibm.com>

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>
---
 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


WARNING: multiple messages have this Message-ID (diff)
From: Nayna Jain <nayna@linux.ibm.com>
To: linux-integrity@vger.kernel.org
Cc: Eric Snowberg <eric.snowberg@oracle.com>,
	Paul Moore <paul@paul-moore.com>,
	Nayna Jain <nayna@linux.ibm.com>,
	linux-security-module@vger.kernel.org,
	Mimi Zohar <zohar@linux.ibm.com>,
	linux-kernel@vger.kernel.org, Jarkko Sakkinen <jarkko@kernel.org>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: [PATCH 2/6] integrity: ignore keys failing CA restrictions on non-UEFI platform
Date: Fri, 14 Jul 2023 11:34:31 -0400	[thread overview]
Message-ID: <20230714153435.28155-3-nayna@linux.ibm.com> (raw)
In-Reply-To: <20230714153435.28155-1-nayna@linux.ibm.com>

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>
---
 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


  parent reply	other threads:[~2023-07-14 15:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14 15:34 [PATCH 0/6] Enable loading local and third party keys on PowerVM guest Nayna Jain
2023-07-14 15:34 ` Nayna Jain
2023-07-14 15:34 ` [PATCH 1/6] integrity: PowerVM support for loading CA keys on machine keyring Nayna Jain
2023-07-14 15:34   ` Nayna Jain
2023-08-02 22:58   ` Mimi Zohar
2023-08-02 22:58     ` Mimi Zohar
2023-07-14 15:34 ` Nayna Jain [this message]
2023-07-14 15:34   ` [PATCH 2/6] integrity: ignore keys failing CA restrictions on non-UEFI platform Nayna Jain
2023-08-02 22:59   ` Mimi Zohar
2023-08-02 22:59     ` Mimi Zohar
2023-07-14 15:34 ` [PATCH 3/6] integrity: remove global variable from machine_keyring.c Nayna Jain
2023-07-14 15:34   ` Nayna Jain
2023-08-02 22:58   ` Mimi Zohar
2023-08-02 22:58     ` Mimi Zohar
2023-07-14 15:34 ` [PATCH 4/6] integrity: check whether imputed trust is enabled Nayna Jain
2023-07-14 15:34   ` Nayna Jain
2023-08-02 22:59   ` Mimi Zohar
2023-08-02 22:59     ` Mimi Zohar
2023-07-14 15:34 ` [PATCH 5/6] integrity: PowerVM machine keyring enablement Nayna Jain
2023-07-14 15:34   ` Nayna Jain
2023-08-02 22:59   ` Mimi Zohar
2023-08-02 22:59     ` Mimi Zohar
2023-07-14 15:34 ` [PATCH 6/6] integrity: PowerVM support for loading third party code signing keys Nayna Jain
2023-07-14 15:34   ` Nayna Jain
2023-08-02 22:58 ` [PATCH 0/6] Enable loading local and third party keys on PowerVM guest Mimi Zohar
2023-08-02 22:58   ` Mimi Zohar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230714153435.28155-3-nayna@linux.ibm.com \
    --to=nayna@linux.ibm.com \
    --cc=eric.snowberg@oracle.com \
    --cc=jarkko@kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paul@paul-moore.com \
    --cc=zohar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.