From: Mimi Zohar <zohar@linux.vnet.ibm.com> To: linux-security-module <linux-security-module@vger.kernel.org> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>, linux-ima-devel@lists.sourceforge.net, Dave Young <dyoung@redhat.com>, kexec@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>, Andrew Morton <akpm@linux-foundation.org> Subject: [PATHC v2 0/9] ima: carry the measurement list across kexec Date: Tue, 30 Aug 2016 18:40:02 -0400 [thread overview] Message-ID: <1472596811-9596-1-git-send-email-zohar@linux.vnet.ibm.com> (raw) The TPM PCRs are only reset on a hard reboot. In order to validate a TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list of the running kernel must be saved and then restored on the subsequent boot, possibly of a different architecture. The existing securityfs binary_runtime_measurements file conveniently provides a serialized format of the IMA measurement list. This patch set serializes the measurement list in this format and restores it. Up to now, the binary_runtime_measurements was defined as architecture native format. The assumption being that userspace could and would handle any architecture conversions. With the ability of carrying the measurement list across kexec, possibly from one architecture to a different one, the per boot architecture information is lost and with it the ability of recalculating the template digest hash. To resolve this problem, without breaking the existing ABI, this patch set introduces the boot command line option "ima_canonical_fmt", which is arbitrarily defined as little endian. The need for this boot command line option will be limited to the existing version 1 format of the binary_runtime_measurements. Subsequent formats will be defined as canonical format (eg. TPM 2.0 support for larger digests). This patch set pre-req's Thiago Bauermann's "kexec_file: Add buffer hand-over for the next kernel" patch set. These patches can also be found in the next-kexec-restore branch of: git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git Mimi Andreas Steffen (1): ima: platform-independent hash value Mimi Zohar (7): ima: on soft reboot, restore the measurement list ima: permit duplicate measurement list entries ima: maintain memory size needed for serializing the measurement list ima: serialize the binary_runtime_measurements ima: store the builtin/custom template definitions in a list ima: support restoring multiple template formats ima: define a canonical binary_runtime_measurements list format Thiago Jung Bauermann (1): ima: on soft reboot, save the measurement list Documentation/kernel-parameters.txt | 4 + include/linux/ima.h | 12 ++ kernel/kexec_file.c | 4 + security/integrity/ima/Kconfig | 12 ++ security/integrity/ima/Makefile | 1 + security/integrity/ima/ima.h | 28 +++ security/integrity/ima/ima_crypto.c | 6 +- security/integrity/ima/ima_fs.c | 30 +++- security/integrity/ima/ima_init.c | 2 + security/integrity/ima/ima_kexec.c | 201 +++++++++++++++++++++ security/integrity/ima/ima_main.c | 1 + security/integrity/ima/ima_queue.c | 72 +++++++- security/integrity/ima/ima_template.c | 289 ++++++++++++++++++++++++++++-- security/integrity/ima/ima_template_lib.c | 6 +- 14 files changed, 637 insertions(+), 31 deletions(-) create mode 100644 security/integrity/ima/ima_kexec.c -- 2.1.0
WARNING: multiple messages have this Message-ID (diff)
From: Mimi Zohar <zohar@linux.vnet.ibm.com> To: linux-security-module <linux-security-module@vger.kernel.org> Cc: linuxppc-dev@lists.ozlabs.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>, linux-ima-devel@lists.sourceforge.net, Andrew Morton <akpm@linux-foundation.org>, Mimi Zohar <zohar@linux.vnet.ibm.com>, Dave Young <dyoung@redhat.com> Subject: [PATHC v2 0/9] ima: carry the measurement list across kexec Date: Tue, 30 Aug 2016 18:40:02 -0400 [thread overview] Message-ID: <1472596811-9596-1-git-send-email-zohar@linux.vnet.ibm.com> (raw) The TPM PCRs are only reset on a hard reboot. In order to validate a TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list of the running kernel must be saved and then restored on the subsequent boot, possibly of a different architecture. The existing securityfs binary_runtime_measurements file conveniently provides a serialized format of the IMA measurement list. This patch set serializes the measurement list in this format and restores it. Up to now, the binary_runtime_measurements was defined as architecture native format. The assumption being that userspace could and would handle any architecture conversions. With the ability of carrying the measurement list across kexec, possibly from one architecture to a different one, the per boot architecture information is lost and with it the ability of recalculating the template digest hash. To resolve this problem, without breaking the existing ABI, this patch set introduces the boot command line option "ima_canonical_fmt", which is arbitrarily defined as little endian. The need for this boot command line option will be limited to the existing version 1 format of the binary_runtime_measurements. Subsequent formats will be defined as canonical format (eg. TPM 2.0 support for larger digests). This patch set pre-req's Thiago Bauermann's "kexec_file: Add buffer hand-over for the next kernel" patch set. These patches can also be found in the next-kexec-restore branch of: git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git Mimi Andreas Steffen (1): ima: platform-independent hash value Mimi Zohar (7): ima: on soft reboot, restore the measurement list ima: permit duplicate measurement list entries ima: maintain memory size needed for serializing the measurement list ima: serialize the binary_runtime_measurements ima: store the builtin/custom template definitions in a list ima: support restoring multiple template formats ima: define a canonical binary_runtime_measurements list format Thiago Jung Bauermann (1): ima: on soft reboot, save the measurement list Documentation/kernel-parameters.txt | 4 + include/linux/ima.h | 12 ++ kernel/kexec_file.c | 4 + security/integrity/ima/Kconfig | 12 ++ security/integrity/ima/Makefile | 1 + security/integrity/ima/ima.h | 28 +++ security/integrity/ima/ima_crypto.c | 6 +- security/integrity/ima/ima_fs.c | 30 +++- security/integrity/ima/ima_init.c | 2 + security/integrity/ima/ima_kexec.c | 201 +++++++++++++++++++++ security/integrity/ima/ima_main.c | 1 + security/integrity/ima/ima_queue.c | 72 +++++++- security/integrity/ima/ima_template.c | 289 ++++++++++++++++++++++++++++-- security/integrity/ima/ima_template_lib.c | 6 +- 14 files changed, 637 insertions(+), 31 deletions(-) create mode 100644 security/integrity/ima/ima_kexec.c -- 2.1.0 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
next reply other threads:[~2016-08-30 22:40 UTC|newest] Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-08-30 22:40 Mimi Zohar [this message] 2016-08-30 22:40 ` [PATHC v2 0/9] ima: carry the measurement list across kexec Mimi Zohar 2016-08-30 22:40 ` [PATHC v2 1/9] ima: on soft reboot, restore the measurement list Mimi Zohar 2016-08-30 22:40 ` Mimi Zohar 2016-08-30 22:40 ` [PATHC v2 2/9] ima: permit duplicate measurement list entries Mimi Zohar 2016-08-30 22:40 ` Mimi Zohar 2016-08-30 22:40 ` [PATHC v2 3/9] ima: maintain memory size needed for serializing the measurement list Mimi Zohar 2016-08-30 22:40 ` Mimi Zohar 2016-08-30 22:40 ` [PATHC v2 4/9] ima: serialize the binary_runtime_measurements Mimi Zohar 2016-08-30 22:40 ` Mimi Zohar 2016-08-30 22:40 ` [PATHC v2 5/9] ima: on soft reboot, save the measurement list Mimi Zohar 2016-08-30 22:40 ` Mimi Zohar 2016-09-01 1:57 ` Dave Young 2016-09-01 1:57 ` Dave Young 2016-09-02 13:22 ` Mimi Zohar 2016-09-02 13:22 ` Mimi Zohar 2016-08-30 22:40 ` [PATHC v2 6/9] ima: store the builtin/custom template definitions in a list Mimi Zohar 2016-08-30 22:40 ` Mimi Zohar 2016-08-30 22:40 ` [PATHC v2 7/9] ima: support restoring multiple template formats Mimi Zohar 2016-08-30 22:40 ` Mimi Zohar 2016-08-30 22:40 ` [PATHC v2 8/9] ima: define a canonical binary_runtime_measurements list format Mimi Zohar 2016-08-30 22:40 ` Mimi Zohar 2016-08-30 22:40 ` [PATHC v2 9/9] ima: platform-independent hash value Mimi Zohar 2016-08-30 22:40 ` Mimi Zohar 2016-08-31 20:50 ` [PATHC v2 0/9] ima: carry the measurement list across kexec Andrew Morton 2016-08-31 20:50 ` Andrew Morton 2016-08-31 22:38 ` Mimi Zohar 2016-08-31 22:38 ` Mimi Zohar 2016-09-15 15:44 ` Mimi Zohar 2016-09-15 15:44 ` Mimi Zohar 2016-09-16 19:47 ` Eric W. Biederman 2016-09-16 19:47 ` Eric W. Biederman 2016-09-16 21:03 ` Eric W. Biederman 2016-09-16 21:03 ` Eric W. Biederman 2016-09-16 23:32 ` Thiago Jung Bauermann 2016-09-16 23:32 ` Thiago Jung Bauermann 2016-09-17 5:17 ` Eric W. Biederman 2016-09-17 5:17 ` Eric W. Biederman 2016-09-18 21:25 ` Thiago Jung Bauermann 2016-09-18 21:25 ` Thiago Jung Bauermann 2016-09-20 16:07 ` Eric W. Biederman 2016-09-20 16:07 ` Eric W. Biederman 2016-09-26 18:31 ` Thiago Jung Bauermann 2016-09-26 18:31 ` Thiago Jung Bauermann 2016-09-29 21:43 ` Eric W. Biederman 2016-09-29 21:43 ` Eric W. Biederman 2016-09-29 22:21 ` Thiago Jung Bauermann 2016-09-29 22:21 ` Thiago Jung Bauermann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1472596811-9596-1-git-send-email-zohar@linux.vnet.ibm.com \ --to=zohar@linux.vnet.ibm.com \ --cc=akpm@linux-foundation.org \ --cc=bauerman@linux.vnet.ibm.com \ --cc=dyoung@redhat.com \ --cc=kexec@lists.infradead.org \ --cc=linux-ima-devel@lists.sourceforge.net \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-security-module@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.