From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: "Serge E. Hallyn" <serge@hallyn.com>, Dongsu Park <dongsu@kinvolk.io>
Cc: linux-kernel@vger.kernel.org,
containers@lists.linux-foundation.org,
Alban Crequy <alban@kinvolk.io>,
"Eric W . Biederman" <ebiederm@xmission.com>,
Miklos Szeredi <mszeredi@redhat.com>,
Seth Forshee <seth.forshee@canonical.com>,
Sargun Dhillon <sargun@sargun.me>,
linux-integrity@vger.kernel.org,
linux-security-module@vger.kernel.org,
James Morris <james.l.morris@oracle.com>
Subject: Re: [PATCH 11/11] evm: Don't update hmacs in user ns mounts
Date: Sun, 24 Dec 2017 00:12:08 -0500 [thread overview]
Message-ID: <1514092328.5221.116.camel@linux.vnet.ibm.com> (raw)
In-Reply-To: <20171223040348.GK6837@mail.hallyn.com>
Hi Serge,
On Fri, 2017-12-22 at 22:03 -0600, Serge E. Hallyn wrote:
> On Fri, Dec 22, 2017 at 03:32:35PM +0100, Dongsu Park wrote:
> > From: Seth Forshee <seth.forshee@canonical.com>
> >
> > The kernel should not calculate new hmacs for mounts done by
> > non-root users. Update evm_calc_hmac_or_hash() to refuse to
> > calculate new hmacs for mounts for non-init user namespaces.
> >
> > Cc: linux-integrity@vger.kernel.org
> > Cc: linux-security-module@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > Cc: James Morris <james.l.morris@oracle.com>
> > Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
>
> Hi Mimi,
>
> does this change seem sufficient to you?
I think this is the correct behavior in the context of fuse file
systems. This patch, the "ima: define a new policy option named
force" patch, and an updated IMA policy should be upstreamed together.
The cover letter should provide the motivation for these patches.
Mimi
>
> > Cc: "Serge E. Hallyn" <serge@hallyn.com>
> > Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
> > Signed-off-by: Dongsu Park <dongsu@kinvolk.io>
> > ---
> > security/integrity/evm/evm_crypto.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/security/integrity/evm/evm_crypto.c b/security/integrity/evm/evm_crypto.c
> > index bcd64baf..729f4545 100644
> > --- a/security/integrity/evm/evm_crypto.c
> > +++ b/security/integrity/evm/evm_crypto.c
> > @@ -190,7 +190,8 @@ static int evm_calc_hmac_or_hash(struct dentry *dentry,
> > int error;
> > int size;
> >
> > - if (!(inode->i_opflags & IOP_XATTR))
> > + if (!(inode->i_opflags & IOP_XATTR) ||
> > + inode->i_sb->s_user_ns != &init_user_ns)
> > return -EOPNOTSUPP;
> >
> > desc = init_desc(type);
> > --
> > 2.13.6
>
next prev parent reply other threads:[~2017-12-24 5:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1512741134.git.dongsu@kinvolk.io>
2017-12-22 14:32 ` [PATCH 11/11] evm: Don't update hmacs in user ns mounts Dongsu Park
2017-12-23 4:03 ` Serge E. Hallyn
2017-12-24 5:12 ` Mimi Zohar [this message]
2017-12-24 5:56 ` 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=1514092328.5221.116.camel@linux.vnet.ibm.com \
--to=zohar@linux.vnet.ibm.com \
--cc=alban@kinvolk.io \
--cc=containers@lists.linux-foundation.org \
--cc=dongsu@kinvolk.io \
--cc=ebiederm@xmission.com \
--cc=james.l.morris@oracle.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mszeredi@redhat.com \
--cc=sargun@sargun.me \
--cc=serge@hallyn.com \
--cc=seth.forshee@canonical.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