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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>141763</bug_id>
          
          <creation_ts>2015-02-18 12:16:38 -0800</creation_ts>
          <short_desc>Opening too many WebSocket connections can cause a crash</short_desc>
          <delta_ts>2016-05-19 10:51:40 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Pranav">venkatsiva1994</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>dbates</cc>
    
    <cc>wilander</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1070190</commentid>
    <comment_count>0</comment_count>
      <attachid>246838</attachid>
    <who name="Pranav">venkatsiva1994</who>
    <bug_when>2015-02-18 12:16:38 -0800</bug_when>
    <thetext>Created attachment 246838
html file mentioned in above description

unlisted poc video link-&gt;

https://www.youtube.com/watch?v=m_rMN4M8a-c

Hi Team,


The maximum number of WebSocket connections that can be opened at a time must be preset ( for example firefox uses 200 as maximum number of WebSocket at instance ) but Safari(webkit) failed to implement it

for firefox you can go through about it here-&gt;
https://developer.mozilla.org/en/docs/WebSockets

&lt;script&gt;
var i=0;
while(1)
{
var connection = new WebSocket(&apos;ws://html5rocks.websocket.org/echo&apos;);
}
&lt;/script&gt;

above js creates infinite number of websockets.
on executing this file Safari(webkit) opens infinite websockets at the same instance which leads to crash of the browser,on serious condition crash of OS.The above website is taken for example (html5rocks.websocket.org) even it can be xyz.com or whatever.

The thing is, with Safari(webkit) we can open infinite websockets at an instance which leads to crash.Safari(webkit) doesnt handle it properly

Let me show &quot;how Safari(webkit) crashes&quot; and &quot;how Firefox handles this&quot;


first let me open Safari(webkit) , execute that file and show you the memory usage
as you can see...Safari(webkit) is taking lot of resources 
As you saw the browser crashed and system will crash on serious condition

now let me open the same thing firefox

same file

it just sent 193 requests then stopped inspite of infinite loop

even it didnt take much resources


with this vulnerability,attacker can remotely send this file and crash victim&apos;s browser


tested in mac&apos;s safari too(if poc needed let me give it)


waiting for good reply

thanks and regards

venkatesh





attached the html file :))</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088732</commentid>
    <comment_count>1</comment_count>
    <who name="Pranav">venkatsiva1994</who>
    <bug_when>2015-04-26 05:36:21 -0700</bug_when>
    <thetext>Why no reply from anyone ????</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1194602</commentid>
    <comment_count>2</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2016-05-18 20:55:03 -0700</bug_when>
    <thetext>Yikes! This looks bad -- I didn&apos;t notice this bug before. Thank you for reporting it!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>246838</attachid>
            <date>2015-02-18 12:16:38 -0800</date>
            <delta_ts>2015-02-18 12:16:38 -0800</delta_ts>
            <desc>html file mentioned in above description</desc>
            <filename>web_s.html</filename>
            <type>text/html</type>
            <size>142</size>
            <attacher name="Pranav">venkatsiva1994</attacher>
            
              <data encoding="base64">PGh0bWw+IAo8Ym9keT4KPHNjcmlwdD4KdmFyIGk9MDsKd2hpbGUoMSkKewp2YXIgY29ubmVjdGlv
biA9IG5ldyBXZWJTb2NrZXQoJ3dzOi8vaHRtbDVyb2Nrcy53ZWJzb2NrZXQub3JnL2VjaG8nKTsK
fQo8L3NjcmlwdD4KPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>