From: Mimi Zohar <zohar@linux.ibm.com>
To: Ken Goldman <kgold@linux.ibm.com>,
Linux Integrity <linux-integrity@vger.kernel.org>,
Ken Goldman <kgoldman@us.ibm.com>
Subject: Re: Spec needed for ima-modsig template
Date: Sat, 04 Jan 2020 18:32:50 -0500 [thread overview]
Message-ID: <1578180770.5152.30.camel@linux.ibm.com> (raw)
In-Reply-To: <69ef3bb7-abdd-8c18-1afc-722d35a807c1@linux.ibm.com>
On Fri, 2020-01-03 at 13:27 -0500, Ken Goldman wrote:
> On 1/2/2020 6:22 PM, Mimi Zohar wrote:
> >> However, d-modsig is a hash. How should a parser interpret a missing
> >> [file data] hash? Under what conditions would that be legal / illegal /
> >> something to flag to an admin UI?
> > The "d-modsig" is the hash of the file without the appended signature.
> > That hash is needed to verify the appended signature. If there isn't
> > an appended signature, then there would be no reason for "d-modsig".
>
> I'd like to make the leap from "no reason to" to what is permissible,
> what a verifier would treat as legal or an error case.
>
> E.g., should the IMA log specification say:
>
> If the sig length is zero, the d-modsig length MUST be zero.
>
> Or might it be a MAY, and then state
>
> If the signature length is zero and the d-modsig length is non-zero,
> then the contents MUST be the same as the d-ng value.
>
> What if the template has no 'd-ng', but it has a d-modsig?
>
> What happens if the template has no 'sig'. I.e. the sig
> is absent, then ... perhaps absent is the same as length zero?
>
> Would we enforce that the d-ng hash algorithm MUST be the same as
> that of the d-modsig, or could they be different?
>
> What if there are two 'sig' fields, one is zero and the other is not.
>
> ~~
>
> While the above are clearly not the normal case:
>
> 1 - An attacker can use a custom IMA template to find a vulnerability in
> the IMA implementation, or
>
> 2 - An attacker could send a malformed log to a verifier. To the
> verifier, the received IMA log is unvalidated input, so the parser has
> to be fastidious.
The "ima-modsig" template may include the "sig" and/or the "modsig"
fields. As the "d-modsig" and "modsig" are tied together, either both
are defined or neither are defined. The file hash ("d-ng") must
always exist. The "sig" and "modsig" hash algorithms are independent
of each other. They might or might not be the same.
Mimi
next prev parent reply other threads:[~2020-01-04 23:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-02 20:10 Spec needed for ima-modsig template Ken Goldman
2020-01-02 20:25 ` Mimi Zohar
2020-01-02 22:24 ` Ken Goldman
2020-01-02 23:22 ` Mimi Zohar
2020-01-03 18:27 ` Ken Goldman
2020-01-03 18:57 ` Spec needed for ima-buf template Ken Goldman
2020-01-03 19:25 ` Spec needed for ima-buf template - missing hash algorithm Ken Goldman
2020-01-04 23:32 ` Mimi Zohar [this message]
2020-01-06 14:27 ` Spec needed for ima-modsig template Ken Goldman
2020-01-06 17:18 ` Mimi Zohar
2020-01-06 14:36 ` Ken Goldman
2020-01-06 15:50 ` Mimi Zohar
2020-01-06 16:01 ` Ken Goldman
2020-01-06 16:55 ` Mimi Zohar
2020-01-07 8:53 ` Roberto Sassu
2020-01-07 15:40 ` Ken Goldman
2020-01-07 17:53 ` Roberto Sassu
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=1578180770.5152.30.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=kgold@linux.ibm.com \
--cc=kgoldman@us.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: link
Be 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.