mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@canonical.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] overlayfs: apply device cgroup and security permissions to overlay files
Date: Tue, 6 Mar 2012 16:12:24 +0000	[thread overview]
Message-ID: <20120306161224.GE9978@shadowen.org> (raw)
In-Reply-To: <87pqcr9db4.fsf@tucsk.pomaz.szeredi.hu>

On Mon, Mar 05, 2012 at 06:18:23PM +0100, Miklos Szeredi wrote:
> Andy Whitcroft <apw@canonical.com> writes:
> 
> > When checking permissions on an overlayfs inode we do not take into
> > account either device cgroup restrictions nor security permissions.
> > This allows a user to mount an overlayfs layer over a restricted device
> > directory and by pass those permissions to open otherwise restricted
> > files.
> >
> > Use devcgroup_inode_permission() and security_inode_permission() against
> > the underlying inodes when calculating ovl_permission().
> 
> Andy,
> 
> Thanks for the patch.
> 
> __devcgroup_inode_permission() and security_inode_permission() are not
> exported to modules, so this will not work if overlayfs is a module.
> 
> We could export those but I think a better solution is to split out the
> part of inode_permission() that doesn't check for a read-only fs and
> export that.

Yeah that makes much more sense.  I got caught out by some exports
required for aufs3 which was also applied in my test environment.

How about the following pair of patches?

-apw

  reply	other threads:[~2012-03-06 16:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-17 15:10 Andy Whitcroft
2012-03-05 17:18 ` Miklos Szeredi
2012-03-06 16:12   ` Andy Whitcroft [this message]
2012-03-06 16:18     ` [PATCH 1/2] inode_only_permission: export inode level permissions checks Andy Whitcroft
2012-03-06 16:18       ` [PATCH 2/2] overlayfs: switch to use inode_only_permissions Andy Whitcroft
2012-03-06 16:37       ` [PATCH 1/2] inode_only_permission: export inode level permissions checks Miklos Szeredi
2012-04-29 15:03     ` [PATCH 1/1] overlayfs: apply device cgroup and security permissions to overlay files Sedat Dilek

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=20120306161224.GE9978@shadowen.org \
    --to=apw@canonical.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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

Powered by JetHome