Thread (18 messages) 18 messages, 4 authors, 2023-08-16

Re: [PATCH v4 2/6] integrity: ignore keys failing CA restrictions on non-UEFI platform

From: R Nageswara Sastry <hidden>
Date: 2023-08-16 14:43:35
Also in: linux-integrity, linuxppc-dev


On 15/08/23 4:57 pm, 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 [off-list ref]
Acked-by: Jarkko Sakkinen <jarkko@kernel.org>

Tested with trustedcadb, moduledb scenarios
Tested-by: Nageswara R Sastry <redacted>
quoted hunk ↗ jump to hunk
---
  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);
  
-- 
Thanks and Regards
R.Nageswara Sastry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help