Re: [PATCH 2/2] ima: Support appraise_type=imasig_optional

From: Mimi Zohar
Date: Thu Feb 14 2013 - 07:57:33 EST


On Wed, 2013-02-13 at 11:59 -0500, Vivek Goyal wrote:
> On Wed, Feb 13, 2013 at 08:44:04AM -0500, Mimi Zohar wrote:
>
> [..]
> > > I see it is more logical if it is "appraise_type=optional",
> > > which means that we might have no xattr value, hash or signature.
> > > It if happens to be a signature, then IMA_DIGSIG flag will be set.
> >
> > Right, 'appraise_type=' could have been defined either as a comma
> > separated list of options (eg. appraise_type=imassig,optional) or, as
> > Vivek implemented, a new option. Eventually, we will need to extend
> > 'appraise_type=' (eg. required algorithm), but for now I don't have a
> > problem with the new option.
>
> Ok, I will cleanup the code to do above. Just wanted to clear up one
> point.
>
> Above option will not have any effect on evm behavior? This only impacts
> IMA appraisal behavior. For example, if security.ima is not present it
> is fine and file access is allowed. But if EVM is enabled and initialized
> and EVM does not find security.evm label (INTEGRITY_NOLABEL) or returns
> INTEGRITY_NOXATTRS, file access should still be denied?

Can't happen. evm_verifyxattr() is called from
ima_appraise_measurement(), only if 'security.ima' exists.

> BTW, what's the difference between INTEGRITY_NOLABEL and
> INTEGRITY_NOXATTRS (as returned by evm_verifyxattr()).

INTEGRITY_NOLABEL indicates the requested xattr doesn't exist, while
INTEGRITY_NOXATTRS implies no EVM protected xattrs exist. The latter
normally occurs when a file is first created.

Mimi

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/