From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: Matthew Garrett <mjg59@google.com>
Cc: Dmitry Kasatkin <dmitry.kasatkin@huawei.com>,
"linux-integrity@vger.kernel.org"
<linux-integrity@vger.kernel.org>,
Mikhail Kurinnoi <viewizard@viewizard.com>
Subject: Re: [RFC] EVM: Add support for portable signature format
Date: Mon, 30 Oct 2017 09:58:47 -0400 [thread overview]
Message-ID: <1509371927.3583.87.camel@linux.vnet.ibm.com> (raw)
In-Reply-To: <CACdnJuvz3RHG-asaN8NiJ=3uz-EH9CRAoc+kwG0gL+ChjJ64FQ@mail.gmail.com>
On Mon, 2017-10-30 at 13:21 +0000, Matthew Garrett wrote:
> On Mon, Oct 30, 2017 at 12:30 PM, Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:
> > On Fri, 2017-10-27 at 10:27 +0000, Dmitry Kasatkin wrote:
> >
> >> > @@ -345,7 +350,8 @@ int evm_inode_setxattr(struct dentry *dentry, const
> >> > char *xattr_name,
> >> > if (strcmp(xattr_name, XATTR_NAME_EVM) == 0) {
> >> > if (!xattr_value_len)
> >> > return -EINVAL;
> >> > - if (xattr_data->type != EVM_IMA_XATTR_DIGSIG)
> >> > + if (xattr_data->type != EVM_IMA_XATTR_DIGSIG &&
> >> > + xattr_data->type != EVM_XATTR_PORTABLE_DIGSIG)
> >> > return -EPERM;
> >> > }
> >> > return evm_protect_xattr(dentry, xattr_name, xattr_value, @@ -
> >> > 432,6 +438,7 @@ int evm_inode_setattr(struct dentry *dentry, struct iattr
> >> > *attr)
> >> > return 0;
> >> > evm_status = evm_verify_current_integrity(dentry);
> >> > if ((evm_status == INTEGRITY_PASS) ||
> >> > + (evm_status == INTEGRITY_PASS_IMMUTABLE) ||
> >> > (evm_status == INTEGRITY_NOXATTRS))
> >> > return 0;
> >>
> >> Something is wrong here?
> >> When integrity verification pass, this code WILL ALLOW to change attribute.
> >> But it is not possible... next time integrity verification will fail?
> >> Or I miss something?
> >
> > Right, it will allow the file metadata change. The bigger problem is
> > that evm_inode_post_setattr() will replace the signature with an HMAC.
>
> It will allow the metadata update as long as it's not security.evm or
> one of the evm protected xattrs, which means that
> evm_inode_post_setxattr() will return rather than calling
> evm_update_evmxattr().
We're discussing setattr, not setxattr here. Any file metadata change
(eg. chmod, chown, etc) will result in the file signature being
converted to an HMAC.
next prev parent reply other threads:[~2017-10-30 13:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-26 8:31 [RFC] EVM: Add support for portable signature format Matthew Garrett
2017-10-26 9:03 ` Mikhail Kurinnoi
2017-10-26 9:08 ` Matthew Garrett
2017-10-26 9:46 ` Mikhail Kurinnoi
2017-10-26 19:22 ` Mimi Zohar
2017-10-30 10:53 ` Matthew Garrett
2017-10-30 11:36 ` Mimi Zohar
2017-10-30 11:51 ` Matthew Garrett
2017-10-30 12:14 ` Mimi Zohar
2017-10-27 10:27 ` Dmitry Kasatkin
2017-10-30 12:30 ` Mimi Zohar
2017-10-30 13:21 ` Matthew Garrett
2017-10-30 13:58 ` Mimi Zohar [this message]
2017-10-30 14:04 ` Matthew Garrett
2017-10-27 10:41 ` Dmitry Kasatkin
2017-10-30 12:38 ` Mimi Zohar
2017-10-30 13:17 ` Matthew Garrett
2017-10-30 15:31 ` Mimi Zohar
2017-10-30 15:36 ` Matthew Garrett
2017-11-01 17:54 ` Matthew Garrett
2017-11-01 18:25 ` 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=1509371927.3583.87.camel@linux.vnet.ibm.com \
--to=zohar@linux.vnet.ibm.com \
--cc=dmitry.kasatkin@huawei.com \
--cc=linux-integrity@vger.kernel.org \
--cc=mjg59@google.com \
--cc=viewizard@viewizard.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).