<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>14329</bug_id>
          
          <creation_ts>2011-09-28 18:23:05 +0000</creation_ts>
          <short_desc>Add a warning about high-volume traffic through MessagePort being a DOS risk for UAs and scripts</short_desc>
          <delta_ts>2011-10-25 00:01:24 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>Web Messaging (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#top</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>html5</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>57483</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-09-28 18:23:05 +0000</bug_when>
    <thetext>Specification: http://dev.w3.org/html5/postmsg/
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top

Comment:
I believe the possible DoS attack &quot;message flooding&quot; should be addressed i.e.
a rogue domain uses &quot;postMessage&quot; to crash an implementation, crash another
window etc.

Jean-Lou Dupont
html5@jldupont.com

Posted from: 173.178.98.120
User agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.21 Safari/535.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57641</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-10-02 16:40:30 +0000</bug_when>
    <thetext>Why would it crash anything? I don&apos;t understand the attack vector here. Can you elaborate?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57676</commentid>
    <comment_count>2</comment_count>
    <who name="Jean-Lou Dupont">html5</who>
    <bug_when>2011-10-03 00:03:21 +0000</bug_when>
    <thetext>E.g. domain &quot;R&quot; sending way too much messages to legitimate domain &quot;D&quot;.  Domain&apos;s &quot;D&quot; queue would fill up and the page might become unresponsive or legitimate messages would get dropped in queue because of overflow.

Wouldn&apos;t those cases be probable?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57735</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-10-03 23:44:02 +0000</bug_when>
    <thetext>How would domain R get access to a port to send something to D in the first place?

I can certainly add a note that mentions that user agents may wish to throttle the rate of message delivery so that it does not interfere with the user interface, and a note to authors saying that they should consider if the remote end is sending messages too fast and if so consider closing the port. Would that be sufficient?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57772</commentid>
    <comment_count>4</comment_count>
    <who name="Jean-Lou Dupont">html5</who>
    <bug_when>2011-10-04 15:36:31 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; How would domain R get access to a port to send something to D in the first
&gt; place?
Maybe my usage of the word &quot;rogue&quot; was a bit off.

&gt; 
&gt; I can certainly add a note that mentions that user agents may wish to throttle
&gt; the rate of message delivery so that it does not interfere with the user
&gt; interface, and a note to authors saying that they should consider if the remote
&gt; end is sending messages too fast and if so consider closing the port. Would
&gt; that be sufficient?

Since queue parameters (i.e. depth, rate, policy strategy etc) don&apos;t seem to get standardize in W3, your proposal to add a cautionary note appears adequate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58810</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-10-25 00:01:10 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Partially Accepted
Change Description: see diff given below
Rationale: I added some informative text about this to the window.postMessage() section. I didn&apos;t add anything to the MessagePort section since an attacker couldn&apos;t get a MessagePort from another domain unless the other domain explicitly sent one to the attacker. Let me know if you think I should add anything else.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58811</commentid>
    <comment_count>6</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-10-25 00:01:24 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r6743.
Check-in comment: Mention some DOS risks with window.postMessage().
http://html5.org/tools/web-apps-tracker?from=6742&amp;to=6743</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>