[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-stable-commits
Subject: Patch "GFS2: Fix permissions checking for setflags ioctl()" has been added to the 2.6.32-stable tree
From: <gregkh () suse ! de>
Date: 2010-06-25 23:31:29
Message-ID: 12775086892095 () site
[Download RAW message or body]
This is a note to let you know that I've just added the patch titled
GFS2: Fix permissions checking for setflags ioctl()
to the 2.6.32-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
gfs2-fix-permissions-checking-for-setflags-ioctl.patch
and it can be found in the queue-2.6.32 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@kernel.org> know about it.
From 7df0e0397b9a18358573274db9fdab991941062f Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Mon, 24 May 2010 14:36:48 +0100
Subject: GFS2: Fix permissions checking for setflags ioctl()
From: Steven Whitehouse <swhiteho@redhat.com>
commit 7df0e0397b9a18358573274db9fdab991941062f upstream.
We should be checking for the ownership of the file for which
flags are being set, rather than just for write access.
Reported-by: Dan Rosenberg <dan.j.rosenberg@gmail.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/gfs2/file.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -218,6 +218,11 @@ static int do_gfs2_set_flags(struct file
if (error)
goto out_drop_write;
+ error = -EACCES;
+ if (!is_owner_or_cap(inode))
+ goto out;
+
+ error = 0;
flags = ip->i_diskflags;
new_flags = (flags & ~mask) | (reqflags & mask);
if ((new_flags ^ flags) == 0)
@@ -275,8 +280,10 @@ static int gfs2_set_flags(struct file *f
{
struct inode *inode = filp->f_path.dentry->d_inode;
u32 fsflags, gfsflags;
+
if (get_user(fsflags, ptr))
return -EFAULT;
+
gfsflags = fsflags_cvt(fsflags_to_gfs2, fsflags);
if (!S_ISDIR(inode->i_mode)) {
if (gfsflags & GFS2_DIF_INHERIT_JDATA)
Patches currently in stable-queue which might be from swhiteho@redhat.com are
queue-2.6.32/gfs2-fix-permissions-checking-for-setflags-ioctl.patch
--
To unsubscribe from this list: send the line "unsubscribe stable-commits" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic