<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:54:02 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-12602] Lustre mdt_getxattr_pack_reply() bug</title>
                <link>https://jira.whamcloud.com/browse/LU-12602</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In the latest version of lustre file system, mdt module has a LBUG bug due to the lack of validation for specific fields of packets sent by client.&lt;/p&gt;

&lt;p&gt;The kenrel panic:&lt;/p&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;
[ 3513.346370] Kernel panic - not syncing: LBUG
[ 3513.348092] CPU: 2 PID: 3714 Comm: mdt00_004 Kdump: loaded Tainted: G           OE  ------------   3.10.0-957.10.1.el7_lustre.x86_64 #1
[ 3513.351756] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 3288b3c 04/01/2014
[ 3513.353768] Call Trace:
[ 3513.355288]  [&amp;lt;ffffffff98162e41&amp;gt;] dump_stack+0x19/0x1b
[ 3513.357062]  [&amp;lt;ffffffff9815c550&amp;gt;] panic+0xe8/0x21f
[ 3513.358896]  [&amp;lt;ffffffffc056e8cb&amp;gt;] lbug_with_loc+0x9b/0xa0 [libcfs]
[ 3513.360755]  [&amp;lt;ffffffffc0961c8f&amp;gt;] req_capsule_set_size+0x15f/0x1a0 [ptlrpc]
[ 3513.362672]  [&amp;lt;ffffffffc101f825&amp;gt;] mdt_getxattr+0x7a5/0x1260 [mdt]
[ 3513.364493]  [&amp;lt;ffffffffc0ffec50&amp;gt;] ? mdt_object_lock_internal+0x70/0x360 [mdt]
[ 3513.366397]  [&amp;lt;ffffffffc09392dc&amp;gt;] ? lustre_msg_get_flags+0x2c/0xa0 [ptlrpc]
[ 3513.368279]  [&amp;lt;ffffffffc1007f43&amp;gt;] mdt_intent_getxattr+0xc3/0x2c0 [mdt]
[ 3513.370101]  [&amp;lt;ffffffffc10049e4&amp;gt;] mdt_intent_policy+0x2d4/0xdd0 [mdt]
[ 3513.371910]  [&amp;lt;ffffffffc1007e80&amp;gt;] ? mdt_intent_getattr+0x480/0x480 [mdt]
[ 3513.373741]  [&amp;lt;ffffffffc08ecc66&amp;gt;] ldlm_lock_enqueue+0x356/0xa20 [ptlrpc]
[ 3513.375561]  [&amp;lt;ffffffffc05783d3&amp;gt;] ? cfs_hash_bd_add_locked+0x63/0x80 [libcfs]
[ 3513.377410]  [&amp;lt;ffffffffc057b96e&amp;gt;] ? cfs_hash_add+0xbe/0x1a0 [libcfs]
[ 3513.379211]  [&amp;lt;ffffffffc0915587&amp;gt;] ldlm_handle_enqueue0+0xa47/0x15a0 [ptlrpc]
[ 3513.381061]  [&amp;lt;ffffffffc093d520&amp;gt;] ? lustre_swab_ldlm_lock_desc+0x30/0x30 [ptlrpc]
[ 3513.382952]  [&amp;lt;ffffffffc099e082&amp;gt;] tgt_enqueue+0x62/0x210 [ptlrpc]
[ 3513.384719]  [&amp;lt;ffffffffc09a42ca&amp;gt;] tgt_request_handle+0x91a/0x15c0 [ptlrpc]
[ 3513.386524]  [&amp;lt;ffffffffc0574fa7&amp;gt;] ? libcfs_debug_msg+0x57/0x80 [libcfs]
[ 3513.388283]  [&amp;lt;ffffffffc094788e&amp;gt;] ptlrpc_server_handle_request+0x24e/0xab0 [ptlrpc]
[ 3513.390126]  [&amp;lt;ffffffff97acbadb&amp;gt;] ? __wake_up_common+0x5b/0x90
[ 3513.391810]  [&amp;lt;ffffffffc094b384&amp;gt;] ptlrpc_main+0xbb4/0x20f0 [ptlrpc]
[ 3513.393498]  [&amp;lt;ffffffff97ad08c0&amp;gt;] ? finish_task_switch+0x50/0x1c0
[ 3513.395167]  [&amp;lt;ffffffffc094a7d0&amp;gt;] ? ptlrpc_register_service+0xfa0/0xfa0 [ptlrpc]
[ 3513.396915]  [&amp;lt;ffffffff97ac1c71&amp;gt;] kthread+0xd1/0xe0
[ 3513.398390]  [&amp;lt;ffffffff97ac1ba0&amp;gt;] ? insert_kthread_work+0x40/0x40
[ 3513.399973]  [&amp;lt;ffffffff98175c1d&amp;gt;] ret_from_fork_nospec_begin+0x7/0x21
[ 3513.401565]  [&amp;lt;ffffffff97ac1ba0&amp;gt;] ? insert_kthread_work+0x40/0x40
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In fucntion mdt_getxattr_pack_reply, it don&apos;t check the vaule of mbo_eadatasize and pass it to the req_capsule_set_size function. In function req_capsule_set_size, it checks if the condition of &apos;size%4==0&apos; is satisfied. If it is not, we will trigger LBUG() and cause kernel panic. The `mbo_eadatasize` parameter is derived from the packet whose lustre request is `LDLM_ENQUEUE`. The attacker can modify the `eadatasize` parameter in the `MDT Body` section of the packet to a larger multiple of 4 (eg 0x44444444).&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.whamcloud.com/secure/attachment/33299/33299_image-2019-07-29-17-28-29-872.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.whamcloud.com/secure/attachment/33298/33298_image-2019-07-29-17-28-55-842.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The backtrace:&#160;&lt;/p&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;
&#160;ptlrpc_main -&amp;gt; ptlrpc_sever_handle_request -&amp;gt; tgt_request_handle -&amp;gt; tgt_enqueue -&amp;gt; ldlm_handle_enqueue0 -&amp;gt; ldlm_lock_enqueue -&amp;gt; mdt_intent_policy -&amp;gt; mdt_intent_getxattr -&amp;gt; mdt_getxattr -&amp;gt; mdt_getxattr_pack_reply -&amp;gt; req_capsule_set_size&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="56510">LU-12602</key>
            <summary>Lustre mdt_getxattr_pack_reply() bug</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</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="emoly.liu">Emoly Liu</assignee>
                                    <reporter username="yunye.ry">Alibaba Cloud</reporter>
                        <labels>
                    </labels>
                <created>Mon, 29 Jul 2019 09:28:12 +0000</created>
                <updated>Mon, 23 Sep 2019 08:43:40 +0000</updated>
                            <resolved>Mon, 16 Sep 2019 23:33:56 +0000</resolved>
                                    <version>Lustre 2.13.0</version>
                                    <fixVersion>Lustre 2.13.0</fixVersion>
                    <fixVersion>Lustre 2.12.3</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="252287" author="pjones" created="Tue, 30 Jul 2019 18:12:00 +0000"  >&lt;p&gt;Emoly&lt;/p&gt;

&lt;p&gt;Could you please look into this one&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="252401" author="adilger" created="Thu, 1 Aug 2019 17:48:16 +0000"  >&lt;p&gt;Please add &quot;&lt;tt&gt;Reported-by: Alibaba Cloud &amp;lt;yunye.ry@alibaba-inc.com&amp;gt;&lt;/tt&gt;&quot; to the patch commit message.&lt;/p&gt;</comment>
                            <comment id="252952" author="gerrit" created="Mon, 12 Aug 2019 08:14:47 +0000"  >&lt;p&gt;Emoly Liu (emoly@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/35768&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35768&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12602&quot; title=&quot;Lustre mdt_getxattr_pack_reply() bug&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12602&quot;&gt;&lt;del&gt;LU-12602&lt;/del&gt;&lt;/a&gt; mdt: check EA size in mdt_getxattr_pack_reply()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 6112a3c01991f3be7c2b4c1b320e49c65fd2a992&lt;/p&gt;</comment>
                            <comment id="253646" author="gerrit" created="Tue, 27 Aug 2019 02:21:08 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/35768/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35768/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12602&quot; title=&quot;Lustre mdt_getxattr_pack_reply() bug&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12602&quot;&gt;&lt;del&gt;LU-12602&lt;/del&gt;&lt;/a&gt; mdt: check EA size in mdt_getxattr_pack_reply()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 915135c37cbfa6851a5ec732afd20955eb020566&lt;/p&gt;</comment>
                            <comment id="253657" author="pjones" created="Tue, 27 Aug 2019 02:53:00 +0000"  >&lt;p&gt;Landed for 2.13&lt;/p&gt;</comment>
                            <comment id="253693" author="gerrit" created="Tue, 27 Aug 2019 16:40:38 +0000"  >&lt;p&gt;Minh Diep (mdiep@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/35936&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35936&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12602&quot; title=&quot;Lustre mdt_getxattr_pack_reply() bug&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12602&quot;&gt;&lt;del&gt;LU-12602&lt;/del&gt;&lt;/a&gt; mdt: check EA size in mdt_getxattr_pack_reply()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 48cdabe892f763b7aa221fb0c7678773f948702f&lt;/p&gt;</comment>
                            <comment id="253978" author="pjones" created="Sat, 31 Aug 2019 15:28:17 +0000"  >&lt;p&gt;Reopening until Gerrit comments in the master patch have been addressed.&lt;/p&gt;</comment>
                            <comment id="254367" author="gerrit" created="Mon, 9 Sep 2019 08:15:10 +0000"  >&lt;p&gt;Emoly Liu (emoly@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/36103&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36103&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12602&quot; title=&quot;Lustre mdt_getxattr_pack_reply() bug&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12602&quot;&gt;&lt;del&gt;LU-12602&lt;/del&gt;&lt;/a&gt; mdt: more EA size check in mdt_getxattr_pack_reply()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: da76e2c4410ffa2e5b66537b920cf95be29bef87&lt;/p&gt;</comment>
                            <comment id="254768" author="gerrit" created="Mon, 16 Sep 2019 23:00:50 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/36103/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36103/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12602&quot; title=&quot;Lustre mdt_getxattr_pack_reply() bug&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12602&quot;&gt;&lt;del&gt;LU-12602&lt;/del&gt;&lt;/a&gt; mdt: more EA size check in mdt_getxattr_pack_reply()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 4d8bc239c2c30a47e8833cf23db6ccd39ff61705&lt;/p&gt;</comment>
                            <comment id="254833" author="pjones" created="Mon, 16 Sep 2019 23:33:56 +0000"  >&lt;p&gt;Second patch landed for 2.13&lt;/p&gt;</comment>
                            <comment id="254883" author="gerrit" created="Tue, 17 Sep 2019 14:50:10 +0000"  >&lt;p&gt;Minh Diep (mdiep@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/36208&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36208&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12602&quot; title=&quot;Lustre mdt_getxattr_pack_reply() bug&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12602&quot;&gt;&lt;del&gt;LU-12602&lt;/del&gt;&lt;/a&gt; mdt: more EA size check in mdt_getxattr_pack_reply()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 5cc423a057adc6a5f4457b8e6ba0d6c76572b700&lt;/p&gt;</comment>
                            <comment id="254971" author="gerrit" created="Wed, 18 Sep 2019 14:04:43 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/35936/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35936/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12602&quot; title=&quot;Lustre mdt_getxattr_pack_reply() bug&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12602&quot;&gt;&lt;del&gt;LU-12602&lt;/del&gt;&lt;/a&gt; mdt: check EA size in mdt_getxattr_pack_reply()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 4745898c73a9d72142cbb2a7eeb9a16598a06fef&lt;/p&gt;</comment>
                            <comment id="255239" author="gerrit" created="Mon, 23 Sep 2019 08:43:40 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/36208/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36208/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12602&quot; title=&quot;Lustre mdt_getxattr_pack_reply() bug&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12602&quot;&gt;&lt;del&gt;LU-12602&lt;/del&gt;&lt;/a&gt; mdt: more EA size check in mdt_getxattr_pack_reply()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 156439ee97a371941c5089f3e6f55fa4a730754c&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="56513">LU-12605</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="33299" name="image-2019-07-29-17-28-29-872.png" size="161566" author="yunye.ry" created="Mon, 29 Jul 2019 09:27:23 +0000"/>
                            <attachment id="33298" name="image-2019-07-29-17-28-55-842.png" size="66698" author="yunye.ry" created="Mon, 29 Jul 2019 09:27:47 +0000"/>
                    </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|i00kan:</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>
                                                                                            <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>