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

&lt;p&gt;The kernel 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;
[ 7424.506777] BUG: unable to handle kernel NULL pointer dereference at 000000000000001c
[ 7424.509002] IP: [&amp;lt;ffffffffa7b6b46c&amp;gt;] _raw_spin_lock+0xc/0x30
[ 7424.510926] PGD 0 
[ 7424.512466] Oops: 0002 [#1] SMP 
[ 7424.514098] Modules linked in: macsec tcp_diag udp_diag inet_diag unix_diag af_packet_diag netlink_diag binfmt_misc ofd(OE) ost(OE) osp(OE) mdd(OE) lod(OE) mdt(OE) lfsck(OE) mgs(OE) osd_ldiskfs(OE) lquota(OE) ldiskfs(OE) loop lustre(OE) obdecho(OE) mgc(OE) lov(OE) mdc(OE) osc(OE) lmv(OE) fid(OE) fld(OE) ptlrpc(OE) obdclass(OE) crc_t10dif crct10dif_generic ksocklnd(OE) lnet(OE) libcfs(OE) dm_flakey dm_mod nfit libnvdimm iosf_mbi crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd ppdev joydev pcspkr virtio_balloon parport_pc parport i2c_piix4 ip_tables ext4 mbcache jbd2 ata_generic pata_acpi virtio_net virtio_console virtio_blk cirrus drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm crct10dif_pclmul crct10dif_common drm crc32c_intel ata_piix libata
[ 7424.529892]  serio_raw virtio_pci virtio_ring virtio drm_panel_orientation_quirks floppy
[ 7424.532037] CPU: 3 PID: 7206 Comm: mdt00_000 Kdump: loaded Tainted: G           OEL ------------   3.10.0-957.10.1.el7_lustre.x86_64 #1
[ 7424.536069] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 3288b3c 04/01/2014
[ 7424.538254] task: ffff9447f62f8000 ti: ffff944babae8000 task.ti: ffff944babae8000
[ 7424.540415] RIP: 0010:[&amp;lt;ffffffffa7b6b46c&amp;gt;]  [&amp;lt;ffffffffa7b6b46c&amp;gt;] _raw_spin_lock+0xc/0x30
[ 7424.542720] RSP: 0018:ffff944babaebb78  EFLAGS: 00010246
[ 7424.544683] RAX: 0000000000000000 RBX: ffff944bdb285000 RCX: ffff944bdb2850b0
[ 7424.546806] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 000000000000001c
[ 7424.548912] RBP: ffff944babaebb88 R08: 000000000000000a R09: 000000000000fff3
[ 7424.551009] R10: 0000000000000000 R11: ffff944babaeb91e R12: 0000000000000000
[ 7424.553101] R13: ffff944be46c6b78 R14: 0000000000000000 R15: 0000000000000000
[ 7424.555177] FS:  0000000000000000(0000) GS:ffff944bffd80000(0000) knlGS:0000000000000000
[ 7424.557345] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 7424.559285] CR2: 000000000000001c CR3: 0000000421bb4000 CR4: 00000000003606e0
[ 7424.561342] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 7424.563385] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 7424.565400] Call Trace:
[ 7424.567049]  [&amp;lt;ffffffffc094602c&amp;gt;] ? lock_res_and_lock+0x2c/0x50 [ptlrpc]
[ 7424.569109]  [&amp;lt;ffffffffc09478ea&amp;gt;] __ldlm_handle2lock+0x7a/0x3f0 [ptlrpc]
[ 7424.571135]  [&amp;lt;ffffffffc096fdf2&amp;gt;] ldlm_request_cancel+0x1c2/0x740 [ptlrpc]
[ 7424.573145]  [&amp;lt;ffffffffc0975bc8&amp;gt;] ldlm_handle_enqueue0+0x88/0x15a0 [ptlrpc]
[ 7424.575133]  [&amp;lt;ffffffffc099e520&amp;gt;] ? lustre_swab_ldlm_lock_desc+0x30/0x30 [ptlrpc]
[ 7424.577175]  [&amp;lt;ffffffffc09ff082&amp;gt;] tgt_enqueue+0x62/0x210 [ptlrpc]
[ 7424.579070]  [&amp;lt;ffffffffc0a052ca&amp;gt;] tgt_request_handle+0x91a/0x15c0 [ptlrpc]
[ 7424.581008]  [&amp;lt;ffffffffc05d5fa7&amp;gt;] ? libcfs_debug_msg+0x57/0x80 [libcfs]
[ 7424.582942]  [&amp;lt;ffffffffc09a888e&amp;gt;] ptlrpc_server_handle_request+0x24e/0xab0 [ptlrpc]
[ 7424.584940]  [&amp;lt;ffffffffa74cbadb&amp;gt;] ? __wake_up_common+0x5b/0x90
[ 7424.586760]  [&amp;lt;ffffffffc09ac384&amp;gt;] ptlrpc_main+0xbb4/0x20f0 [ptlrpc]
[ 7424.588600]  [&amp;lt;ffffffffa74d08c0&amp;gt;] ? finish_task_switch+0x50/0x1c0
[ 7424.590425]  [&amp;lt;ffffffffc09ab7d0&amp;gt;] ? ptlrpc_register_service+0xfa0/0xfa0 [ptlrpc]
[ 7424.592348]  [&amp;lt;ffffffffa74c1c71&amp;gt;] kthread+0xd1/0xe0
[ 7424.594029]  [&amp;lt;ffffffffa74c1ba0&amp;gt;] ? insert_kthread_work+0x40/0x40
[ 7424.595810]  [&amp;lt;ffffffffa7b75c1d&amp;gt;] ret_from_fork_nospec_begin+0x7/0x21
[ 7424.597620]  [&amp;lt;ffffffffa74c1ba0&amp;gt;] ? insert_kthread_work+0x40/0x40
[ 7424.599397] Code: 5d c3 0f 1f 44 00 00 85 d2 74 e4 0f 1f 40 00 eb ed 66 0f 1f 44 00 00 b8 01 00 00 00 5d c3 90 0f 1f 44 00 00 31 c0 ba 01 00 00 00 &amp;lt;f0&amp;gt; 0f b1 17 85 c0 75 01 c3 55 89 c6 48 89 e5 e8 40 1b ff ff 5d 
[ 7424.604505] RIP  [&amp;lt;ffffffffa7b6b46c&amp;gt;] _raw_spin_lock+0xc/0x30
[ 7424.606300]  RSP &amp;lt;ffff944babaebb78&amp;gt;
[ 7424.607857] CR2: 000000000000001c
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In the &apos;ldl_request_cancel&apos; function of the &apos;ptlrpc&apos; module, the &apos;lock_count&apos; parameter obtained from the &apos;dlm_req&apos; structure don&apos;t have a boundary check, and directly accesses the &apos;lock_handle&apos; array as a index, resulting in an out-of-bounds access of the array.&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/33300/33300_image-2019-07-29-17-31-44-862.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;The &apos;lock_count&apos; parameter is derived from the lustre request packet. The attacker can modify the &apos;Lock Count&apos; parameter in the &apos;ldlm request&apos; section of the lustre packet whose request is &apos;LDLM_ENQUEUE&apos; to a larger value (such as 0x41414141), causing server crash.&lt;/p&gt;

&lt;p&gt;The backtrace:&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;
ptlrpc_main-&amp;gt; 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_request_cancel&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="56511">LU-12603</key>
            <summary>Lustre ldlm_request_cancel() 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="green">Oleg Drokin</assignee>
                                    <reporter username="yunye.ry">Alibaba Cloud</reporter>
                        <labels>
                    </labels>
                <created>Mon, 29 Jul 2019 09:31:07 +0000</created>
                <updated>Thu, 12 Sep 2019 04:08:39 +0000</updated>
                            <resolved>Sat, 7 Sep 2019 05:09:29 +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>4</watches>
                                                                            <comments>
                            <comment id="252402" author="adilger" created="Thu, 1 Aug 2019 17:48:35 +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="253230" author="gerrit" created="Sat, 17 Aug 2019 05:38:59 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/35806&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35806&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12603&quot; title=&quot;Lustre ldlm_request_cancel() bug&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12603&quot;&gt;&lt;del&gt;LU-12603&lt;/del&gt;&lt;/a&gt; ldlm: Check cancel lock count for correctness&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 4236dc5437ecb194b47249fb5b38fe5c0199df20&lt;/p&gt;</comment>
                            <comment id="254307" author="gerrit" created="Sat, 7 Sep 2019 01:34:15 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/35806/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35806/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12603&quot; title=&quot;Lustre ldlm_request_cancel() bug&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12603&quot;&gt;&lt;del&gt;LU-12603&lt;/del&gt;&lt;/a&gt; ldlm: Check cancel lock count for correctness&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 7cc43aef98f6a759cbc5ae572123b44803c0ccd2&lt;/p&gt;</comment>
                            <comment id="254331" author="pjones" created="Sat, 7 Sep 2019 05:09:29 +0000"  >&lt;p&gt;Landed for 2.13&lt;/p&gt;</comment>
                            <comment id="254397" author="gerrit" created="Mon, 9 Sep 2019 17:25:08 +0000"  >&lt;p&gt;Minh Diep (mdiep@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/36108&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36108&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12603&quot; title=&quot;Lustre ldlm_request_cancel() bug&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12603&quot;&gt;&lt;del&gt;LU-12603&lt;/del&gt;&lt;/a&gt; ldlm: Check cancel lock count for correctness&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: afd58cde602d0099c9ba96fd1ab8234fa7a07994&lt;/p&gt;</comment>
                            <comment id="254592" author="gerrit" created="Thu, 12 Sep 2019 03:52:27 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/36108/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36108/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12603&quot; title=&quot;Lustre ldlm_request_cancel() bug&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12603&quot;&gt;&lt;del&gt;LU-12603&lt;/del&gt;&lt;/a&gt; ldlm: Check cancel lock count for correctness&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 8dd7cf809c08ac8bdb93599bb3c4ea84693941a3&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="33300" name="image-2019-07-29-17-31-44-862.png" size="91550" author="yunye.ry" created="Mon, 29 Jul 2019 09:30:36 +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|i00kav:</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>