<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:29:53 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-9856] NULL pointer dereference in mdd_xattr_list()</title>
                <link>https://jira.whamcloud.com/browse/LU-9856</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Running racer on &lt;tt&gt;v2_10_51_0-23-gd564bec&lt;/tt&gt; I see a NULL pointer deference in &lt;tt&gt;mdd_xattr_list()&lt;/tt&gt;:&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;#11 [ffff88001e9d7c10] mdd_xattr_list+736 at ffffffffa0ebaaa0 [mdd]
    /root/lustre-release/lustre/mdd/mdd_object.c: 319
#12 [ffff88001e9d7c50] mdt_getxattr+1492 at ffffffffa0f23f04 [mdt]
    /root/lustre-release/lustre/include/md_object.h: 440
#13 [ffff88001e9d7ce0] mdt_tgt_getxattr+28 at ffffffffa0f0e55c [mdt]
    /root/lustre-release/lustre/mdt/mdt_handler.c: 4630
#14 [ffff88001e9d7d00] tgt_request_handle+2341 at ffffffffa0944a75 [ptlrpc]
    /root/lustre-release/lustre/include/lu_target.h: 574
#15 [ffff88001e9d7d48] ptlrpc_server_handle_request+566 at ffffffffa08ed486 [ptlrpc]
    /root/lustre-release/lustre/include/lustre_net.h: 2464
#16 [ffff88001e9d7de8] ptlrpc_main+2720 at ffffffffa08f14c0 [ptlrpc]
    /root/lustre-release/lustre/ptlrpc/service.c: 2578
#17 [ffff88001e9d7ec8] kthread+207 at ffffffff810b06ff
    /usr/src/debug/kernel-3.10.0-514.10.2.el7/linux-3.10.0-514.10.2.el7.lustre.x86_64/kernel/kthread.c: 200
#18 [ffff88001e9d7f50] ret_from_fork+88 at ffffffff81696c98
    /usr/src/debug/kernel-3.10.0-514.10.2.el7/linux-3.10.0-514.10.2.el7.lustre.x86_64/arch/x86/kernel/entry_64.S: 369
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;                &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; (p &amp;lt; end) {
                        &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt;   *next = p + strlen(p) + 1;

                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (strcmp(p, XATTR_NAME_LINK) == 0) { &lt;span class=&quot;code-comment&quot;&gt;/* HERE */&lt;/span&gt;
                                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (end - next &amp;gt; 0)
                                        memmove(p, next, end - next);
                                rc -= next - p;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I first saw this when evaluating &lt;a href=&quot;https://review.whamcloud.com/28223&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28223&lt;/a&gt; &quot;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9417&quot; title=&quot;xattr cache memory usage can be reduced&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9417&quot;&gt;&lt;del&gt;LU-9417&lt;/del&gt;&lt;/a&gt; mdc: excessive memory consumption by the xattr cache&quot; for landing on &lt;tt&gt;b2_10&lt;/tt&gt; along with some other changes which are unlikely to have introduced this. So think that &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9417&quot; title=&quot;xattr cache memory usage can be reduced&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9417&quot;&gt;&lt;del&gt;LU-9417&lt;/del&gt;&lt;/a&gt; (which is a client side only change) is likely to have uncovered this bug.&lt;/p&gt;</description>
                <environment></environment>
        <key id="47748">LU-9856</key>
            <summary>NULL pointer dereference in mdd_xattr_list()</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</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="jhammond">John Hammond</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>mdd</label>
                    </labels>
                <created>Thu, 10 Aug 2017 15:23:54 +0000</created>
                <updated>Tue, 8 May 2018 23:51:17 +0000</updated>
                            <resolved>Mon, 28 Aug 2017 18:30:06 +0000</resolved>
                                    <version>Lustre 2.11.0</version>
                                    <fixVersion>Lustre 2.10.1</fixVersion>
                    <fixVersion>Lustre 2.11.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="205023" author="jhammond" created="Thu, 10 Aug 2017 15:33:50 +0000"  >&lt;p&gt;After reverting &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9417&quot; title=&quot;xattr cache memory usage can be reduced&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9417&quot;&gt;&lt;del&gt;LU-9417&lt;/del&gt;&lt;/a&gt; from my batch of test changes I no longer see this.&lt;/p&gt;</comment>
                            <comment id="205058" author="pjones" created="Thu, 10 Aug 2017 17:08:17 +0000"  >&lt;p&gt;Andrew&lt;/p&gt;

&lt;p&gt;Would you please advise?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="205072" author="panda" created="Thu, 10 Aug 2017 18:09:56 +0000"  >&lt;p&gt;Peter, the quoted code (which has no relation to either the xattr cache or &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9417&quot; title=&quot;xattr cache memory usage can be reduced&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9417&quot;&gt;&lt;del&gt;LU-9417&lt;/del&gt;&lt;/a&gt; in particular) does not look right.&lt;/p&gt;

&lt;p&gt;It is possible that mdd_list_xattr() is passed the NULL ptr if we only want to know the list size, e.g. via OBD_MD_FLXATTRLS request. The code makes an attempt to parse the buffer and can deref the NULL ptr. It&apos;s a bug in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6027&quot; title=&quot;Issues with EAs of orphan files and EAs with empty values&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6027&quot;&gt;&lt;del&gt;LU-6027&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9417&quot; title=&quot;xattr cache memory usage can be reduced&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9417&quot;&gt;&lt;del&gt;LU-9417&lt;/del&gt;&lt;/a&gt; falls back to non-cached xattr requests when it encounters really large xattr blobs. That&apos;s a valid case and should not cause server crashes.&lt;/p&gt;

&lt;p&gt;P.S. Sorry for the edits, I&apos;m currently on PTO and not very attentive.&lt;/p&gt;</comment>
                            <comment id="205081" author="gerrit" created="Thu, 10 Aug 2017 19:51:52 +0000"  >&lt;p&gt;John L. Hammond (john.hammond@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/28469&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28469&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9856&quot; title=&quot;NULL pointer dereference in mdd_xattr_list()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9856&quot;&gt;&lt;del&gt;LU-9856&lt;/del&gt;&lt;/a&gt; mdd: handle NULL buffer in mdd_xattr_list()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: b9184d37a514918b7a0a4ac8d1963c2db4c0a101&lt;/p&gt;</comment>
                            <comment id="206556" author="gerrit" created="Mon, 28 Aug 2017 06:26:51 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/28469/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28469/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9856&quot; title=&quot;NULL pointer dereference in mdd_xattr_list()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9856&quot;&gt;&lt;del&gt;LU-9856&lt;/del&gt;&lt;/a&gt; mdd: handle NULL buffer in mdd_xattr_list()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 33a4b5ef00e88b33136d09d2f4029223a3c4d681&lt;/p&gt;</comment>
                            <comment id="206691" author="mdiep" created="Mon, 28 Aug 2017 18:30:06 +0000"  >&lt;p&gt;Landed for 2.11&lt;/p&gt;</comment>
                            <comment id="206692" author="gerrit" created="Mon, 28 Aug 2017 18:31:32 +0000"  >&lt;p&gt;Minh Diep (minh.diep@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/28766&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28766&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9856&quot; title=&quot;NULL pointer dereference in mdd_xattr_list()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9856&quot;&gt;&lt;del&gt;LU-9856&lt;/del&gt;&lt;/a&gt; mdd: handle NULL buffer in mdd_xattr_list()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: a7a63cb2e5d20451f87d83e802dbfd63a24d9dba&lt;/p&gt;</comment>
                            <comment id="207646" author="gerrit" created="Wed, 6 Sep 2017 16:31:15 +0000"  >&lt;p&gt;John L. Hammond (john.hammond@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/28766/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28766/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9856&quot; title=&quot;NULL pointer dereference in mdd_xattr_list()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9856&quot;&gt;&lt;del&gt;LU-9856&lt;/del&gt;&lt;/a&gt; mdd: handle NULL buffer in mdd_xattr_list()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 8e2cd001a9640c5e9959341c5af6da680c609eee&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="51816">LU-10912</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="45775">LU-9417</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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|hzzi8v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>