<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:45:06 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-4703] setxattr(2) will succeed by a non root user, against a file the user doesn&apos;t own.</title>
                <link>https://jira.whamcloud.com/browse/LU-4703</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@localhost ~&amp;#93;&lt;/span&gt;# mount -t lustre 192.168.122.225@tcp:/testfs /mnt/&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@localhost ~&amp;#93;&lt;/span&gt;# ll /mnt/&lt;br/&gt;
total 8&lt;br/&gt;
drwxr-xr-x 2 dyl900 users 4096 Mar  4 16:08 dyl900&lt;br/&gt;
drwxr-xr-x 2 mxa900 users 4096 Mar  4 16:08 mxa900&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@localhost ~&amp;#93;&lt;/span&gt;# su - dyl900&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;dyl900@localhost ~&amp;#93;&lt;/span&gt;$ cd /mnt/&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;dyl900@localhost mnt&amp;#93;&lt;/span&gt;$ getfacl ./mxa900&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;file: mxa900/&lt;/li&gt;
	&lt;li&gt;owner: mxa900&lt;/li&gt;
	&lt;li&gt;group: users&lt;br/&gt;
user::rwx&lt;br/&gt;
group::r-x&lt;br/&gt;
other::r-x&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;dyl900@localhost mnt&amp;#93;&lt;/span&gt;$ setfacl -m u:dyl900:rwx ./mxa900&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;dyl900@localhost mnt&amp;#93;&lt;/span&gt;$ getfacl ./mxa900&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;file: mxa900/&lt;/li&gt;
	&lt;li&gt;owner: mxa900&lt;/li&gt;
	&lt;li&gt;group: users&lt;br/&gt;
user::rwx&lt;br/&gt;
user:dyl900:rwx&lt;br/&gt;
group::r-x&lt;br/&gt;
mask::rwx&lt;br/&gt;
other::r-x&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;On our production system, this allows a user access other users&apos; files...&lt;/p&gt;</description>
                <environment>CentOS 6.4</environment>
        <key id="23448">LU-4703</key>
            <summary>setxattr(2) will succeed by a non root user, against a file the user doesn&apos;t own.</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.whamcloud.com/images/icons/priorities/blocker.svg">Blocker</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="utopiabound">Nathaniel Clark</assignee>
                                    <reporter username="lidongyang">Li Dongyang</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Tue, 4 Mar 2014 06:09:30 +0000</created>
                <updated>Wed, 12 Mar 2014 22:30:59 +0000</updated>
                            <resolved>Wed, 12 Mar 2014 22:30:59 +0000</resolved>
                                    <version>Lustre 2.5.0</version>
                    <version>Lustre 2.6.0</version>
                    <version>Lustre 2.4.2</version>
                                    <fixVersion>Lustre 2.6.0</fixVersion>
                    <fixVersion>Lustre 2.5.1</fixVersion>
                    <fixVersion>Lustre 2.4.3</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>12</watches>
                                                                            <comments>
                            <comment id="78314" author="lidongyang" created="Tue, 4 Mar 2014 06:17:37 +0000"  >&lt;p&gt;for master: &lt;a href=&quot;http://review.whamcloud.com/#/c/9469/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/9469/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(This is the one for mdd_xattr_set().)&lt;/p&gt;</comment>
                            <comment id="78496" author="jhammond" created="Wed, 5 Mar 2014 17:39:55 +0000"  >&lt;p&gt;Looking at this, I think mdd_xattr_sanity_check() could be improved somewhat. Currently it looks like:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;static int mdd_xattr_sanity_check(const struct lu_env *env,
                                  struct mdd_object *obj,
                                  const struct lu_attr *attr)
{
        struct lu_ucred *uc     = lu_ucred_assert(env);
        ENTRY;

        if (mdd_is_immutable(obj) || mdd_is_append(obj))
                RETURN(-EPERM);

        if ((uc-&amp;gt;uc_fsuid != attr-&amp;gt;la_uid) &amp;amp;&amp;amp; !md_capable(uc, CFS_CAP_FOWNER))
                RETURN(-EPERM);

        RETURN(0);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;ol&gt;
	&lt;li&gt;This might benefit from the explicit xattr classification done in ll_setxattr_common(). That is we could check prefix and reject anything we don&apos;t recognize/want to support.&lt;/li&gt;
	&lt;li&gt;Even though the client masks some xattrs like security.capability it would be worthwhile to handle them explicitly here. Setting security.capability should require CAP_SETFCAP. Setting anything other security.* should require CAP_SYS_ADMIN.&lt;/li&gt;
	&lt;li&gt;There are some other rules like for sticky directories that should be considered. Probably mdd_xattr_set_sanity_check() should duplicate most of the logic in xattr_permission().&lt;/li&gt;
	&lt;li&gt;There is also some access policy in mdt_reint_setxattr() that should be looked at and maybe moved.&lt;/li&gt;
&lt;/ol&gt;
</comment>
                            <comment id="78502" author="adilger" created="Wed, 5 Mar 2014 18:36:24 +0000"  >&lt;p&gt;Patch from &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4704&quot; title=&quot;Permission checking is missing when setfacl&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4704&quot;&gt;&lt;del&gt;LU-4704&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;http://review.whamcloud.com/9473&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/9473&lt;/a&gt; &lt;/p&gt;</comment>
                            <comment id="78510" author="adilger" created="Wed, 5 Mar 2014 19:22:40 +0000"  >&lt;p&gt;I just verified that this bug does not exist in any release earlier than 2.4.0.  It was added in commit 7b3bfb09, which moved the ACL handling out of the OSD and into the MDD so that ZFS does not have to handle ACL checking itself.&lt;/p&gt;</comment>
                            <comment id="78534" author="bogl" created="Wed, 5 Mar 2014 21:14:56 +0000"  >&lt;p&gt;for b2_5: &lt;a href=&quot;http://review.whamcloud.com/9513&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/9513&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="78589" author="utopiabound" created="Thu, 6 Mar 2014 15:22:33 +0000"  >&lt;p&gt;Test for issue &lt;a href=&quot;http://review.whamcloud.com/9508&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/9508&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="78775" author="bogl" created="Fri, 7 Mar 2014 23:17:19 +0000"  >&lt;p&gt;for b2_4: &lt;a href=&quot;http://review.whamcloud.com/9558&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/9558&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="78822" author="adilger" created="Sat, 8 Mar 2014 21:27:54 +0000"  >&lt;p&gt;Note that it should be possible to disable ACL support on ldiskfs MDSes either temporarily or permanently to provide a short-term workaround for this bug.  There is no mechanism to disable ACL support on ZFS filesystems at this time.&lt;/p&gt;

&lt;p&gt;The MDS can be mounted with the &quot;-o noacl&quot; option to disable ACL support temporarily, or by unmounting the MDS, running &quot;&lt;tt&gt;tune2fs -o ^acl /dev/&amp;lt;mdsdev&amp;gt;&lt;/tt&gt;&quot; to turn off ACL support in the ldiskfs superblock, and then mount the MDS again.&lt;/p&gt;

&lt;p&gt;Disabling the ACL can be verified on the client by checking &quot;lctl get_param mdc.*.import | grep connect_flags&quot; and checking whether the &quot;acl&quot; feature is listed (it will normally be second).&lt;/p&gt;</comment>
                            <comment id="79137" author="utopiabound" created="Wed, 12 Mar 2014 15:55:14 +0000"  >&lt;p&gt;sanity/102p for b2_5 &lt;a href=&quot;http://review.whamcloud.com/9604&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/9604&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="79196" author="pjones" created="Wed, 12 Mar 2014 22:30:59 +0000"  >&lt;p&gt;Landed for 2.4.3, 2.5.1 and 2.6&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="23449">LU-4704</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="23449">LU-4704</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzwgof:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>12938</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>