Re: [RFC PATCH 2/2] kexec, KEYS: Make use of platform keyring for signature verify

2019-01-15 Thread nayna
> Personally I would like to see platform key separated from integrity. > > > But for the kexec_file part I think it is good at least it works with > > > this fix. > > > > > > Acked-by: Dave Young > > > > The original "platform" keyring

Re: [PATCH v4 1/2] integrity, KEYS: add a reference to platform keyring

2019-01-18 Thread Nayna
key_perm_t perm, keyring[id] = NULL; } +#ifdef CONFIG_INTEGRITY_PLATFORM_KEYRING + if (id == INTEGRITY_KEYRING_PLATFORM) { Shouldn't it also check that keyring[id] is not NULL ? Thanks & Regards,     - Nayna + set_platform

Re: [PATCH v2 0/6] KEXEC_SIG with appended signature

2021-12-08 Thread Nayna
h while posting the patches ? Secondly, I see that you add the powerpc support in Patch 2 and then modify it again in Patch 5 after cleanup. Why not add the support for powerpc after the clean up ? This will reduce some rework and also probably simplify patches. Thanks & Reg

Re: [PATCH v2 2/6] powerpc/kexec_file: Add KEXEC_SIG support.

2021-12-09 Thread Nayna
On 12/9/21 04:21, Michal Suchánek wrote: Hello, Hi, On Wed, Dec 08, 2021 at 08:51:47PM -0500, Nayna wrote: On 11/25/21 13:02, Michal Suchanek wrote: Copy the code from s390x Signed-off-by: Michal Suchanek --- arch/powerpc/Kconfig| 11 +++ arch/powerpc/kexec/elf_64.c

Re: [PATCH v2 2/6] powerpc/kexec_file: Add KEXEC_SIG support.

2021-12-12 Thread Nayna
d kernel image signature and additionally includes both the signed and unsigned file hashes in the IMA measurement list, extends the IMA PCR in the TPM, and prevents blacklisted binary kernel images from being kexec'd." Thanks & Regards,     - Nayna __

[PATCH v5 2/5] ima: prevent kexec_load syscall based on runtime secureboot flag

2018-10-05 Thread Nayna Jain
From: Nayna Jain When CONFIG_KEXEC_VERIFY_SIG is enabled, the kexec_file_load syscall requires the kexec'd kernel image to be signed. Distros are concerned about totally disabling the kexec_load syscall. As a compromise, the kexec_load syscall will only be disabled when CONFIG_KEXEC_VERIF

[PATCH v5 1/5] x86/ima: define arch_ima_get_secureboot

2018-10-05 Thread Nayna Jain
From: Nayna Jain Distros are concerned about totally disabling the kexec_load syscall. As a compromise, the kexec_load syscall will only be disabled when CONFIG_KEXEC_VERIFY_SIG is configured and the system is booted with secureboot enabled. This patch defines the new arch specific function

[PATCH v5 0/6] Add support for architecture specific IMA policies

2018-10-05 Thread Nayna Jain
From: Nayna Jain The architecture specific policy, introduced in this patch set, permits different architectures to define IMA policy rules based on kernel configuration and system runtime information. For example, on x86, there are two methods of verifying the kexec'ed kernel image sign

[PATCH v5 3/5] ima: refactor ima_init_policy()

2018-10-05 Thread Nayna Jain
From: Nayna Jain This patch removes the code duplication in ima_init_policy() by defining a new function named add_rules(). The new function adds the rules to the initial IMA policy, the custom policy or both based on the policy mask (IMA_DEFAULT_POLICY, IMA_CUSTOM_POLICY). Signed-off-by: Nayna

[PATCH v5 4/5] ima: add support for arch specific policies

2018-10-05 Thread Nayna Jain
From: Nayna Jain Builtin IMA policies can be enabled on the boot command line, and replaced with a custom policy, normally during early boot in the initramfs. Build time IMA policy rules were recently added. These rules are automatically enabled on boot and persist after loading a custom policy

[PATCH v5 5/5] x86/ima: define arch_get_ima_policy() for x86

2018-10-05 Thread Nayna Jain
oved the policy KEXEC_ORIG_KERNEL_CHECK which was defined to disable the kexec_load syscall. - arch_get_ima_policy() uses arch_ima_get_secureboot() to get secureboot state Signed-off-by: Nayna Jain --- arch/x86/kernel/ima_arch.c | 18 ++ include/linux/ima.h| 4 securit

[PATCH v6 1/5] x86/ima: define arch_ima_get_secureboot

2018-10-09 Thread Nayna Jain
From: Nayna Jain Distros are concerned about totally disabling the kexec_load syscall. As a compromise, the kexec_load syscall will only be disabled when CONFIG_KEXEC_VERIFY_SIG is configured and the system is booted with secureboot enabled. This patch defines the new arch specific function

[PATCH v6 0/6] Add support for architecture specific IMA policies

2018-10-09 Thread Nayna Jain
From: Nayna Jain The architecture specific policy, introduced in this patch set, permits different architectures to define IMA policy rules based on kernel configuration and system runtime information. For example, on x86, there are two methods of verifying the kexec'ed kernel image sign

[PATCH v6 3/5] ima: refactor ima_init_policy()

2018-10-09 Thread Nayna Jain
From: Nayna Jain This patch removes the code duplication in ima_init_policy() by defining a new function named add_rules(). The new function adds the rules to the initial IMA policy, the custom policy or both based on the policy mask (IMA_DEFAULT_POLICY, IMA_CUSTOM_POLICY). Signed-off-by: Nayna

[PATCH v6 2/5] ima: prevent kexec_load syscall based on runtime secureboot flag

2018-10-09 Thread Nayna Jain
From: Nayna Jain When CONFIG_KEXEC_VERIFY_SIG is enabled, the kexec_file_load syscall requires the kexec'd kernel image to be signed. Distros are concerned about totally disabling the kexec_load syscall. As a compromise, the kexec_load syscall will only be disabled when CONFIG_KEXEC_VERIF

[PATCH v6 4/5] ima: add support for arch specific policies

2018-10-09 Thread Nayna Jain
From: Nayna Jain Builtin IMA policies can be enabled on the boot command line, and replaced with a custom policy, normally during early boot in the initramfs. Build time IMA policy rules were recently added. These rules are automatically enabled on boot and persist after loading a custom policy

[PATCH v6 5/5] x86/ima: define arch_get_ima_policy() for x86

2018-10-09 Thread Nayna Jain
oved the policy KEXEC_ORIG_KERNEL_CHECK which was defined to disable the kexec_load syscall. - arch_get_ima_policy() uses arch_ima_get_secureboot() to get secureboot state Signed-off-by: Nayna Jain Cc: David Howells Cc: Eric Biederman Cc: Peter Jones Cc: Vivek Goyal Cc: Dave Young --- arch/x86/ke

[PATCH 5/7] efi: Import certificates from UEFI Secure Boot

2018-11-25 Thread Nayna Jain
x' variable. We load those certificates into the newly introduced system blacklist keyring and forbid any module signed with those from loading and forbid the use within the kernel of any key with a matching hash. This facility is enabled by setting CONFIG_LOAD_UEFI_KEYS. Signed-off-b

[PATCH 4/7] efi: Add an EFI signature blob parser

2018-11-25 Thread Nayna Jain
Howells Signed-off-by: Nayna Jain --- Changelog: v0: - removed the CONFIG EFI_SIGNATURE_LIST_PARSER - moved efi_parser.c from certs to security/integrity/platform_certs directory include/linux/efi.h| 9 ++ security/integrity/Makefile| 3

[PATCH 1/7] integrity: Define a trusted platform keyring

2018-11-25 Thread Nayna Jain
e used to facilitate signature verification during kexec. Since the scope of this keyring is only the platform/firmware keys, it cannot be updated from userspace. This keyring can be enabled by setting CONFIG_INTEGRITY_PLATFORM_KEYRING. Signed-off-by: Nayna Jain Reviewed-by: Mimi Zohar --- securi

[PATCH 6/7] efi: Allow the "db" UEFI variable to be suppressed

2018-11-25 Thread Nayna Jain
: David Howells Acked-by: Nayna Jain --- Changelog: v0: - No changes security/integrity/platform_certs/load_uefi.c | 44 +-- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs

[PATCH 0/7] add platform/firmware keys support for kernel verification by IMA

2018-11-25 Thread Nayna Jain
Dave Howells (2): efi: Add EFI signature data types efi: Add an EFI signature blob parser Josh Boyer (2): efi: Import certificates from UEFI Secure Boot efi: Allow the "db" UEFI variable to be suppressed Nayna Jain (3): integrity: define a trusted platform keyring integ

[PATCH 2/7] integrity: Load certs to the platform keyring

2018-11-25 Thread Nayna Jain
The patch refactors integrity_load_x509(), making it a wrapper for a new function named integrity_add_key(). This patch also defines a new function named integrity_load_cert() for loading the platform keys. Signed-off-by: Nayna Jain Reviewed-by: Mimi Zohar --- security/integrity/digsig.c

[PATCH 3/7] efi: Add EFI signature data types

2018-11-25 Thread Nayna Jain
From: Dave Howells Add the data types that are used for containing hashes, keys and certificates for cryptographic verification along with their corresponding type GUIDs. Signed-off-by: David Howells Acked-by: Nayna Jain --- Changelog: v0: - No changes include/linux/efi.h | 25

[PATCH 7/7] ima: Support platform keyring for kernel appraisal

2018-11-25 Thread Nayna Jain
-appraisal access to those original keys, now loaded on the platform keyring, needed for verifying the kernel image and initramfs signatures. Signed-off-by: Nayna Jain Reviewed-by: Mimi Zohar --- security/integrity/ima/ima_appraise.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion

[PATCH v2 0/7] add platform/firmware keys support for kernel verification by IMA

2018-12-08 Thread Nayna Jain
ob parser Josh Boyer (2): efi: Import certificates from UEFI Secure Boot efi: Allow the "db" UEFI variable to be suppressed Nayna Jain (3): integrity: Define a trusted platform keyring integrity: Load certs to the platform keyring ima: Support platform

[PATCH v2 5/7] efi: Import certificates from UEFI Secure Boot

2018-12-08 Thread Nayna Jain
x' variable. We load those certificates into the newly introduced system blacklist keyring and forbid any module signed with those from loading and forbid the use within the kernel of any key with a matching hash. This facility is enabled by setting CONFIG_LOAD_UEFI_KEYS. Signed-off-by: Josh Bo

[PATCH v2 1/7] integrity: Define a trusted platform keyring

2018-12-08 Thread Nayna Jain
e used to facilitate signature verification during kexec. Since the scope of this keyring is only the platform/firmware keys, it cannot be updated from userspace. This keyring can be enabled by setting CONFIG_INTEGRITY_PLATFORM_KEYRING. Signed-off-by: Nayna Jain Reviewed-by: Mimi Zohar Acked-by: Serge H

[PATCH v2 4/7] efi: Add an EFI signature blob parser

2018-12-08 Thread Nayna Jain
Howells Signed-off-by: Nayna Jain Acked-by: Serge Hallyn --- Changelog: v0: - removed the CONFIG EFI_SIGNATURE_LIST_PARSER - moved efi_parser.c from certs to security/integrity/platform_certs directory v2: - Fixed the checkpatch.pl warnings include/linux/efi.h

[PATCH v2 7/7] ima: Support platform keyring for kernel appraisal

2018-12-08 Thread Nayna Jain
-appraisal access to those original keys, now loaded on the platform keyring, needed for verifying the kernel image and initramfs signatures. Signed-off-by: Nayna Jain Reviewed-by: Mimi Zohar Acked-by: Serge Hallyn - replace 'rc' with 'xattr_len' when calling integrity_

[PATCH v2 6/7] efi: Allow the "db" UEFI variable to be suppressed

2018-12-08 Thread Nayna Jain
: David Howells Acked-by: Nayna Jain Acked-by: Serge Hallyn --- Changelog: v0: - No changes v2: - Fixed the checkpatch.pl warnings security/integrity/platform_certs/load_uefi.c | 45 +-- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/security/integrity

[PATCH v2 3/7] efi: Add EFI signature data types

2018-12-08 Thread Nayna Jain
From: Dave Howells Add the data types that are used for containing hashes, keys and certificates for cryptographic verification along with their corresponding type GUIDs. Signed-off-by: David Howells Acked-by: Nayna Jain Acked-by: Serge Hallyn --- Changelog: v0: - No changes include/linux

[PATCH v2 2/7] integrity: Load certs to the platform keyring

2018-12-08 Thread Nayna Jain
The patch refactors integrity_load_x509(), making it a wrapper for a new function named integrity_add_key(). This patch also defines a new function named integrity_load_cert() for loading the platform keys. Signed-off-by: Nayna Jain Reviewed-by: Mimi Zohar Acked-by: Serge Hallyn --- security

[PATCH v2 1/7] integrity: Define a trusted platform keyring

2018-12-08 Thread Nayna Jain
e used to facilitate signature verification during kexec. Since the scope of this keyring is only the platform/firmware keys, it cannot be updated from userspace. This keyring can be enabled by setting CONFIG_INTEGRITY_PLATFORM_KEYRING. Signed-off-by: Nayna Jain Reviewed-by: Mimi Zohar Acked-by: Serge H

Re: [PATCH v2 5/7] efi: Import certificates from UEFI Secure Boot

2018-12-12 Thread Nayna Jain
On 12/12/2018 12:17 AM, James Morris wrote: On Sun, 9 Dec 2018, Nayna Jain wrote: +/* + * Blacklist an X509 TBS hash. + */ +static __init void uefi_blacklist_x509_tbs(const char *source, + const void *data, size_t len) +{ + char *hash, *p

[PATCH v2a 5/7] efi: Import certificates from UEFI Secure Boot

2018-12-12 Thread Nayna Jain
Boyer Signed-off-by: David Howells Signed-off-by: Nayna Jain Acked-by: Serge Hallyn Signed-off-by: Mimi Zohar --- Changelog: v2a: - refactored uefi_blacklist_x509_tbs() and uefi_blacklist_binary() v2: - Fixed the checkpatch.pl warnings v0: - This patch replaces the loading of certificate