<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:02:16 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-6674] struct lov_user_mds_data can be used uninitialized</title>
                <link>https://jira.whamcloud.com/browse/LU-6674</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In function cb_find_init():3003 requested the lmd structure but it filled partially and struct lov_user_mds_data becomes uninitialized because of following code in ll_dir_ioctl():&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; (cmd == IOC_MDC_GETFILEINFO ||
                    cmd == IOC_MDC_GETFILESTRIPE) {
			filename = ll_getname((&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; __user *)arg);
                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (IS_ERR(filename))
                                RETURN(PTR_ERR(filename));

                        rc = ll_lov_getstripe_ea_info(inode, filename, &amp;amp;lmm,
                                                      &amp;amp;lmmsize, &amp;amp;request);
		} &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
			rc = ll_dir_getstripe(inode, (void **)&amp;amp;lmm, &amp;amp;lmmsize,
					      &amp;amp;request, 0);
		}
[...]
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc &amp;lt; 0) {
                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc == -ENODATA &amp;amp;&amp;amp; (cmd == IOC_MDC_GETFILEINFO ||
                                               cmd == LL_IOC_MDC_GETINFO))
                                GOTO(skip_lmm, rc = 0);
                        &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
                                GOTO(out_req, rc);
                }

                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (cmd == IOC_MDC_GETFILESTRIPE ||
                    cmd == LL_IOC_LOV_GETSTRIPE) {
			lump = (struct lov_user_md __user *)arg;
                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
			struct lov_user_mds_data __user *lmdp;
			lmdp = (struct lov_user_mds_data __user *)arg;
                        lump = &amp;amp;lmdp-&amp;gt;lmd_lmm;
                }
		&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (copy_to_user(lump, lmm, lmmsize)) {
			&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (copy_to_user(lump, lmm, sizeof(*lump)))
                                GOTO(out_req, rc = -EFAULT);
                        rc = -EOVERFLOW;
                }
        skip_lmm:
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="30472">LU-6674</key>
            <summary>struct lov_user_mds_data can be used uninitialized</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="dmiter">Dmitry Eremin</assignee>
                                    <reporter username="dmiter">Dmitry Eremin</reporter>
                        <labels>
                    </labels>
                <created>Tue, 2 Jun 2015 19:33:33 +0000</created>
                <updated>Fri, 24 Jul 2015 09:42:06 +0000</updated>
                            <resolved>Fri, 24 Jul 2015 09:42:06 +0000</resolved>
                                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="117199" author="gerrit" created="Tue, 2 Jun 2015 19:35:12 +0000"  >&lt;p&gt;Dmitry Eremin (dmitry.eremin@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/15109&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/15109&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6674&quot; title=&quot;struct lov_user_mds_data can be used uninitialized&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6674&quot;&gt;&lt;del&gt;LU-6674&lt;/del&gt;&lt;/a&gt;: test: test of uninitilized structure used&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 3f229741c9d5c5f8671fcbe953e19669cf222991&lt;/p&gt;</comment>
                            <comment id="117200" author="dmiter" created="Tue, 2 Jun 2015 19:37:59 +0000"  >&lt;p&gt;After this patch I got 6 sanity tests failures:&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;# grep &lt;span class=&quot;code-quote&quot;&gt;&quot;FAIL &quot;&lt;/span&gt; sanity.log 
FAIL 56y (1s)
FAIL 184c (18s)
FAIL 200 (31s)
FAIL 220 (18s)
FAIL 244 (2s)
FAIL 251 (1s)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="117327" author="pjones" created="Wed, 3 Jun 2015 18:26:32 +0000"  >&lt;p&gt;John&lt;/p&gt;

&lt;p&gt;Oleg thought that you might have some input to this one&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="117363" author="dmiter" created="Wed, 3 Jun 2015 22:01:23 +0000"  >&lt;p&gt;This functionality was add by &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;commit d39b08def6512ee6ae883a0db62cebd808646208
Author: jcl &amp;lt;jacques-charles.lafoucriere@cea.fr&amp;gt;
Date:   Wed Feb 20 11:18:23 2013 +0100

    LU-3363 api: HSM &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; uses &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; released pattern

    Import creates a released file using &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; RAID pattern flag
    Import used a &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ioctl() to implement the &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; in the
    client kernel.
    Add a -L|--layout option to lfs getstripe and lfs find

    Signed-off-by: JC Lafoucriere &amp;lt;jacques-charles.lafoucriere@cea.fr&amp;gt;
    Change-Id: I39103e6f90bd73dc09cde49086d223d717e41cd2
    Reviewed-on: http:&lt;span class=&quot;code-comment&quot;&gt;//review.whamcloud.com/6536
&lt;/span&gt;    Tested-by: Hudson
    Reviewed-by: Andreas Dilger &amp;lt;andreas.dilger@intel.com&amp;gt;
    Reviewed-by: Jinshan Xiong &amp;lt;jinshan.xiong@intel.com&amp;gt;
    Tested-by: Maloo &amp;lt;whamcloud.maloo@gmail.com&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It looks this issue was originally.&lt;/p&gt;</comment>
                            <comment id="117364" author="dmiter" created="Wed, 3 Jun 2015 22:14:33 +0000"  >&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;	/* Request MDS &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; the stat info &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; some of these parameters need
	 * to be compared. */
	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (param-&amp;gt;fp_obd_uuid || param-&amp;gt;fp_mdt_uuid ||
	    param-&amp;gt;fp_check_uid || param-&amp;gt;fp_check_gid ||
	    param-&amp;gt;fp_atime || param-&amp;gt;fp_mtime || param-&amp;gt;fp_ctime ||
	    param-&amp;gt;fp_check_pool || param-&amp;gt;fp_check_size ||
	    param-&amp;gt;fp_check_stripe_count || param-&amp;gt;fp_check_stripe_size ||
	    param-&amp;gt;fp_check_layout)
		decision = 0;

	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (param-&amp;gt;fp_type != 0 &amp;amp;&amp;amp; checked_type == 0)
                decision = 0;

	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (decision == 0) {
		ret = get_lmd_info(path, parent, dir, param-&amp;gt;fp_lmd,
				   param-&amp;gt;fp_lum_size);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The issue is &lt;em&gt;get_lmd_info()&lt;/em&gt; return &lt;b&gt;0&lt;/b&gt; and nothing in &lt;b&gt;param-&amp;gt;fp_lmd-&amp;gt;lmd_lmm&lt;/b&gt;. Therefore previous data or garbage is used for subsequent comparison:&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; (param-&amp;gt;fp_check_layout) {
		__u32 found;

		found = (param-&amp;gt;fp_lmd-&amp;gt;lmd_lmm.lmm_pattern &amp;amp; param-&amp;gt;fp_layout);
		&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ((param-&amp;gt;fp_lmd-&amp;gt;lmd_lmm.lmm_pattern == 0xFFFFFFFF) ||
		    (found &amp;amp;&amp;amp; param-&amp;gt;fp_exclude_layout) ||
		    (!found &amp;amp;&amp;amp; !param-&amp;gt;fp_exclude_layout)) {
			decision = -1;
			&lt;span class=&quot;code-keyword&quot;&gt;goto&lt;/span&gt; decided;
		}
	}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="120723" author="gerrit" created="Wed, 8 Jul 2015 17:12:50 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/15109/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/15109/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6674&quot; title=&quot;struct lov_user_mds_data can be used uninitialized&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6674&quot;&gt;&lt;del&gt;LU-6674&lt;/del&gt;&lt;/a&gt; utils: fix of uninitilized lmm structure usage&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 486d2797fc0d04e2482ecd4c7100919c55d07277&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|hzxeqv:</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>