<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:59:44 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-13257] client local DoS -- ASSERTION( fd-&gt;fd_grouplock.lg_lock != ((void *)0) ) failed after &apos;setflags&apos;</title>
                <link>https://jira.whamcloud.com/browse/LU-13257</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Basically, from the moment anyone can do setflags, we shouldn&apos;t trust flags for anything that might crash the client.&lt;/p&gt;

&lt;p&gt;Not sure how much we care about lustre client local crash, but this should be a trivial fix (replace LBUG by some warning + return einval? I don&apos;t think we can restrict setflags to root-only, but even that would be dubious to me. Alternatively prevent setflags/clearflags from touching this particular bit?..)&lt;/p&gt;


&lt;p&gt;I found this by adding some lustre ioctl definitions to the trinity syscall fuzzer and letting it run for a (very short) bit, I bet there are other low hanging fruits. I might set an intern on this (putting more lustre-specific stuff in trinity and reporting bugs) if you&apos;re interested.&lt;br/&gt;
(And if you&apos;re not interested I can submit a patch around next month, no time right now and already got too distracted...)&lt;/p&gt;


&lt;p&gt;Reproducer:&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-c&quot;&gt;
&lt;span class=&quot;code-macro&quot;&gt;#include &lt;span class=&quot;code-quote-red&quot;&gt;&amp;lt;linux/fs.h&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;code-macro&quot;&gt;#include &lt;span class=&quot;code-quote-red&quot;&gt;&amp;lt;linux/types.h&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;code-macro&quot;&gt;#include &lt;span class=&quot;code-quote-red&quot;&gt;&amp;lt;sys/ioctl.h&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;code-macro&quot;&gt;#include &lt;span class=&quot;code-quote-red&quot;&gt;&amp;lt;sys/stat.h&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;code-macro&quot;&gt;#include &lt;span class=&quot;code-quote-red&quot;&gt;&amp;lt;fcntl.h&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;code-macro&quot;&gt;#include &lt;span class=&quot;code-quote-red&quot;&gt;&amp;lt;linux/lustre/lustre_idl.h&amp;gt;&lt;/span&gt;
&lt;/span&gt;
&lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; main(&lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; argc, &lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt;&lt;/span&gt; *argv[]) {
	&lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; fd;
	&lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; flags = 0x2;
	if ((fd = open(argv[1], O_CREAT|O_RDWR)) &amp;lt; 0)
		&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; -1;
	ioctl(fd, LL_IOC_SETFLAGS, &amp;amp;flags);
	ioctl(fd, LL_IOC_GROUP_UNLOCK, &lt;span class=&quot;code-keyword&quot;&gt;NULL&lt;/span&gt;);
	&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; 0;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="58106">LU-13257</key>
            <summary>client local DoS -- ASSERTION( fd-&gt;fd_grouplock.lg_lock != ((void *)0) ) failed after &apos;setflags&apos;</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="martinetd">Dominique Martinet</assignee>
                                    <reporter username="martinetd">Dominique Martinet</reporter>
                        <labels>
                    </labels>
                <created>Mon, 17 Feb 2020 16:01:04 +0000</created>
                <updated>Tue, 23 Jan 2024 16:25:56 +0000</updated>
                                            <version>Lustre 2.14.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="263468" author="pjones" created="Mon, 17 Feb 2020 16:31:32 +0000"  >&lt;p&gt;Thanks Dominque&lt;/p&gt;</comment>
                            <comment id="400841" author="gerrit" created="Tue, 23 Jan 2024 16:25:56 +0000"  >&lt;p&gt;&quot;Vitaly Fertman &amp;lt;vitaly.fertman@hpe.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/53782&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/53782&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13257&quot; title=&quot;client local DoS -- ASSERTION( fd-&amp;gt;fd_grouplock.lg_lock != ((void *)0) ) failed after &amp;#39;setflags&amp;#39;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13257&quot;&gt;LU-13257&lt;/a&gt; llite: Disallow users to set/clear group lock flag&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 341145d5810bfedcbc1ab1d13c3f01171b32c3a9&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|i00tuv:</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>