linux_dsm_epyc7002/security/integrity/ima
Matthew Garrett d906c10d8a IMA: Support using new creds in appraisal policy
The existing BPRM_CHECK functionality in IMA validates against the
credentials of the existing process, not any new credentials that the
child process may transition to. Add an additional CREDS_CHECK target
and refactor IMA to pass the appropriate creds structure. In
ima_bprm_check(), check with both the existing process credentials and
the credentials that will be committed when the new process is started.
This will not change behaviour unless the system policy is extended to
include CREDS_CHECK targets - BPRM_CHECK will continue to check the same
credentials that it did previously.

After this patch, an IMA policy rule along the lines of:

measure func=CREDS_CHECK subj_type=unconfined_t

will trigger if a process is executed and runs as unconfined_t, ignoring
the context of the parent process. This is in contrast to:

measure func=BPRM_CHECK subj_type=unconfined_t

which will trigger if the process that calls exec() is already executing
in unconfined_t, ignoring the context that the child process executes
into.

Signed-off-by: Matthew Garrett <mjg59@google.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>

Changelog:
- initialize ima_creds_status
2018-03-23 06:31:11 -04:00
..
ima_api.c IMA: Support using new creds in appraisal policy 2018-03-23 06:31:11 -04:00
ima_appraise.c IMA: Support using new creds in appraisal policy 2018-03-23 06:31:11 -04:00
ima_crypto.c tpm: use struct tpm_chip for tpm_chip_find_get() 2018-01-08 12:58:36 +02:00
ima_fs.c ima: Fix bool initialization/comparison 2017-11-08 15:16:36 -05:00
ima_init.c tpm: use struct tpm_chip for tpm_chip_find_get() 2018-01-08 12:58:36 +02:00
ima_kexec.c
ima_main.c IMA: Support using new creds in appraisal policy 2018-03-23 06:31:11 -04:00
ima_mok.c
ima_policy.c IMA: Support using new creds in appraisal policy 2018-03-23 06:31:11 -04:00
ima_queue.c tpm: use struct tpm_chip for tpm_chip_find_get() 2018-01-08 12:58:36 +02:00
ima_template_lib.c ima: introduce ima_parse_buf() 2017-06-21 14:37:12 -04:00
ima_template_lib.h ima: introduce ima_parse_buf() 2017-06-21 14:37:12 -04:00
ima_template.c ima: Fix line continuation format 2017-12-18 09:43:47 -05:00
ima.h IMA: Support using new creds in appraisal policy 2018-03-23 06:31:11 -04:00
Kconfig IMA: Correct Kconfig dependencies for hash selection 2017-06-21 14:37:12 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00