[Webkit-unassigned] [Bug 220531] New: [GTK] Calling Blob.stream() causes a crash of the browser

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 11 21:49:14 PST 2021


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

            Bug ID: 220531
           Summary: [GTK] Calling Blob.stream() causes a crash of the
                    browser
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Keywords: Gtk
          Severity: Normal
          Priority: P3
         Component: DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: wz906234737 at gmail.com

Created attachment 417432

  --> https://bugs.webkit.org/attachment.cgi?id=417432&action=review

the script caused crash

1. Reproduce of the bug:

(1) open inspector window in `MiniBrowser`, running the following code (also attached as file) in console
(2) script:

// ===================================
(function () {
    const _1 = [new File(['content'], 'file1'),'a2']
    const _0 = new File(_1, 'file2');
    return _0.stream(); 
})();
// ===================================

It will cause a `Segmentation fault` crash. Using gdb to analysis the core dump file, you can find a null pointer dereference.

Part of the backtrace:

#0  0x00007f32b1cb4322 in JSC::ArrayBufferContents::sizeInBytes() const (this=0x10) at DerivedSources/ForwardingHeaders/JavaScriptCore/ArrayBuffer.h:82                              
#1  0x00007f32b1cb4301 in JSC::ArrayBufferContents::data() const (this=0x10) at DerivedSources/ForwardingHeaders/JavaScriptCore/ArrayBuffer.h:81                                     
#2  0x00007f32b23804e8 in JSC::ArrayBuffer::data() (this=0x0) at DerivedSources/ForwardingHeaders/JavaScriptCore/ArrayBuffer.h:187
                                                --------^ null pointer here ---------

#3  0x00007f32b52745fa in WebCore::FileReaderLoader::didReceiveData(char const*, int) (this=0x7f3297ff9dc8, data=0x7f3297f2e040 "content", dataLength=7)
    at ../../../Source/WebCore/fileapi/FileReaderLoader.cpp:209
        __PRETTY_FUNCTION__ = "virtual void WebCore::FileReaderLoader::didReceiveData(const char*, int)"
        length = 7
        remainingBufferSpace = 9

p.s. If you remove the `_0.stream()`, it will be safe.

2. I also reproduce the bug on `Safari Technology Preview` version on macbook. But it cannot be reproduced on `Safari Stable` version.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210112/931b9c60/attachment-0001.htm>


More information about the webkit-unassigned mailing list