<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:22:15 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-15899] BUG: KASAN: slab-out-of-bounds in mdt_hsm_release</title>
                <link>https://jira.whamcloud.com/browse/LU-15899</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Seen on v2_15_50-13-gc524079f4f. There is a slab-out-of-bounds write in mdt_hsm_release():&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;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!(ma-&amp;gt;ma_valid &amp;amp; MA_LOV)) {
                &lt;span class=&quot;code-comment&quot;&gt;/* Even empty file are released */&lt;/span&gt;
                memset(ma-&amp;gt;ma_lmm, 0, sizeof(*ma-&amp;gt;ma_lmm)); &lt;span class=&quot;code-comment&quot;&gt;/* HERE */&lt;/span&gt;
                ma-&amp;gt;ma_lmm-&amp;gt;lmm_magic = cpu_to_le32(LOV_MAGIC_V1_DEFINED);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;tt&gt;ma_lmm&lt;/tt&gt; is &lt;tt&gt;req_capsule_server_get(info-&amp;gt;mti_pill, &amp;amp;RMF_MDT_MD)&lt;/tt&gt; from &lt;tt&gt;mdt_close()&lt;/tt&gt;. We should check that this is at least &lt;tt&gt;sizeof(ma-&amp;gt;ma_lmm)&lt;/tt&gt; or use an alternate buffer.&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;[80779.264740] Lustre: DEBUG MARKER: == sanity-hsm test 21: Simple release tests ============== 07:57:08 (1653656228)
[80782.701558] ==================================================================
[80782.702354] BUG: KASAN: slab-out-of-bounds in mdt_hsm_release+0xae7/0x3b60 [mdt]
[80782.702990] Write of size 32 at addr ffff88811fe6f310 by task mdt_rdpg00_002/821178
[80782.703578]
[80782.703705] CPU: 1 PID: 821178 Comm: mdt_rdpg00_002 Kdump: loaded Tainted: G        W  OE    --------- -  - 4.18.0-348.7.1.el\
8.x86_64+debug #1
[80782.704726] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1.1 04/01/2014
[80782.705459] Call Trace:
[80782.705664]  dump_stack+0x8e/0xd0
[80782.705955]  ? mdt_hsm_release+0xae7/0x3b60 [mdt]
[80782.706376]  print_address_description.constprop.5+0x1e/0x230
[80782.706844]  ? kmsg_dump_rewind_nolock+0xd9/0xd9
[80782.707252]  ? mdt_hsm_release+0xae7/0x3b60 [mdt]
[80782.707637]  ? mdt_hsm_release+0xae7/0x3b60 [mdt]
[80782.708051]  ? mdt_hsm_release+0xae7/0x3b60 [mdt]
[80782.708441]  __kasan_report.cold.7+0x37/0x86
[80782.708804]  ? mdt_hsm_release+0xae7/0x3b60 [mdt]
[80782.709201]  kasan_report+0x37/0x50
[80782.709492]  check_memory_region+0x198/0x200
[80782.709839]  memset+0x1f/0x40
[80782.710119]  mdt_hsm_release+0xae7/0x3b60 [mdt]
[80782.710514]  mdt_mfd_close+0x4b5/0x2970 [mdt]
[80782.710897]  mdt_close_internal+0x29b/0x7c0 [mdt]
[80782.711314]  mdt_close+0x586/0x1510 [mdt]
[80782.711913]  tgt_request_handle+0x1c82/0x4250 [ptlrpc]
[80782.712400]  ? tgt_brw_write+0x4c80/0x4c80 [ptlrpc]
[80782.712849]  ? libcfs_id2str+0x104/0x190 [lnet]
[80782.713248]  ptlrpc_server_handle_request+0xa5e/0x1ff0 [ptlrpc]
[80782.713783]  ptlrpc_main+0x1aa6/0x2e60 [ptlrpc]
[80782.714165]  ? __kthread_parkme+0xc4/0x190
[80782.714555]  ? ptlrpc_wait_event+0x1230/0x1230 [ptlrpc]
[80782.714990]  kthread+0x344/0x410
[80782.715290]  ? kthread_insert_work_sanity_check+0xd0/0xd0
[80782.715743]  ret_from_fork+0x24/0x50
[80782.716048]
[80782.716176] Allocated by task 821178:
[80782.716475]  kasan_save_stack+0x19/0x80
[80782.716773]  __kasan_kmalloc.constprop.9+0xc1/0xd0
[80782.717170]  __kmalloc+0x143/0x260
[80782.717487]  null_alloc_rs+0x1d6/0x7c0 [ptlrpc]
[80782.717903]  sptlrpc_svc_alloc_rs+0x19c/0x850 [ptlrpc]
[80782.718429]  lustre_pack_reply_v2+0x14c/0x8b0 [ptlrpc]
[80782.718881]  lustre_pack_reply_flags+0x126/0x380 [ptlrpc]
[80782.719367]  req_capsule_server_pack+0xa7/0x1f0 [ptlrpc]
[80782.719822]  mdt_close+0x377/0x1510 [mdt]
[80782.720205]  tgt_request_handle+0x1c82/0x4250 [ptlrpc]
[80782.720675]  ptlrpc_server_handle_request+0xa5e/0x1ff0 [ptlrpc]
[80782.721198]  ptlrpc_main+0x1aa6/0x2e60 [ptlrpc]
[80782.721607]  kthread+0x344/0x410
[80782.721888]  ret_from_fork+0x24/0x50
[80782.722196]
[80782.722319] Last call_rcu():
[80782.722570]  kasan_save_stack+0x19/0x80
[80782.722896]  kasan_record_aux_stack+0x9e/0xb0
[80782.723289]  call_rcu+0x1a3/0x1020
[80782.723557]  queue_rcu_work+0x52/0x70
[80782.723859]  process_one_work+0x8f0/0x1770
[80782.724205]  worker_thread+0x87/0xb40
[80782.724507]  kthread+0x344/0x410
[80782.724774]  ret_from_fork+0x24/0x50
[80782.725069]
[80782.725205] Second to last call_rcu():
[80782.725511]  kasan_save_stack+0x19/0x80
[80782.725831]  kasan_record_aux_stack+0x9e/0xb0
[80782.726212]  call_rcu+0x1a3/0x1020
[80782.726500]  __percpu_ref_switch_mode+0x2ad/0x6c0
[80782.726890]  percpu_ref_kill_and_confirm+0x82/0x2ed
[80782.727290]  cgroup_destroy_locked+0x246/0x5e0
[80782.727633]  cgroup_rmdir+0x2f/0x2c0
[80782.727917]  kernfs_iop_rmdir+0x131/0x1b0
[80782.728260]  vfs_rmdir+0x142/0x3c0
[80782.728545]  do_rmdir+0x2b2/0x340
[80782.728822]  do_syscall_64+0xa5/0x430
[80782.729123]  entry_SYSCALL_64_after_hwframe+0x6a/0xdf
[80782.729509]
[80782.729635] The buggy address belongs to the object at ffff88811fe6f000
[80782.729635]  which belongs to the cache kmalloc-1k of size 1024
[80782.730641] The buggy address is located 784 bytes inside of
[80782.730641]  1024-byte region [ffff88811fe6f000, ffff88811fe6f400)
[80782.731622] The buggy address belongs to the page:
[80782.731971] page:ffffea00047f9a00 refcount:1 mapcount:0 mapping:00000000f4753386 index:0xffff88811fe69000 head:ffffea00047f9a\
00 order:3 compound_mapcount:0 compound_pincount:0
[80782.733075] flags: 0x17ffffc0008100(slab|head)
[80782.733396] raw: 0017ffffc0008100 ffffea0004d2a608 ffff888100001150 ffff88810000e140
[80782.733939] raw: ffff88811fe69000 00000000000a0009 00000001ffffffff 0000000000000000
[80782.734561] page dumped because: kasan: bad access detected
[80782.735053]
[80782.735186] Memory state around the buggy address:
[80782.735551]  ffff88811fe6f200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[80782.736096]  ffff88811fe6f280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[80782.736653] &amp;gt;ffff88811fe6f300: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[80782.737258]                          ^
[80782.737635]  ffff88811fe6f380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[80782.738244]  ffff88811fe6f400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[80782.738849] ==================================================================
[80783.859016] Lustre: DEBUG MARKER: == sanity-hsm test 22: Could not swap a release file ===== 07:57:13 (1653656233)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="70505">LU-15899</key>
            <summary>BUG: KASAN: slab-out-of-bounds in mdt_hsm_release</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="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                    </labels>
                <created>Fri, 27 May 2022 13:39:15 +0000</created>
                <updated>Fri, 27 May 2022 13:39:15 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                    <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|i02qzj:</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>