<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:06: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-7187] Client does not sanitize jobstats variable</title>
                <link>https://jira.whamcloud.com/browse/LU-7187</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The Lustre client doesn&apos;t appear to sanitize the contents of the job stats variable. &lt;/p&gt;

&lt;p&gt;For example:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@client ~&amp;#93;&lt;/span&gt;# lctl set_param jobid_var=TESTINGVAR&lt;br/&gt;
jobid_var=TESTINGVAR&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;user@client test_dir&amp;#93;&lt;/span&gt;# export TESTINGVAR=$(echo -e &quot;test\n\n\a\b\tstring&quot;); touch example.file&lt;/p&gt;



&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;user@mds1 ~&amp;#93;&lt;/span&gt;# lctl get_param -n mdt.*.job_stats&lt;br/&gt;
job_stats:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;job_id:          test&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;        string&lt;br/&gt;
  snapshot_time:   1442594528&lt;br/&gt;
  open:            &lt;/p&gt;
{ samples:           1, unit:  reqs }
&lt;p&gt;  close:           &lt;/p&gt;
{ samples:           1, unit:  reqs }
&lt;p&gt;  mknod:           &lt;/p&gt;
{ samples:           0, unit:  reqs }
&lt;p&gt;  link:            &lt;/p&gt;
{ samples:           0, unit:  reqs }
&lt;p&gt;  unlink:          &lt;/p&gt;
{ samples:           0, unit:  reqs }
&lt;p&gt;  mkdir:           &lt;/p&gt;
{ samples:           0, unit:  reqs }
&lt;p&gt;  rmdir:           &lt;/p&gt;
{ samples:           0, unit:  reqs }
&lt;p&gt;  rename:          &lt;/p&gt;
{ samples:           0, unit:  reqs }
&lt;p&gt;  getattr:         &lt;/p&gt;
{ samples:           0, unit:  reqs }
&lt;p&gt;  setattr:         &lt;/p&gt;
{ samples:           1, unit:  reqs }
&lt;p&gt;  getxattr:        &lt;/p&gt;
{ samples:           0, unit:  reqs }
&lt;p&gt;  setxattr:        &lt;/p&gt;
{ samples:           0, unit:  reqs }
&lt;p&gt;  statfs:          &lt;/p&gt;
{ samples:           0, unit:  reqs }
&lt;p&gt;  sync:            &lt;/p&gt;
{ samples:           0, unit:  reqs }
&lt;p&gt;  samedir_rename:  &lt;/p&gt;
{ samples:           0, unit:  reqs }
&lt;p&gt;  crossdir_rename: &lt;/p&gt;
{ samples:           0, unit:  reqs }

&lt;p&gt;This also produces an audible bell (the \a).&lt;/p&gt;

&lt;p&gt;I wouldn&apos;t say this is a bug, but it is probably unintended behavior.  It&apos;s definitely reproducible. I&apos;ve tested with some various escape codes.  Probably my favorite thus far has been setting color codes. &lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
&amp;#8211;&lt;br/&gt;
Jesse&lt;/p&gt;</description>
                <environment>RHEL 6.6</environment>
        <key id="32220">LU-7187</key>
            <summary>Client does not sanitize jobstats variable</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</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="niu">Niu Yawei</assignee>
                                    <reporter username="hanleyja">Jesse Hanley</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 Sep 2015 16:57:40 +0000</created>
                <updated>Thu, 29 Oct 2015 12:53:58 +0000</updated>
                            <resolved>Fri, 2 Oct 2015 12:55:39 +0000</resolved>
                                    <version>Lustre 2.7.0</version>
                    <version>Lustre 2.5.4</version>
                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>10</watches>
                                                                            <comments>
                            <comment id="127807" author="adilger" created="Fri, 18 Sep 2015 17:20:57 +0000"  >&lt;p&gt;Probably the best/easiest thing to do is filter this at both the input and output of the jobid to use isprint() and replace non-printing characters with &apos;.&apos; or similar. At worst this could allow some collisions in the jobid statistics. &lt;/p&gt;</comment>
                            <comment id="127939" author="niu" created="Mon, 21 Sep 2015 02:27:30 +0000"  >&lt;p&gt;I don&apos;t think it&apos;s a bug, given that non-printable character is allowed in the jobid environment variable.&lt;br/&gt;
If user don&apos;t want the non-printable character for some reason, I think it&apos;s user app/script&apos;s (in user level) duty to set the restriction, so that won&apos;t affect other users who want non-printable character.&lt;/p&gt;</comment>
                            <comment id="127976" author="green" created="Mon, 21 Sep 2015 17:07:55 +0000"  >&lt;p&gt;Niu, I agree it&apos;s not strictly Lustre bug. But we might be a bit more proactive lookign for user&apos;s good here and still filter out unprintable characters anyway at least on the output.&lt;br/&gt;
So let&apos;s go with that, should not be hard to do.&lt;/p&gt;</comment>
                            <comment id="128029" author="niu" created="Tue, 22 Sep 2015 01:55:24 +0000"  >&lt;blockquote&gt;
&lt;p&gt;Niu, I agree it&apos;s not strictly Lustre bug. But we might be a bit more proactive lookign for user&apos;s good here and still filter out unprintable characters anyway at least on the output.&lt;br/&gt;
So let&apos;s go with that, should not be hard to do.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Sure, I think we can replace the non-printable character with some special character like &apos;?&apos; on the output side, so that to confine the output of jobid in single line.&lt;/p&gt;</comment>
                            <comment id="128034" author="gerrit" created="Tue, 22 Sep 2015 02:50:11 +0000"  >&lt;p&gt;Niu Yawei (yawei.niu@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/16593&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/16593&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7187&quot; title=&quot;Client does not sanitize jobstats variable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7187&quot;&gt;&lt;del&gt;LU-7187&lt;/del&gt;&lt;/a&gt; jobstats: confine the output of jobid to single line&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: c31038f1c6a2de133ec9c70e32f0bbd378552a74&lt;/p&gt;</comment>
                            <comment id="129090" author="gerrit" created="Fri, 2 Oct 2015 04:14:08 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/16593/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/16593/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7187&quot; title=&quot;Client does not sanitize jobstats variable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7187&quot;&gt;&lt;del&gt;LU-7187&lt;/del&gt;&lt;/a&gt; jobstats: confine the output of jobid to single line&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: fb60c82405ba7f84dd9dd5411e9bdae3ecb8cf4a&lt;/p&gt;</comment>
                            <comment id="129118" author="jgmitter" created="Fri, 2 Oct 2015 12:55:39 +0000"  >&lt;p&gt;Landed for 2.8.0&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|hzxo4f:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>