<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:44:43 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-11535] Memory corruption by ldiskfs_ext_remove_space slab-256</title>
                <link>https://jira.whamcloud.com/browse/LU-11535</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The failure happened at&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;
[27870519.051376] BUG: unable to handle kernel NULL pointer dereference at (&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
[27870519.058800] IP: [&amp;lt;ffffffffa067cac9&amp;gt;] lu_device_put+0x9/0x50 [obdclass]
[27870519.065736] PGD 59d964067 PUD e912b8067 PMD 0 
[27870519.070586] Oops: 0000 [#1] SMP 
[27870519.074201] last sysfs file: /sys/module/ipv6/initstate
[27870519.079770] CPU 7 
&#8230;
[27870519.176276] Pid: 92764, comm: jbd2/md141 Tainted: P           ---------------    2.6.32-431.17.1.x2.0.87.x86_64 #1 Seagate SATI-TL/Type2 - Board Product Sati2
[27870519.190999] RIP: 0010:[&amp;lt;ffffffffa067cac9&amp;gt;]  [&amp;lt;ffffffffa067cac9&amp;gt;] lu_device_put+0x9/0x50 [obdclass]
[....
[27870519.282591] &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; jbd2/md141 (pid: 92764, threadinfo ffff8805c6f3e000, task ffff880e833a8ae0)
[27870519.291704] Stack:
[27870519.294056]  ffff8805c6f3fcf0 ffffffffa0f25acb ffff8805c6f3fcd0 ffff880592d0d4e8
[27870519.301689] &amp;lt;d&amp;gt; ffff880f43897a98 0000000000000000 ffff880c18808800 0000000000f36fcb
[27870519.309871] &amp;lt;d&amp;gt; ffff8805c6f3fd20 ffffffffa0ecc8e1 ffff8809650ddb9c ffff880f438979c0
[27870519.318320] Call Trace:
[27870519.321125]  [&amp;lt;ffffffffa0f25acb&amp;gt;] osd_trans_commit_cb+0xcb/0x2b0 [osd_ldiskfs]
[27870519.328780]  [&amp;lt;ffffffffa0ecc8e1&amp;gt;] ldiskfs_journal_commit_callback+0x61/0x80 [ldiskfs]
[27870519.337036]  [&amp;lt;ffffffffa03eb8ef&amp;gt;] jbd2_journal_commit_transaction+0x116f/0x15a0 [jbd2]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The transaction was allocated at slab-256. The slab element before transaction belongs to ldiskfs ext path, executed function is ldiskfs_ext_remove_space().&lt;br/&gt;
There is a bug in a while loop where bread is called.&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;
    depth = ext_depth(inode);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (path) {
                &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; k = i = depth;
                &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; (--k &amp;gt; 0)
                        path[k].p_block =
                                le16_to_cpu(path[k].p_hdr-&amp;gt;eh_entries)+1;
        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                path = kzalloc(sizeof(struct ldiskfs_ext_path) *
                               LDISKFS_SB(inode-&amp;gt;i_sb)-&amp;gt;s_max_ext_tree_depth,
                               GFP_NOFS);
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (path == NULL) {
                        ldiskfs_journal_stop(handle);
                        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; -ENOMEM;
                }
                path[0].p_depth = depth;
                path[0].p_hdr = ext_inode_hdr(inode);
                i = 0;
 
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (ldiskfs_ext_check(inode, path[0].p_hdr, depth, 0)) {
                        err = -EIO;
                        &lt;span class=&quot;code-keyword&quot;&gt;goto&lt;/span&gt; out;
                }
        }
        err = 0;
 
        &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; (i &amp;gt;= 0 &amp;amp;&amp;amp; err == 0) {
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (i == depth) {
                        &lt;span class=&quot;code-comment&quot;&gt;/* &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; is leaf block */&lt;/span&gt;
                        err = ldiskfs_ext_rm_leaf(handle, inode, path,
                                               &amp;amp;partial_cluster, start,
                                               end);
                        &lt;span class=&quot;code-comment&quot;&gt;/* root level has p_bh == NULL, brelse() eats &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; */&lt;/span&gt;
                        brelse(path[i].p_bh);
                        path[i].p_bh = NULL;
                        i--;
                        &lt;span class=&quot;code-keyword&quot;&gt;continue&lt;/span&gt;;
                }
...
                        memset(path + i + 1, 0, sizeof(*path));
                        bh = read_extent_tree_block(inode,
                                ldiskfs_idx_pblock(path[i].p_idx), depth - i - 1,
                                LDISKFS_EX_NOCACHE);
                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (IS_ERR(bh)) {
                                &lt;span class=&quot;code-comment&quot;&gt;/* should we reset i_size? */&lt;/span&gt;
                                err = PTR_ERR(bh);
                                &lt;span class=&quot;code-keyword&quot;&gt;break&lt;/span&gt;;
                        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The allocation was done for s_max_ext_tree_depth elements. Iteration index start with 0. And compared with depth(number of elements). So&lt;br/&gt;
memset(path + i + 1, 0, sizeof(*path));&lt;br/&gt;
could zero memory outside the allocation. The depth is 5 at vmcore.&lt;/p&gt;</description>
                <environment></environment>
        <key id="53628">LU-11535</key>
            <summary>Memory corruption by ldiskfs_ext_remove_space slab-256</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="artem_blagodarenko">Artem Blagodarenko</assignee>
                                    <reporter username="artem_blagodarenko">Artem Blagodarenko</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Wed, 17 Oct 2018 12:07:20 +0000</created>
                <updated>Mon, 29 Oct 2018 16:13:34 +0000</updated>
                            <resolved>Mon, 29 Oct 2018 16:13:34 +0000</resolved>
                                                    <fixVersion>Lustre 2.12.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="235039" author="gerrit" created="Wed, 17 Oct 2018 13:24:28 +0000"  >&lt;p&gt;Artem Blagodarenko (c17828@cray.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/33388&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/33388&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11535&quot; title=&quot;Memory corruption by ldiskfs_ext_remove_space slab-256&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11535&quot;&gt;&lt;del&gt;LU-11535&lt;/del&gt;&lt;/a&gt; ldiskfs: allocate extra ldiskfs_ext_path for root&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: a1f4ee2715a0a5c8a46e3d3ea8cafb6ef5bc12a6&lt;/p&gt;</comment>
                            <comment id="235769" author="gerrit" created="Mon, 29 Oct 2018 15:57:59 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/33388/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/33388/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11535&quot; title=&quot;Memory corruption by ldiskfs_ext_remove_space slab-256&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11535&quot;&gt;&lt;del&gt;LU-11535&lt;/del&gt;&lt;/a&gt; ldiskfs: allocate extra ldiskfs_ext_path for root&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 7231a4d0d2661ddd81a2296064404529cb87605a&lt;/p&gt;</comment>
                            <comment id="235793" author="pjones" created="Mon, 29 Oct 2018 16:13:34 +0000"  >&lt;p&gt;Landed for 2.12&lt;/p&gt;</comment>
                    </comments>
                    <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|i004dj:</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>