All of lore.kernel.org
 help / color / mirror / Atom feed
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: Thu, 02 Jan 2020 18:22:02 -0500	[thread overview]
Message-ID: <1578007322.5874.128.camel@linux.ibm.com> (raw)
In-Reply-To: <584145d6-bf12-e5ee-972f-91283aa66f74@linux.ibm.com>

On Thu, 2020-01-02 at 17:24 -0500, Ken Goldman wrote:
> On 1/2/2020 3:25 PM, Mimi Zohar wrote:
> > On Thu, 2020-01-02 at 15:10 -0500, Ken Goldman wrote:
> >> I'm trying to document the ima-modsig template and then write aparser.
> >> Can anyone help me complete it?
> >>
> >> 1 - What the implementation does today is interesting.  Even betterwould
> >> be what the implementation is permitted to do so that theparser will
> >> handle future changes.
> >>
> >> 2 - My understanding so far:
> >>
> >>       ima-modsig        is        d-ng | n-ng | sig | d-modsig |modsig
> >>
> >>       where (both have a prepended uint32_t length)
> >>
> >>       d-modsig            is    d-ng, filedata hash, omitting the
> >> appended modsig signature
> >>       modsig                is     pkcs7DER, appended signature
> >>
> >> My immediate issue is that the d-modsig should be a length +
> >> hashalgorithm + file data hash.  However, the length in my sample log
> >> issometimes zero, which I did not expect.
> >>
> >> I.e., it it legal for an ima-modsig template to contain an emptyd-modsig
> >> item?
> >>
> >> Can the modsig item also be empty?
> > 
> > Like the "sig" field in the "ima-sig" template, both the "d-modsig"
> > and "modsig" fields in the "ima-modsig" template may be empty.
> > 
> 
> I understand sig being empty is the file isn't signed.  Same with 
> modsig.  The verifier could flag that.
> 
> 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".

Mimi


  reply	other threads:[~2020-01-02 23:22 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 [this message]
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         ` Spec needed for ima-modsig template Mimi Zohar
2020-01-06 14:27           ` 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=1578007322.5874.128.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.