linux-stable/security/integrity/ima
Prakhar Srivastava 86b4da8c0e IMA: Define a new template field buf
A buffer(kexec boot command line arguments) measured into IMA
measuremnt list cannot be appraised, without already being
aware of the buffer contents. Since hashes are non-reversible,
raw buffer is needed for validation or regenerating hash for
appraisal/attestation.

Add support to store/read the buffer contents in HEX.
The kexec cmdline hash is stored in the "d-ng" field of the
template data.  It can be verified using
sudo cat /sys/kernel/security/integrity/ima/ascii_runtime_measurements |
  grep  kexec-cmdline | cut -d' ' -f 6 | xxd -r -p | sha256sum

- Add two new fields to ima_event_data to hold the buf and
buf_len
- Add a new template field 'buf' to be used to store/read
the buffer data.
- Updated process_buffer_meaurement to add the buffer to
ima_event_data. process_buffer_measurement added in
"Define a new IMA hook to measure the boot command line
 arguments"
- Add a new template policy name ima-buf to represent
'd-ng|n-ng|buf'

Signed-off-by: Prakhar Srivastava <prsriva02@gmail.com>
Reviewed-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2019-06-30 17:53:45 -04:00
..
ima.h IMA: Define a new template field buf 2019-06-30 17:53:45 -04:00
ima_api.c IMA: Define a new hook to measure the kexec boot command line arguments 2019-06-24 08:29:57 -04:00
ima_appraise.c IMA: support for per policy rule template formats 2019-06-19 18:51:01 -04:00
ima_crypto.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
ima_fs.c security: audit and remove any unnecessary uses of module.h 2018-12-12 14:58:51 -08:00
ima_init.c IMA: support for per policy rule template formats 2019-06-19 18:51:01 -04:00
ima_kexec.c mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
ima_main.c IMA: Define a new template field buf 2019-06-30 17:53:45 -04:00
ima_mok.c KEYS: Use structure to capture key restriction function and data 2017-04-04 14:10:10 -07:00
ima_policy.c IMA: Define a new hook to measure the kexec boot command line arguments 2019-06-24 08:29:57 -04:00
ima_queue.c tpm: pass an array of tpm_extend_digest structures to tpm_pcr_extend() 2019-02-13 09:48:52 +02:00
ima_template.c IMA: Define a new template field buf 2019-06-30 17:53:45 -04:00
ima_template_lib.c IMA: Define a new template field buf 2019-06-30 17:53:45 -04:00
ima_template_lib.h IMA: Define a new template field buf 2019-06-30 17:53:45 -04:00
Kconfig x86/ima: fix the Kconfig dependency for IMA_ARCH_POLICY 2019-06-14 08:53:58 -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