From: Andy Whitcroft <apw@canonical.com>
To: Miklos Szeredi <miklos@szeredi.hu>, Andy Whitcroft <apw@canonical.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
mszeredi@suse.cz
Subject: [PATCH 2/2] overlayfs: switch to use inode_only_permissions
Date: Tue, 6 Mar 2012 16:18:06 +0000 [thread overview]
Message-ID: <1331050686-1815-2-git-send-email-apw@canonical.com> (raw)
In-Reply-To: <1331050686-1815-1-git-send-email-apw@canonical.com>
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.
Switch over to the newly introduced inode_only_permissions.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
fs/overlayfs/inode.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index ba1a777..1e3d157 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -114,10 +114,7 @@ int ovl_permission(struct inode *inode, int mask)
goto out_dput;
}
- if (realinode->i_op->permission)
- err = realinode->i_op->permission(realinode, mask);
- else
- err = generic_permission(realinode, mask);
+ err = inode_only_permission(realinode, mask);
out_dput:
dput(alias);
return err;
--
1.7.9
next prev parent reply other threads:[~2012-03-06 16:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-17 15:10 [PATCH 1/1] overlayfs: apply device cgroup and security permissions to overlay files Andy Whitcroft
2012-03-05 17:18 ` Miklos Szeredi
2012-03-06 16:12 ` Andy Whitcroft
2012-03-06 16:18 ` [PATCH 1/2] inode_only_permission: export inode level permissions checks Andy Whitcroft
2012-03-06 16:18 ` Andy Whitcroft [this message]
2012-03-06 16:37 ` 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=1331050686-1815-2-git-send-email-apw@canonical.com \
--to=apw@canonical.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@suse.cz \
/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