<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:13: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-7944] Suspicious dereference of pointer before NULL check in mdt_obd_connect()</title>
                <link>https://jira.whamcloud.com/browse/LU-7944</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Suspicious dereference of pointer &apos;data&apos; before NULL check at line 5174&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;An event which alters the program&apos;s state, leading to the defect&lt;br/&gt;
mdt_handler.c:5163: &apos;data&apos; is dereferenced.&lt;/li&gt;
	&lt;li&gt;An event which alters the program&apos;s state, leading to the defect&lt;br/&gt;
mdt_handler.c:5174: &apos;data&apos; is checked for NULL.&lt;/li&gt;
&lt;/ul&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;5144		&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; mdt_obd_connect(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lu_env *env,
5145					   struct obd_export **exp, struct obd_device *obd,
5146					   struct obd_uuid *cluuid,
5147					   struct obd_connect_data *data,
5148					   void *localdata)
5149		{
5150			struct obd_export	*lexp;
5151			struct lustre_handle	conn = { 0 };
5152			struct mdt_device	*mdt;
5153			&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;			 rc;
5154			lnet_nid_t		*client_nid = localdata;
5155			ENTRY;
5156		 
5157			LASSERT(env != NULL);
5158			&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!exp || !obd || !cluuid)
5159				RETURN(-EINVAL);
5160		 
5161			mdt = mdt_dev(obd-&amp;gt;obd_lu_dev);
5162		 
5163			&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ((data-&amp;gt;ocd_connect_flags &amp;amp; OBD_CONNECT_MDS_MDS) &amp;amp;&amp;amp;
5164			    !(data-&amp;gt;ocd_connect_flags &amp;amp; OBD_CONNECT_LIGHTWEIGHT)) {...}
5168		 
5169			/*
5170			 * first, check whether the stack is ready to handle requests
5171			 * XXX: probably not very appropriate method is used now
5172			 *      at some point we should find a better one
5173			 */
5174			&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!test_bit(MDT_FL_SYNCED, &amp;amp;mdt-&amp;gt;mdt_state) &amp;amp;&amp;amp; data != NULL &amp;amp;&amp;amp;
5175			    !(data-&amp;gt;ocd_connect_flags &amp;amp; OBD_CONNECT_LIGHTWEIGHT) &amp;amp;&amp;amp;
5176			    !(data-&amp;gt;ocd_connect_flags &amp;amp; OBD_CONNECT_MDS_MDS)) {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="35685">LU-7944</key>
            <summary>Suspicious dereference of pointer before NULL check in mdt_obd_connect()</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="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="3">Duplicate</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="dmiter">Dmitry Eremin</reporter>
                        <labels>
                    </labels>
                <created>Tue, 29 Mar 2016 17:13:22 +0000</created>
                <updated>Sun, 13 May 2018 13:36:01 +0000</updated>
                            <resolved>Sun, 13 May 2018 13:35:32 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="227779" author="arshad512" created="Sun, 13 May 2018 01:22:34 +0000"  >&lt;p&gt;While attempting to provide a fix for this. I noticed that this bug is already fixed by Fan&apos;s patch &lt;a href=&quot;https://review.whamcloud.com/#/c/20391/2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/20391/2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks&lt;br/&gt;
Arshad&lt;/p&gt;</comment>
                            <comment id="227780" author="pjones" created="Sun, 13 May 2018 13:35:32 +0000"  >&lt;p&gt;Thanks Arshad. Closing as a duplicate of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8182&quot; title=&quot;Suspicious code in mdt_obd_connect&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8182&quot;&gt;&lt;del&gt;LU-8182&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="37124">LU-8182</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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|hzy647:</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>