linux/security/integrity/ima
Roberto Sassu 7aa5783d95 ima: Allow imasig requirement to be satisfied by EVM portable signatures
System administrators can require that all accessed files have a signature
by specifying appraise_type=imasig in a policy rule.

Currently, IMA signatures satisfy this requirement. Appended signatures may
also satisfy this requirement, but are not applicable as IMA signatures.
IMA/appended signatures ensure data source authentication for file content
and prevent any change. EVM signatures instead ensure data source
authentication for file metadata. Given that the digest or signature of the
file content must be included in the metadata, EVM signatures provide the
same file data guarantees of IMA signatures, as well as providing file
metadata guarantees.

This patch lets systems protected with EVM signatures pass appraisal
verification if the appraise_type=imasig requirement is specified in the
policy. This facilitates deployment in the scenarios where only EVM
signatures are available.

The patch makes the following changes:

file xattr types:
security.ima: IMA_XATTR_DIGEST/IMA_XATTR_DIGEST_NG
security.evm: EVM_XATTR_PORTABLE_DIGSIG

execve(), mmap(), open() behavior (with appraise_type=imasig):
before: denied (file without IMA signature, imasig requirement not met)
after: allowed (file with EVM portable signature, imasig requirement met)

open(O_WRONLY) behavior (without appraise_type=imasig):
before: allowed (file without IMA signature, not immutable)
after: denied (file with EVM portable signature, immutable)

In addition, similarly to IMA signatures, this patch temporarily allows
new files without or with incomplete metadata to be opened so that content
can be written.

Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2021-06-01 12:30:51 -04:00
..
ima_api.c idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
ima_appraise.c ima: Allow imasig requirement to be satisfied by EVM portable signatures 2021-06-01 12:30:51 -04:00
ima_asymmetric_keys.c idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
ima_crypto.c ima: Don't modify file descriptor mode on the fly 2020-11-29 07:02:53 -05:00
ima_efi.c ima: generalize x86/EFI arch glue for other EFI architectures 2020-11-06 07:40:42 +01:00
ima_fs.c fs/kernel_file_read: Add "offset" arg for partial reads 2020-10-05 13:37:04 +02:00
ima_init.c evm: Load EVM key in ima_load_x509() to avoid appraisal 2021-05-21 12:47:04 -04:00
ima_kexec.c powerpc: Move arch independent ima kexec functions to drivers/of/kexec.c 2021-03-08 12:06:29 -07:00
ima_main.c integrity-v5.13 2021-05-01 15:32:18 -07:00
ima_modsig.c ima: Move comprehensive rule validation checks out of the token parser 2020-07-20 13:28:15 -04:00
ima_mok.c certs: Fix blacklist flag type confusion 2021-01-21 16:16:10 +00:00
ima_policy.c ima: Fix fall-through warnings for Clang 2021-04-20 16:54:14 -04:00
ima_queue_keys.c idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
ima_queue.c ima: Remove semicolon at the end of ima_get_binary_runtime_size() 2020-09-15 13:47:41 -04:00
ima_template_lib.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ima_template_lib.h Replace HTTP links with HTTPS ones: security 2020-08-06 12:00:05 -07:00
ima_template.c ima: Fix the error code for restoring the PCR value 2021-03-24 07:14:53 -04:00
ima.h powerpc: Move arch independent ima kexec functions to drivers/of/kexec.c 2021-03-08 12:06:29 -07:00
Kconfig Minor fixes for v5.9. 2020-08-11 14:30:36 -07:00
Makefile ima: generalize x86/EFI arch glue for other EFI architectures 2020-11-06 07:40:42 +01:00