From: Mimi Zohar <zohar@linux.ibm.com> To: Ken Goldman <kgold@linux.vnet.ibm.com>, Linux Integrity <linux-integrity@vger.kernel.org> Subject: Re: ima_template and ima_template_format - supported and legal values Date: Mon, 08 Oct 2018 07:43:19 -0400 [thread overview] Message-ID: <1538998999.15382.102.camel@linux.ibm.com> (raw) In-Reply-To: <e762dedd-17b6-6cb1-837a-4e181f330ca1@linux.vnet.ibm.com> On Fri, 2018-10-05 at 18:53 -0400, Ken Goldman wrote: > I have two questions. > > I'm writing an informal specification for the IMA event log. > > I'd like to include a chart noting which kernel version first supported > various options. I.e. the IMA templates (ima, ima-ng, ima-sig), and the > ima_template_format directive and its various values. All of this information is readily available in the git repo. There's a commit number associated with every line of code. Use "git blame <pathname>" to associate a line of code with a specific commit number. [1] Commit 3323eec921ef ("integrity: IMA as an integrity service provider") [2] Commit c2426d2ad502 ("ima: added support for new kernel cmdline parameter ima_template_fmt") [3] Commit 3ce1217d6cd5 ("ima: define template fields library and new helpers") [4] Commit bcbc9b0cf6d8 ("ima: extend the measurement list to include the file signature") [5] Commit 4d7aeee73f53 ("ima: define new template ima-ng and template fields d-ng and n-ng") To determine when a commit was upstreamed, add linux-stable as a remote branch and execute "git branch -r --contains <commit number>". In this case, all of the existing template fields and template formats were upstreamed in Linux 3.13. linux-2.6: ima [1] linux-3.13: ima-ng [2, 5] linux-3.13: ima-sig [4] linux-3.13: 'n', 'd' [3] linux-3.13: 'n-ng', 'd-ng' [5] linux-3.13: 'sig' [4] > I'm writing a library of useful IMA event log parsing functions. > > Are all format combinations legal? It's not enough to look at today's > code, because the code can change. > > For example, ima_template_format="sig" doesn't make sense, because > it's a signature over a missing file data hash, but it's accepted. > The log it creates is odd, though, with just two entries. The parser should be able to handle all custom templates, whether or not it makes sense. Leaving out the digest (d, d-ng) or the filename (n, n-ng) also doesn't make sense. Deciding whether the measurement list makes sense and/or addressing other measurement list issues, is left up to userspace applications, such as the attestation server. Please note that although the old 'd' digest or the 'n' filename fields are defined, their use should be limited to the 'ima' template. Mimi
WARNING: multiple messages have this Message-ID (diff)
From: Mimi Zohar <zohar@linux.ibm.com> To: Ken Goldman <kgold@linux.vnet.ibm.com>, Linux Integrity <linux-integrity@vger.kernel.org> Subject: Re: ima_template and ima_template_format - supported and legal values Date: Mon, 08 Oct 2018 07:43:19 -0400 [thread overview] Message-ID: <1538998999.15382.102.camel@linux.ibm.com> (raw) Message-ID: <20181008114319.la5rfElJnm2C4KSkIsuKoNXbS2vhlRwcLKKo2c-WNW0@z> (raw) In-Reply-To: <e762dedd-17b6-6cb1-837a-4e181f330ca1@linux.vnet.ibm.com> On Fri, 2018-10-05 at 18:53 -0400, Ken Goldman wrote: > I have two questions. > > I'm writing an informal specification for the IMA event log. > > I'd like to include a chart noting which kernel version first supported > various options. I.e. the IMA templates (ima, ima-ng, ima-sig), and the > ima_template_format directive and its various values. All of this information is readily available in the git repo. There's a commit number associated with every line of code. Use "git blame <pathname>" to associate a line of code with a specific commit number. [1] Commit 3323eec921ef ("integrity: IMA as an integrity service provider") [2] Commit c2426d2ad502 ("ima: added support for new kernel cmdline parameter ima_template_fmt") [3] Commit 3ce1217d6cd5 ("ima: define template fields library and new helpers") [4] Commit bcbc9b0cf6d8 ("ima: extend the measurement list to include the file signature") [5] Commit 4d7aeee73f53 ("ima: define new template ima-ng and template fields d-ng and n-ng") To determine when a commit was upstreamed, add linux-stable as a remote branch and execute "git branch -r --contains <commit number>". In this case, all of the existing template fields and template formats were upstreamed in Linux 3.13. linux-2.6: ima [1] linux-3.13: ima-ng [2, 5] linux-3.13: ima-sig [4] linux-3.13: 'n', 'd' [3] linux-3.13: 'n-ng', 'd-ng' [5] linux-3.13: 'sig' [4] > I'm writing a library of useful IMA event log parsing functions. > > Are all format combinations legal? It's not enough to look at today's > code, because the code can change. > > For example, ima_template_format="sig" doesn't make sense, because > it's a signature over a missing file data hash, but it's accepted. > The log it creates is odd, though, with just two entries. The parser should be able to handle all custom templates, whether or not it makes sense. Leaving out the digest (d, d-ng) or the filename (n, n-ng) also doesn't make sense. Deciding whether the measurement list makes sense and/or addressing other measurement list issues, is left up to userspace applications, such as the attestation server. Please note that although the old 'd' digest or the 'n' filename fields are defined, their use should be limited to the 'ima' template. Mimi
next prev parent reply other threads:[~2018-10-08 18:54 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-10-05 22:53 ima_template and ima_template_format - supported and legal values Ken Goldman 2018-10-08 11:43 ` Mimi Zohar [this message] 2018-10-08 11:43 ` Mimi Zohar
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=1538998999.15382.102.camel@linux.ibm.com \ --to=zohar@linux.ibm.com \ --cc=kgold@linux.vnet.ibm.com \ --cc=linux-integrity@vger.kernel.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.