<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:38:29 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-10822] sanity test 27b fails with &#8220;*** buffer overflow detected ***: /usr/bin/lfs terminated&#8221;</title>
                <link>https://jira.whamcloud.com/browse/LU-10822</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;sanity test_27b fails with error&#160;&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;/usr/lib64/lustre/tests/sanity.sh: line 1434: [: -eq: unary operator expected
&#160;sanity test_27b: @@@@@@ FAIL: two-stripe file doesn&apos;t have two stripes
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;Looking at the client test_log, we see what the real issue is&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;== sanity test 27b: create and write to two stripe file ============================================== 09:49:29 (1521020969)

*** buffer overflow detected ***: /usr/bin/lfs terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f656102c7e5]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f65610ce15c]
/lib/x86_64-linux-gnu/libc.so.6(+0x117160)[0x7f65610cc160]
/lib/x86_64-linux-gnu/libc.so.6(+0x1168dd)[0x7f65610cb8dd]
/lib/x86_64-linux-gnu/libc.so.6(__snprintf_chk+0x78)[0x7f65610cb7f8]
/usr/lib/liblustreapi.so.1(+0x10065)[0x7f65617ca065]
/usr/lib/liblustreapi.so.1(+0x78ec)[0x7f65617c18ec]
/usr/lib/liblustreapi.so.1(+0x9f64)[0x7f65617c3f64]
/usr/bin/lfs[0x413e87]
/usr/lib/liblustreapi.so.1(Parser_execarg+0x51)[0x7f65617d5381]
/usr/bin/lfs[0x4042cc]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f6560fd5830]
/usr/bin/lfs[0x404349]
======= Memory map: ========
00400000-00421000 r-xp 00000000 fd:01 1451341&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /usr/bin/lfs
00621000-00622000 r--p 00021000 fd:01 1451341&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /usr/bin/lfs
00622000-00623000 rw-p 00022000 fd:01 1451341&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;/usr/bin/lfs
009b6000-009d7000 rw-p 00000000 00:00 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; [heap]
7f6560408000-7f656041e000 r-xp 00000000 fd:01 5767689&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libgcc_s.so.1
7f656041e000-7f656061d000 ---p 00016000 fd:01 5767689&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libgcc_s.so.1
7f656061d000-7f656061e000 rw-p 00015000 fd:01 5767689&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libgcc_s.so.1
7f656061e000-7f6560643000 r-xp 00000000 fd:01 5767774&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libtinfo.so.5.9
7f6560643000-7f6560842000 ---p 00025000 fd:01 5767774&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libtinfo.so.5.9
7f6560842000-7f6560846000 r--p 00024000 fd:01 5767774&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libtinfo.so.5.9
7f6560846000-7f6560847000 rw-p 00028000 fd:01 5767774&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libtinfo.so.5.9
7f6560847000-7f656094f000 r-xp 00000000 fd:01 5767444&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libm-2.23.so
7f656094f000-7f6560b4e000 ---p 00108000 fd:01 5767444&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libm-2.23.so
7f6560b4e000-7f6560b4f000 r--p 00107000 fd:01 5767444&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libm-2.23.so
7f6560b4f000-7f6560b50000 rw-p 00108000 fd:01 5767444&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libm-2.23.so
7f6560b50000-7f6560b6d000 r-xp 00000000 fd:01 1453147&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.4
7f6560b6d000-7f6560d6d000 ---p 0001d000 fd:01 1453147&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.4
7f6560d6d000-7f6560d6e000 r--p 0001d000 fd:01 1453147&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.4
7f6560d6e000-7f6560d6f000 rw-p 0001e000 fd:01 1453147&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.4
7f6560d6f000-7f6560dac000 r-xp 00000000 fd:01 5767753&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libreadline.so.6.3
7f6560dac000-7f6560fac000 ---p 0003d000 fd:01 5767753&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libreadline.so.6.3
7f6560fac000-7f6560fae000 r--p 0003d000 fd:01 5767753&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libreadline.so.6.3
7f6560fae000-7f6560fb4000 rw-p 0003f000 fd:01 5767753&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libreadline.so.6.3
7f6560fb4000-7f6560fb5000 rw-p 00000000 00:00 0
7f6560fb5000-7f6561175000 r-xp 00000000 fd:01 5767448&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libc-2.23.so
7f6561175000-7f6561375000 ---p 001c0000 fd:01 5767448&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libc-2.23.so
7f6561375000-7f6561379000 r--p 001c0000 fd:01 5767448&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;/lib/x86_64-linux-gnu/libc-2.23.so
7f6561379000-7f656137b000 rw-p 001c4000 fd:01 5767448&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libc-2.23.so
7f656137b000-7f656137f000 rw-p 00000000 00:00 0
7f656137f000-7f6561397000 r-xp 00000000 fd:01 1451349&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /usr/lib/liblnetconfig.so.4.0.0
7f6561397000-7f6561596000 ---p 00018000 fd:01 1451349&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /usr/lib/liblnetconfig.so.4.0.0
7f6561596000-7f6561597000 r--p 00017000 fd:01 1451349&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /usr/lib/liblnetconfig.so.4.0.0
7f6561597000-7f6561598000 rw-p 00018000 fd:01 1451349&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /usr/lib/liblnetconfig.so.4.0.0
7f6561598000-7f65615a0000 rw-p 00000000 00:00 0
7f65615a0000-7f65615b9000 r-xp 00000000 fd:01 5767786&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libz.so.1.2.8
7f65615b9000-7f65617b8000 ---p 00019000 fd:01 5767786&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libz.so.1.2.8
7f65617b8000-7f65617b9000 r--p 00018000 fd:01 5767786&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libz.so.1.2.8
7f65617b9000-7f65617ba000 rw-p 00019000 fd:01 5767786&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/libz.so.1.2.8
7f65617ba000-7f65617de000 r-xp 00000000 fd:01 1451350&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /usr/lib/liblustreapi.so.1.0.0
7f65617de000-7f65619dd000 ---p 00024000 fd:01 1451350&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /usr/lib/liblustreapi.so.1.0.0
7f65619dd000-7f65619de000 r--p 00023000 fd:01 1451350&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /usr/lib/liblustreapi.so.1.0.0
7f65619de000-7f65619df000 rw-p 00024000 fd:01 1451350&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /usr/lib/liblustreapi.so.1.0.0
7f65619df000-7f65619e8000 rw-p 00000000 00:00 0
7f65619e8000-7f6561a0e000 r-xp 00000000 fd:01 5767446&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/ld-2.23.so
7f6561bfd000-7f6561c03000 rw-p 00000000 00:00 0
7f6561c0c000-7f6561c0d000 rw-p 00000000 00:00 0
7f6561c0d000-7f6561c0e000 r--p 00025000 fd:01 5767446&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/ld-2.23.so
7f6561c0e000-7f6561c0f000 rw-p 00026000 fd:01 5767446&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /lib/x86_64-linux-gnu/ld-2.23.so
7f6561c0f000-7f6561c10000 rw-p 00000000 00:00 0
7ffedfb87000-7ffedfba9000 rw-p 00000000 00:00 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; [stack]
7ffedfbef000-7ffedfbf2000 r--p 00000000 00:00 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; [vvar]
7ffedfbf2000-7ffedfbf4000 r-xp 00000000 00:00 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; [vsyscall]

/usr/lib64/lustre/tests/sanity.sh: line 1429:&#160; 5280 Aborted&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; (core dumped) $LFS getstripe -c $DIR/$tdir/$tfile&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It looks like this issue started on 2018-02-27 16:23:17 UTC. So far, we&#8217;ve only seen this while testing Ubuntu 16.04 clients.&lt;/p&gt;

&lt;p&gt;&#160;Here are logs for a few failed test suites&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://testing.hpdd.intel.com/test_sets/5ae8fc72-287c-11e8-9e0e-52540065bddc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://testing.hpdd.intel.com/test_sets/5ae8fc72-287c-11e8-9e0e-52540065bddc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://testing.hpdd.intel.com/test_sets/9f2131ee-2894-11e8-b3c6-52540065bddc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://testing.hpdd.intel.com/test_sets/9f2131ee-2894-11e8-b3c6-52540065bddc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://testing.hpdd.intel.com/test_sets/f530fcd0-1cb5-11e8-a7cd-52540065bddc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://testing.hpdd.intel.com/test_sets/f530fcd0-1cb5-11e8-a7cd-52540065bddc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://testing.hpdd.intel.com/test_sets/4d231688-2195-11e8-b046-52540065bddc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://testing.hpdd.intel.com/test_sets/4d231688-2195-11e8-b046-52540065bddc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In these test sessions, test 27f, 27i, 27z, 27C, 27F, 56a, 56w, 56wb, 56wc, 56x, 56xa, 56xb, 65i, 102b, 102c, 102d, 102f, 102j, 130a/b/c/d/e, 229, 270a/c/d, 311 fail with a buffer overflow detected in lfs.&lt;/p&gt;

&lt;p&gt;In these test sessions, we also see the follow tests fail with this error:&lt;/p&gt;

&lt;p&gt;sanity-lfsck 18d, 18e, 18g, 20a, 20b&lt;/p&gt;

&lt;p&gt;sanityn test 51c&lt;/p&gt;

&lt;p&gt;sanity-hsm test 11a&lt;/p&gt;

&lt;p&gt;sanity-flr test 0a, 0b, 0c, 0d, 0e, 0f, 0g, 0h, 1, 2, 4, 5, 32, 32, 36, 37, 38, 39, 40, 41, 42, 43, 45, 200&lt;/p&gt;

&lt;p&gt;sanity-dom test 42e, 251, 51c, 51d&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="51394">LU-10822</key>
            <summary>sanity test 27b fails with &#8220;*** buffer overflow detected ***: /usr/bin/lfs terminated&#8221;</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="simmonsja">James A Simmons</assignee>
                                    <reporter username="jamesanunez">James Nunez</reporter>
                        <labels>
                            <label>ubuntu</label>
                    </labels>
                <created>Fri, 16 Mar 2018 14:20:15 +0000</created>
                <updated>Fri, 30 Mar 2018 23:47:43 +0000</updated>
                            <resolved>Fri, 30 Mar 2018 23:47:43 +0000</resolved>
                                    <version>Lustre 2.11.0</version>
                                    <fixVersion>Lustre 2.11.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                            <comments>
                            <comment id="224577" author="jmiller" created="Mon, 26 Mar 2018 21:26:36 +0000"  >&lt;p&gt;I am also seeing a buffer overflow with `lfs getstripe` on a SLES12SP3 client running 2.10.59&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;# lfs setstripe -c -1 all_ost
# lfs getstripe all_ost
*** buffer overflow detected ***: lfs terminated
======= Backtrace: =========
/lib64/libc.so.6(+0x721af)[0x7f0dbfecb1af]
/lib64/libc.so.6(__fortify_fail+0x37)[0x7f0dbff52dc7]
/lib64/libc.so.6(+0xf8050)[0x7f0dbff51050]
/lib64/libc.so.6(+0xf77bb)[0x7f0dbff507bb]
/lib64/libc.so.6(__snprintf_chk+0x78)[0x7f0dbff506d8]
/usr/lib64/liblustreapi.so.1(+0xfce4)[0x7f0dc0b5ece4]
/usr/lib64/liblustreapi.so.1(+0x7e7c)[0x7f0dc0b56e7c]
/usr/lib64/liblustreapi.so.1(+0xa354)[0x7f0dc0b59354]
lfs[0x413958]
/usr/lib64/liblustreapi.so.1(Parser_execarg+0x51)[0x7f0dc0b69511]
lfs[0x40478e]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f0dbfe796e5]
lfs[0x404809]
======= Memory map: ========
00400000-00421000 r-xp 00000000 07:02 8959                               /usr/bin/lfs
00620000-00621000 r--p 00020000 07:02 8959                               /usr/bin/lfs
00621000-00622000 rw-p 00021000 07:02 8959                               /usr/bin/lfs
00622000-00643000 rw-p 00000000 00:00 0                                  [heap]
7f0dbfc42000-7f0dbfc58000 r-xp 00000000 07:02 3849                       /lib64/libgcc_s.so.1
7f0dbfc58000-7f0dbfe57000 ---p 00016000 07:02 3849                       /lib64/libgcc_s.so.1
7f0dbfe57000-7f0dbfe58000 r--p 00015000 07:02 3849                       /lib64/libgcc_s.so.1
7f0dbfe58000-7f0dbfe59000 rw-p 00016000 07:02 3849                       /lib64/libgcc_s.so.1
7f0dbfe59000-7f0dbfff2000 r-xp 00000000 00:17 49292                      /lib64/libc-2.22.so
7f0dbfff2000-7f0dc01f2000 ---p 00199000 00:17 49292                      /lib64/libc-2.22.so
7f0dc01f2000-7f0dc01f6000 r--p 00199000 00:17 49292                      /lib64/libc-2.22.so
7f0dc01f6000-7f0dc01f8000 rw-p 0019d000 00:17 49292                      /lib64/libc-2.22.so
7f0dc01f8000-7f0dc01fc000 rw-p 00000000 00:00 0
7f0dc01fc000-7f0dc02f8000 r-xp 00000000 00:17 64019                      /lib64/libm-2.22.so
7f0dc02f8000-7f0dc04f7000 ---p 000fc000 00:17 64019                      /lib64/libm-2.22.so
7f0dc04f7000-7f0dc04f8000 r--p 000fb000 00:17 64019                      /lib64/libm-2.22.so
7f0dc04f8000-7f0dc04f9000 rw-p 000fc000 00:17 64019                      /lib64/libm-2.22.so
7f0dc04f9000-7f0dc0518000 r-xp 00000000 07:02 47076                      /usr/lib64/libyaml-0.so.2.0.4
7f0dc0518000-7f0dc0717000 ---p 0001f000 07:02 47076                      /usr/lib64/libyaml-0.so.2.0.4
7f0dc0717000-7f0dc0718000 r--p 0001e000 07:02 47076                      /usr/lib64/libyaml-0.so.2.0.4
7f0dc0718000-7f0dc0719000 rw-p 0001f000 07:02 47076                      /usr/lib64/libyaml-0.so.2.0.4
7f0dc0719000-7f0dc0730000 r-xp 00000000 07:02 46012                      /usr/lib64/liblnetconfig.so.4.0.0
7f0dc0730000-7f0dc092f000 ---p 00017000 07:02 46012                      /usr/lib64/liblnetconfig.so.4.0.0
7f0dc092f000-7f0dc0930000 r--p 00016000 07:02 46012                      /usr/lib64/liblnetconfig.so.4.0.0
7f0dc0930000-7f0dc0931000 rw-p 00017000 07:02 46012                      /usr/lib64/liblnetconfig.so.4.0.0
7f0dc0931000-7f0dc0939000 rw-p 00000000 00:00 0
7f0dc0939000-7f0dc094e000 r-xp 00000000 00:17 64023                      /lib64/libz.so.1.2.8
7f0dc094e000-7f0dc0b4d000 ---p 00015000 00:17 64023                      /lib64/libz.so.1.2.8
7f0dc0b4d000-7f0dc0b4e000 r--p 00014000 00:17 64023                      /lib64/libz.so.1.2.8
7f0dc0b4e000-7f0dc0b4f000 rw-p 00015000 00:17 64023                      /lib64/libz.so.1.2.8
7f0dc0b4f000-7f0dc0b72000 r-xp 00000000 07:02 46051                      /usr/lib64/liblustreapi.so.1.0.0
7f0dc0b72000-7f0dc0d71000 ---p 00023000 07:02 46051                      /usr/lib64/liblustreapi.so.1.0.0
7f0dc0d71000-7f0dc0d72000 r--p 00022000 07:02 46051                      /usr/lib64/liblustreapi.so.1.0.0
7f0dc0d72000-7f0dc0d73000 rw-p 00023000 07:02 46051                      /usr/lib64/liblustreapi.so.1.0.0
7f0dc0d73000-7f0dc0d7c000 rw-p 00000000 00:00 0
7f0dc0d7c000-7f0dc0d9d000 r-xp 00000000 00:17 63705                      /lib64/ld-2.22.so
7f0dc0f3e000-7f0dc0f43000 rw-p 00000000 00:00 0
7f0dc0f9a000-7f0dc0f9c000 rw-p 00000000 00:00 0
7f0dc0f9c000-7f0dc0f9d000 r--p 00020000 00:17 63705                      /lib64/ld-2.22.so
7f0dc0f9d000-7f0dc0f9e000 rw-p 00021000 00:17 63705                      /lib64/ld-2.22.so
7f0dc0f9e000-7f0dc0f9f000 rw-p 00000000 00:00 0
7ffdfacaf000-7ffdfacd7000 rw-p 00000000 00:00 0                          [stack]
7ffdface7000-7ffdfacea000 r--p 00000000 00:00 0                          [vvar]
7ffdfacea000-7ffdfacec000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="224588" author="adilger" created="Mon, 26 Mar 2018 23:30:44 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=jmiller&quot; class=&quot;user-hover&quot; rel=&quot;jmiller&quot;&gt;jmiller&lt;/a&gt;, are you able to run this under &lt;tt&gt;gdb&lt;/tt&gt; or with &lt;tt&gt;ltrace&lt;/tt&gt; to get proper debugging symbols (may need &lt;tt&gt;-debug&lt;/tt&gt; RPM installed)?  That should make it more obvious what is going wrong, and hopefully get a fix more quickly.&lt;/p&gt;</comment>
                            <comment id="224738" author="paf" created="Wed, 28 Mar 2018 17:07:37 +0000"  >&lt;p&gt;Thanks for the suggestion, Andreas.&lt;/p&gt;

&lt;p&gt;Justin and I dug in to it using gdb + glibc debug, and I see what&apos;s wrong in cb_getstripe.&#160; It is unpleasantly subtle.&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;                snprintf((&lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *)&amp;amp;param-&amp;gt;fp_lmd-&amp;gt;lmd_lmm, param-&amp;gt;fp_lum_size,
                         &lt;span class=&quot;code-quote&quot;&gt;&quot;%s&quot;&lt;/span&gt;, fname); &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In this snprintf command, fp_lum_size is 4097 (path_max + 1).&lt;/p&gt;

&lt;p&gt;lmd_lmm is a struct 32 bytes in size.&lt;/p&gt;

&lt;p&gt;The snprintf check code in glibc checks this struct size against the string max passed in to snprintf, and, understandably, fails.&lt;/p&gt;

&lt;p&gt;The actual code works because fp_lmd is defined as:&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;struct lov_user_mds_data_v1 {
        lstat_t lmd_st;                 &lt;span class=&quot;code-comment&quot;&gt;/* MDS stat struct */&lt;/span&gt;
        struct lov_user_md_v1 lmd_lmm;  &lt;span class=&quot;code-comment&quot;&gt;/* LOV EA V1 user data */&lt;/span&gt;
} __attribute__((packed)); &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;(or _v3 - for this case, it doesn&apos;t matter which)&lt;/p&gt;

&lt;p&gt;And the allocation for it uses:&lt;br/&gt;
 &quot;sizeof(lstat_t) + param-&amp;gt;fp_lum_size&quot;&lt;/p&gt;

&lt;p&gt;for the size (fp_lum_size is the same value as earlier - 4097)&lt;/p&gt;

&lt;p&gt;So there is a buffer of sufficient size, and we&apos;re writing in to the middle of it.&#160; So the code will operate correctly, but the runtime check is understandably angry.&lt;/p&gt;

&lt;p&gt;We&apos;re writing to the address of a struct and using it as an arbitrary buffer.&#160; We should be explicit about the buffer.&lt;/p&gt;

&lt;p&gt;I see two ways to make this saner, either of which would - I think? - placate the fortify checks:&lt;br/&gt;
 1. Use an explicit offset, ie, (pseudo code here) :&#160;&lt;/p&gt;

&lt;p&gt;((char *)&amp;amp;param-&amp;gt;fp_lmd) + offsetof(struct lov_user_mds_data.lmd_lmm))&lt;/p&gt;

&lt;p&gt;2. Make a union in lov_user_mds_data_v{1,3}, roughly like this:&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;struct lov_user_mds_data_v1 {
        lstat_t lmd_st;                 &lt;span class=&quot;code-comment&quot;&gt;/* MDS stat struct */&lt;/span&gt;
        union {
                struct lov_user_md_v1 lmd_lmm;  &lt;span class=&quot;code-comment&quot;&gt;/* LOV EA V1 user data */&lt;/span&gt;
                &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *path;  &lt;span class=&quot;code-comment&quot;&gt;/* Explicit pointer &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; file path */&lt;/span&gt;
        };
} __attribute__((packed));&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;Then&#160;&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;snprintf((param-&amp;gt;fp_lmd-&amp;gt;path, param-&amp;gt;fp_lum_size, &lt;span class=&quot;code-quote&quot;&gt;&quot;%s&quot;&lt;/span&gt;, fname);  &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The second seems better to me.&#160; Note I haven&apos;t tried either of these.&lt;/p&gt;</comment>
                            <comment id="224757" author="paf" created="Wed, 28 Mar 2018 19:52:10 +0000"  >&lt;p&gt;Got my pointer magic wrong, this looks to be correct.&#160; (This problem can be reproduced on rhel7 if you use D_FORTIFY_SOURCE)&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;diff --git a/lustre/include/uapi/linux/lustre/lustre_user.h b/lustre/include/uapi/linux/lustre/lustre_user.h
index 59956dc..56e8b4a 100644
--- a/lustre/include/uapi/linux/lustre/lustre_user.h
+++ b/lustre/include/uapi/linux/lustre/lustre_user.h
@@ -676,12 +676,18 @@ &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; inline __u32 lov_user_md_size(__u16 stripes, __u32 lmm_magic)
 #define lov_user_mds_data lov_user_mds_data_v1
 struct lov_user_mds_data_v1 {
        lstat_t lmd_st;                 &lt;span class=&quot;code-comment&quot;&gt;/* MDS stat struct */&lt;/span&gt;
-       struct lov_user_md_v1 lmd_lmm;  &lt;span class=&quot;code-comment&quot;&gt;/* LOV EA V1 user data */&lt;/span&gt;
+       union {
+               struct lov_user_md_v1 lmd_lmm;  &lt;span class=&quot;code-comment&quot;&gt;/* LOV EA V1 user data */&lt;/span&gt;
+               &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; path[0];  &lt;span class=&quot;code-comment&quot;&gt;/* Explicit pointer &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; file path */&lt;/span&gt;
+       };
 } __attribute__((packed)); struct lov_user_mds_data_v3 {
        lstat_t lmd_st;                 &lt;span class=&quot;code-comment&quot;&gt;/* MDS stat struct */&lt;/span&gt;
-       struct lov_user_md_v3 lmd_lmm;  &lt;span class=&quot;code-comment&quot;&gt;/* LOV EA V3 user data */&lt;/span&gt;
+       union {
+               struct lov_user_md_v3 lmd_lmm;  &lt;span class=&quot;code-comment&quot;&gt;/* LOV EA V1 user data */&lt;/span&gt;
+               &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; path[0];  &lt;span class=&quot;code-comment&quot;&gt;/* Explicit pointer &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; file path */&lt;/span&gt;
+       };
 } __attribute__((packed));
 #endifdiff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c
index 2c23a1a501..f46674ab8d 100644
--- a/lustre/utils/liblustreapi.c
+++ b/lustre/utils/liblustreapi.c
@@ -4507,8 +4507,7 @@ &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; cb_getstripe(&lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *path, DIR *parent, DIR **dirp, void *data,
                &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *fname = strrchr(path, &lt;span class=&quot;code-quote&quot;&gt;&apos;/&apos;&lt;/span&gt;);
                fname = (fname == NULL ? path : fname + 1);-               snprintf((&lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *)&amp;amp;param-&amp;gt;fp_lmd-&amp;gt;lmd_lmm, param-&amp;gt;fp_lum_size,
-                        &lt;span class=&quot;code-quote&quot;&gt;&quot;%s&quot;&lt;/span&gt;, fname);
+               snprintf(param-&amp;gt;fp_lmd-&amp;gt;path, param-&amp;gt;fp_lum_size, &lt;span class=&quot;code-quote&quot;&gt;&quot;%s&quot;&lt;/span&gt;, fname);                ret = ioctl(dirfd(parent), IOC_MDC_GETFILESTRIPE,
                            (void *)&amp;amp;param-&amp;gt;fp_lmd-&amp;gt;lmd_lmm); &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="224762" author="paf" created="Wed, 28 Mar 2018 20:13:19 +0000"  >&lt;p&gt;&lt;a href=&quot;https://review.whamcloud.com/31818&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/31818&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="224770" author="pjones" created="Wed, 28 Mar 2018 20:47:47 +0000"  >&lt;p&gt;There was a typo in the Jira reference in the commit message which was why this was not added automatically &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="224771" author="paf" created="Wed, 28 Mar 2018 20:52:25 +0000"  >&lt;p&gt;Ah, oops. &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="224776" author="gerrit" created="Wed, 28 Mar 2018 21:56:25 +0000"  >&lt;p&gt;Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/31822&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/31822&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10822&quot; title=&quot;sanity test 27b fails with &#8220;*** buffer overflow detected ***: /usr/bin/lfs terminated&#8221;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10822&quot;&gt;&lt;del&gt;LU-10822&lt;/del&gt;&lt;/a&gt; utils: quiet warnings about buffer overflow&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 8219624af9b62468347bf81a18cd35219c3f2a7c&lt;/p&gt;</comment>
                            <comment id="224875" author="gerrit" created="Fri, 30 Mar 2018 17:28:56 +0000"  >&lt;p&gt;John L. Hammond (john.hammond@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/31838&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/31838&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10822&quot; title=&quot;sanity test 27b fails with &#8220;*** buffer overflow detected ***: /usr/bin/lfs terminated&#8221;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10822&quot;&gt;&lt;del&gt;LU-10822&lt;/del&gt;&lt;/a&gt; utils: don&apos;t strip debian utils&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 03e3fbd3feee68932437a2077f618d54692785f4&lt;/p&gt;</comment>
                            <comment id="224891" author="gerrit" created="Fri, 30 Mar 2018 22:05:35 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/31822/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/31822/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10822&quot; title=&quot;sanity test 27b fails with &#8220;*** buffer overflow detected ***: /usr/bin/lfs terminated&#8221;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10822&quot;&gt;&lt;del&gt;LU-10822&lt;/del&gt;&lt;/a&gt; utils: stop bogus buffer overflow errors&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 7de178ba4afcf8c50c5430b861c9d0eeb84f800f&lt;/p&gt;</comment>
                            <comment id="224896" author="adilger" created="Fri, 30 Mar 2018 23:47:43 +0000"  >&lt;p&gt;The spurious stack overflows have been resolved.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </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|hzzuhr:</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>