[Bugs] [Bug 1182490] New: Internal ec xattrs are allowed to be modified

bugzilla at redhat.com bugzilla at redhat.com
Thu Jan 15 09:30:18 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1182490

            Bug ID: 1182490
           Summary: Internal ec xattrs are allowed to be modified
           Product: GlusterFS
           Version: 3.6.1
         Component: disperse
          Assignee: bugs at gluster.org
          Reporter: pkarampu at redhat.com
                CC: bugs at gluster.org, gluster-bugs at redhat.com,
                    lidi at perabytes.com
        Depends On: 1178688



+++ This bug was initially created as a clone of Bug #1178688 +++

Description of problem:
Internal ec xattrs are allowed to be modified by the user, this can cause
problems if the user modifies them in a wrong way by mistake.
root at pranithk-laptop - /mnt/fuse1 
15:34:11 :) ⚡ getfattr -d -m. -e hex /home/gfs/ec_?/a
getfattr: Removing leading '/' from absolute path names
# file: home/gfs/ec_2/a
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a66696c655f743a733000
trusted.ec.config=0x0000080301000200
trusted.ec.size=0x0000000000000004
trusted.ec.version=0x0000000000000001
trusted.gfid=0x5934895e011e4bc2aa0bae0b6d5148bb

# file: home/gfs/ec_3/a
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a66696c655f743a733000
trusted.ec.config=0x0000080301000200
trusted.ec.size=0x0000000000000004
trusted.ec.version=0x0000000000000001
trusted.gfid=0x5934895e011e4bc2aa0bae0b6d5148bb

# file: home/gfs/ec_4/a
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a66696c655f743a733000
trusted.ec.config=0x0000080301000200
trusted.ec.size=0x0000000000000004
trusted.ec.version=0x0000000000000001
trusted.gfid=0x5934895e011e4bc2aa0bae0b6d5148bb


root at pranithk-laptop - /mnt/fuse1 
15:34:36 :) ⚡ setfattr -n trusted.ec.size -v 0x0000000000000008 a

root at pranithk-laptop - /mnt/fuse1 
15:35:04 :) ⚡ getfattr -d -m. -e hex /home/gfs/ec_?/a
getfattr: Removing leading '/' from absolute path names
# file: home/gfs/ec_2/a
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a66696c655f743a733000
trusted.ec.config=0x0000080301000200
trusted.ec.size=0x0000000000000008
trusted.ec.version=0x0000000000000002
trusted.gfid=0x5934895e011e4bc2aa0bae0b6d5148bb

# file: home/gfs/ec_3/a
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a66696c655f743a733000
trusted.ec.config=0x0000080301000200
trusted.ec.size=0x0000000000000008
trusted.ec.version=0x0000000000000002
trusted.gfid=0x5934895e011e4bc2aa0bae0b6d5148bb

# file: home/gfs/ec_4/a
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a66696c655f743a733000
trusted.ec.config=0x0000080301000200
trusted.ec.size=0x0000000000000008
trusted.ec.version=0x0000000000000002
trusted.gfid=0x5934895e011e4bc2aa0bae0b6d5148bb


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Anand Avati on 2015-01-05 09:21:30 EST ---

REVIEW: http://review.gluster.org/9385 (cluster/ec: Handle internal xattr
get/set) posted (#1) for review on master by Pranith Kumar Karampuri
(pkarampu at redhat.com)

--- Additional comment from Anand Avati on 2015-01-05 09:25:42 EST ---

REVIEW: http://review.gluster.org/9385 (cluster/ec: Handle internal xattr
get/set) posted (#2) for review on master by Pranith Kumar Karampuri
(pkarampu at redhat.com)

--- Additional comment from Anand Avati on 2015-01-06 02:07:37 EST ---

REVIEW: http://review.gluster.org/9385 (cluster/ec: Handle internal xattr
get/set) posted (#3) for review on master by Pranith Kumar Karampuri
(pkarampu at redhat.com)

--- Additional comment from Anand Avati on 2015-01-07 05:18:19 EST ---

REVIEW: http://review.gluster.org/9385 (cluster/ec: Handle internal xattr
get/set) posted (#4) for review on master by Pranith Kumar Karampuri
(pkarampu at redhat.com)

--- Additional comment from Anand Avati on 2015-01-08 02:02:25 EST ---

REVIEW: http://review.gluster.org/9385 (cluster/ec: Handle internal xattr
get/set) posted (#5) for review on master by Pranith Kumar Karampuri
(pkarampu at redhat.com)

--- Additional comment from Anand Avati on 2015-01-08 04:44:22 EST ---

REVIEW: http://review.gluster.org/9385 (cluster/ec: Handle internal xattr
get/set) posted (#6) for review on master by Pranith Kumar Karampuri
(pkarampu at redhat.com)

--- Additional comment from Anand Avati on 2015-01-09 00:55:42 EST ---

COMMIT: http://review.gluster.org/9385 committed in master by Pranith Kumar
Karampuri (pkarampu at redhat.com) 
------
commit 70dc47389cbe08238d8c216c51d49583154bd08a
Author: Pranith Kumar K <pkarampu at redhat.com>
Date:   Mon Jan 5 16:21:52 2015 +0530

    cluster/ec: Handle internal xattr get/set

    Problem:
    Internal xattrs of EC like trusted.ec.size/config/version
    can be modified by users and that can lead to misbehavior
    in EC.

    Fix:
    Don't let the user modify the xattrs. Hide these xattrs
    in getfattr outputs.

    Change-Id: I39cec96ae12826b506b496fda7da74201015fd75
    BUG: 1178688
    Signed-off-by: Pranith Kumar K <pkarampu at redhat.com>
    Reviewed-on: http://review.gluster.org/9385
    Tested-by: Gluster Build System <jenkins at build.gluster.com>
    Reviewed-by: Emmanuel Dreyfus <manu at netbsd.org>
    Tested-by: Emmanuel Dreyfus <manu at netbsd.org>
    Reviewed-by: Xavier Hernandez <xhernandez at datalab.es>


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1178688
[Bug 1178688] Internal ec xattrs are allowed to be modified
-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list