Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1442509 > unrolled thread
| Started by | Vivek Goyal <vgoyal@redhat.com> |
|---|---|
| First post | 2016-07-13 16:50 +0200 |
| Last post | 2016-07-14 09:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 8/9] overlayfs: Dilute permission checks on lower only if not special file Vivek Goyal <vgoyal@redhat.com> - 2016-07-13 16:50 +0200
Re: [PATCH 8/9] overlayfs: Dilute permission checks on lower only if not special file Miklos Szeredi <miklos@szeredi.hu> - 2016-07-14 09:00 +0200
| From | Vivek Goyal <vgoyal@redhat.com> |
|---|---|
| Date | 2016-07-13 16:50 +0200 |
| Subject | [PATCH 8/9] overlayfs: Dilute permission checks on lower only if not special file |
| Message-ID | <rUtE5-4my-9@gated-at.bofh.it> |
Right now if file is on lower/, we remove MAY_WRITE/MAY_APPEND bits from mask as lower/ will never be written and file will be copied up. But this is not true for special files. These files are not copied up and are opened in place. So don't dilute the checks for these types of files. Reported-by: Dan Walsh <dwalsh@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- fs/overlayfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index 66f42f5..6d9d86e 100644 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c @@ -140,7 +140,7 @@ int ovl_permission(struct inode *inode, int mask) return err; old_cred = ovl_override_creds(inode->i_sb); - if (!is_upper) + if (!is_upper && !special_file(realinode->i_mode)) mask &= ~(MAY_WRITE | MAY_APPEND); err = inode_permission(realinode, mask); revert_creds(old_cred); -- 2.7.4
[toc] | [next] | [standalone]
| From | Miklos Szeredi <miklos@szeredi.hu> |
|---|---|
| Date | 2016-07-14 09:00 +0200 |
| Subject | Re: [PATCH 8/9] overlayfs: Dilute permission checks on lower only if not special file |
| Message-ID | <rUIMO-64Y-21@gated-at.bofh.it> |
| In reply to | #1442509 |
On Wed, Jul 13, 2016 at 4:44 PM, Vivek Goyal <vgoyal@redhat.com> wrote: > Right now if file is on lower/, we remove MAY_WRITE/MAY_APPEND bits from > mask as lower/ will never be written and file will be copied up. But this > is not true for special files. These files are not copied up and are > opened in place. So don't dilute the checks for these types of files. Pushed this one as well. Miklos > > Reported-by: Dan Walsh <dwalsh@redhat.com> > Signed-off-by: Vivek Goyal <vgoyal@redhat.com> > --- > fs/overlayfs/inode.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c > index 66f42f5..6d9d86e 100644 > --- a/fs/overlayfs/inode.c > +++ b/fs/overlayfs/inode.c > @@ -140,7 +140,7 @@ int ovl_permission(struct inode *inode, int mask) > return err; > > old_cred = ovl_override_creds(inode->i_sb); > - if (!is_upper) > + if (!is_upper && !special_file(realinode->i_mode)) > mask &= ~(MAY_WRITE | MAY_APPEND); > err = inode_permission(realinode, mask); > revert_creds(old_cred); > -- > 2.7.4 >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web