<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:13:03 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-7919] Buffer overflow in mount_lustre: parse_ldd(),append_option()</title>
                <link>https://jira.whamcloud.com/browse/LU-7919</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;buffer overflow in mount_lustre: parse_ldd(),append_option()&lt;/p&gt;

&lt;p&gt;Reproduction Steps:&lt;br/&gt;
================&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@dev-1 tests&amp;#93;&lt;/span&gt;# sh llmount.sh&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@dev-1 tests&amp;#93;&lt;/span&gt;# rm -f /tmp/A2000; for x in $(seq 1 4000); do echo -n A &amp;gt;&amp;gt; /tmp/A2000 ; done&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@dev-1 tests&amp;#93;&lt;/span&gt;# umount /mnt/mds1&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@dev-1 tests&amp;#93;&lt;/span&gt;# losetup /dev/loop0 /tmp/lustre-mdt1&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@dev-1 tests&amp;#93;&lt;/span&gt;# mount -t lustre /dev/loop0 /mnt/mds1 -o option4kplus=$(cat /tmp/A2000 )&lt;/p&gt;

&lt;p&gt;failure logs:&lt;br/&gt;
=========&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;[root@dev-1 tests]# mount -t lustre /dev/loop0 /mnt/mds1 -o option4kplus=$(cat /tmp/A2000 )
mount.lustre: mount /dev/loop0 at /mnt/mds1 failed: Invalid argument
This may have multiple causes.
Are the mount options correct?
Check the syslog &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; more info.
*** glibc detected *** /sbin/mount.lustre: free(): invalid next size (normal): 0x000000000234f050 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3bbc075e66]
/lib64/libc.so.6[0x3bbc0789b3]
/sbin/mount.lustre(main+0x411)[0x402f11]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x3bbc01ed5d]
/sbin/mount.lustre[0x4024a9]

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="35602">LU-7919</key>
            <summary>Buffer overflow in mount_lustre: parse_ldd(),append_option()</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="wc-triage">WC Triage</assignee>
                                    <reporter username="lokesh.jaliminche">Lokesh Nagappa Jaliminche</reporter>
                        <labels>
                            <label>mount</label>
                    </labels>
                <created>Fri, 25 Mar 2016 10:47:52 +0000</created>
                <updated>Thu, 27 Oct 2022 00:24:56 +0000</updated>
                            <resolved>Sat, 8 Oct 2016 19:11:07 +0000</resolved>
                                    <version>Lustre 2.8.0</version>
                                    <fixVersion>Lustre 2.9.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="146976" author="gerrit" created="Fri, 25 Mar 2016 22:02:51 +0000"  >&lt;p&gt;lokesh.jaliminche (lokesh.jaliminche@seagate.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/19158&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/19158&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7919&quot; title=&quot;Buffer overflow in mount_lustre: parse_ldd(),append_option()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7919&quot;&gt;&lt;del&gt;LU-7919&lt;/del&gt;&lt;/a&gt; mount: Buffer overflow issue while parsing mount&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 8fae5045d8f92ca8924dc33684903d032b06dd39&lt;/p&gt;</comment>
                            <comment id="161247" author="lokesh.jaliminche" created="Tue, 9 Aug 2016 11:06:42 +0000"  >&lt;p&gt;Regarding failure on test-board, &lt;br/&gt;
&lt;a href=&quot;https://testing.hpdd.intel.com/test_sets/bb6c7ec6-5de3-11e6-906c-5254006e85c2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://testing.hpdd.intel.com/test_sets/bb6c7ec6-5de3-11e6-906c-5254006e85c2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have checked on my local quartet setup, it is working properly.&lt;br/&gt;
My test case is looking for the error string when mount options exceeds the size limit , &lt;/p&gt;

&lt;p&gt;here are the logs on my local quartet setup&lt;br/&gt;
==================================&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;ogs on Local quartet setup intel master
== conf-sanity test 98: Buffer-overflow check &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; parsing mount_opts == 14:56:11 (1470734771)
start mds service on 192.168.56.147
Loading modules from /root/mrp/intel/lustre-wc/lustre
detected 1 online CPUs by sysfs
libcfs will create CPU partition based on online CPUs
debug=-1
subsystem_debug=all -lnet -lnd -pinger
../lnet/lnet/lnet options: &lt;span class=&quot;code-quote&quot;&gt;&apos;networks=tcp0(eth0) accept=all&apos;&lt;/span&gt;
gss/krb5 is not supported
quota/lquota options: &lt;span class=&quot;code-quote&quot;&gt;&apos;hash_lqs_cur_bits=3&apos;&lt;/span&gt;
pdsh@dev-8: 192.168.56.147: ssh exited with exit code 1
Starting mds1:   -o loop /tmp/lustre-mdt1 /mnt/lustre-mds1
pdsh@dev-8: 192.168.56.147: ssh exited with exit code 1
pdsh@dev-8: 192.168.56.147: ssh exited with exit code 1
Started lustre-MDT0000
start ost1 service on 192.168.56.145
pdsh@dev-8: 192.168.56.145: ssh exited with exit code 1
Starting ost1:   -o loop /tmp/lustre-ost1 /mnt/lustre-ost1
pdsh@dev-8: 192.168.56.145: ssh exited with exit code 1
pdsh@dev-8: 192.168.56.145: ssh exited with exit code 1
Started lustre-OST0000
mount lustre on /mnt/lustre.....
Starting client: dev-8:  -o user_xattr,flock 192.168.56.147@tcp:/lustre /mnt/lustre
setup single mount lustre success
stop mds service on 192.168.56.147
Stopping /mnt/lustre-mds1 (opts:-f) on 192.168.56.147
pdsh@dev-8: 192.168.56.147: ssh exited with exit code 1
start mds service on 192.168.56.147 pdsh@dev-8: 192.168.56.147: ssh exited with exit code 1 Starting mds1: -o user_xattr,user_xattr,user_xattr,user_xattr,loop /tmp/lustre-mdt1 /mnt/lustre-mds1 192.168.56.147: error: mount options exceeds page size of kernel pdsh@dev-8: 192.168.56.147: ssh exited with exit code 7 Start of /tmp/lustre-mdt1 on mds1 failed 7
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Test case checks for this string &lt;font color=&quot;Green&quot;&gt;  error: mount options exceeds page size of kernel &lt;/font&gt; but instead I am getting different error on Maloo test-board&lt;/p&gt;

&lt;p&gt;Logs on Maloo Test-Board&lt;br/&gt;
=====================&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;
== conf-sanity test 98: Buffer-overflow check &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; parsing mount_opts =============================== 02:11:19 (1470708679)
start mds service on trevis-57vm7
CMD: trevis-57vm7 mkdir -p /mnt/lustre-mds1
Loading modules from /usr/lib64/lustre
detected 1 online CPUs by sysfs
libcfs will create CPU partition based on online CPUs
debug=-1
subsystem_debug=all -lnet -lnd -pinger
CMD: trevis-57vm7 test -b /dev/lvm-Role_MDS/P1
CMD: trevis-57vm7 e2label /dev/lvm-Role_MDS/P1
Starting mds1:   /dev/lvm-Role_MDS/P1 /mnt/lustre-mds1
CMD: trevis-57vm7 mkdir -p /mnt/lustre-mds1; mount -t lustre   		                   /dev/lvm-Role_MDS/P1 /mnt/lustre-mds1
CMD: trevis-57vm7 /usr/sbin/lctl get_param -n health_check
CMD: trevis-57vm7 PATH=/usr/lib64/lustre/tests:/usr/lib/lustre/tests:/usr/lib64/lustre/tests:/opt/iozone/bin:/usr/lib64/lustre/tests&lt;span class=&quot;code-comment&quot;&gt;//usr/lib64/lustre/tests:/usr/lib64/lustre/tests:/usr/lib64/lustre/tests/../utils:/opt/iozone/bin:/usr/lib64/lustre/tests/mpi:/usr/lib64/lustre/tests/racer:/usr/lib64/lustre/../lustre-iokit/sgpdd-survey:/usr/lib64/lustre/tests:/usr/lib64/lustre/utils/gss:/usr/lib64/lustre/utils:/usr/lib64/qt-3.3/bin:/usr/lib64/compat-openmpi16/bin:/usr/bin:/bin:/usr/sbin:/sbin::/sbin:/bin:/usr/sbin: NAME=autotest_config sh rpc.sh set_default_debug \&lt;span class=&quot;code-quote&quot;&gt;&quot;-1\&quot;&lt;/span&gt; \&lt;span class=&quot;code-quote&quot;&gt;&quot;all -lnet -lnd -pinger\&quot;&lt;/span&gt; 4 
&lt;/span&gt;CMD: trevis-57vm7 e2label /dev/lvm-Role_MDS/P1 				2&amp;gt;/dev/&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; | grep -E &lt;span class=&quot;code-quote&quot;&gt;&apos;:[a-zA-Z]{3}[0-9]{4}&apos;&lt;/span&gt;
CMD: trevis-57vm7 e2label /dev/lvm-Role_MDS/P1 				2&amp;gt;/dev/&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; | grep -E &lt;span class=&quot;code-quote&quot;&gt;&apos;:[a-zA-Z]{3}[0-9]{4}&apos;&lt;/span&gt;
CMD: trevis-57vm7 e2label /dev/lvm-Role_MDS/P1 2&amp;gt;/dev/&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;
.
.
.
CMD: trevis-57vm7 umount -d -f /mnt/lustre-mds3
CMD: trevis-57vm7 lsmod | grep lnet &amp;gt; /dev/&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; &amp;amp;&amp;amp; lctl dl | grep &lt;span class=&quot;code-quote&quot;&gt;&apos; ST &apos;&lt;/span&gt;
stop mds service on trevis-57vm3
CMD: trevis-57vm3 grep -c /mnt/lustre-mds4&lt;span class=&quot;code-quote&quot;&gt;&apos; &apos;&lt;/span&gt; /proc/mounts
Stopping /mnt/lustre-mds4 (opts:-f) on trevis-57vm3
CMD: trevis-57vm3 umount -d -f /mnt/lustre-mds4
CMD: trevis-57vm3 lsmod | grep lnet &amp;gt; /dev/&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; &amp;amp;&amp;amp; lctl dl | grep &lt;span class=&quot;code-quote&quot;&gt;&apos; ST &apos;&lt;/span&gt;
start mds service on trevis-57vm7 CMD: trevis-57vm7 mkdir -p /mnt/lustre-mds1 CMD: trevis-57vm7 test -b /dev/lvm-Role_MDS/P1 CMD: trevis-57vm7 e2label /dev/lvm-Role_MDS/P1 Starting mds1: -o user_xattr,user_xattr,user_xattr,user_xattr,user_xattr,user_xattr /dev/lvm-Role_MDS/P1 /mnt/lustre-mds1 pdsh@trevis-57vm1: trevis-57vm7: mcmd: Bad read of expected verification number off of stderr socket: Success Start of /dev/lvm-Role_MDS/P1 on mds1 failed 254
 conf-sanity test_98: @@@@@@ FAIL: Buffer overflow check failed 
  Trace dump:
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In above logs I am getting this error &lt;br/&gt;
&lt;font color=&quot;red&quot;&gt; &quot;mcmd: Bad read of expected verification number off of stderr socket: Success Start of /dev/lvm-Role_MDS/P1 on mds1 failed 254&quot;&lt;/font&gt;&lt;br/&gt;
 which is unexpected. I am not sure if  this is happening because of my patch, can someone please help me get more info on this ?&lt;/p&gt;</comment>
                            <comment id="168807" author="gerrit" created="Sat, 8 Oct 2016 16:38:31 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/19158/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/19158/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7919&quot; title=&quot;Buffer overflow in mount_lustre: parse_ldd(),append_option()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7919&quot;&gt;&lt;del&gt;LU-7919&lt;/del&gt;&lt;/a&gt; mount: Buffer overflow issue while parsing mount&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 00049e341a1e978c635b44f1d3ae474d0eb75f10&lt;/p&gt;</comment>
                            <comment id="168825" author="pjones" created="Sat, 8 Oct 2016 19:11:08 +0000"  >&lt;p&gt;Landed for 2.9&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="35746">LU-7965</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="54308">LU-11785</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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|hzy5ov:</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>