Closed Bug 1830096 Opened 1 year ago Closed 1 year ago

Crash [@ CanSend]

Categories

(Core :: DOM: Networking, defect)

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: jkratzer, Assigned: jesup)

References

(Blocks 2 open bugs)

Details

(Keywords: testcase, Whiteboard: [fuzzblocker], [wptsync upstream])

Crash Data

Attachments

(3 files, 1 obsolete file)

Testcase found while fuzzing mozilla-central rev c1dc21363c17 (built with: --enable-address-sanitizer). The testcase requires the grizzly-framework webtransport branch which is currently under heavy development.

Testcase can be reproduced using the following commands:

$ pip install fuzzfetch git+https://github.com/MozillaSecurity/grizzly@webtransport
$ python -m fuzzfetch --build c1dc21363c17 --asan -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.html --use-https
[@ CanSend]

    =================================================================
    ==1936969==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000011 (pc 0x7f49ca15158c bp 0x7ffe492ee870 sp 0x7ffe492ee780 T0)
    ==1936969==The signal is caused by a READ memory access.
    ==1936969==Hint: address points to the zero page.
        #0 0x7f49ca15158c in CanSend /builds/worker/workspace/obj-build/dist/include/mozilla/ipc/ProtocolUtils.h:222:45
        #1 0x7f49ca15158c in void mozilla::ipc::IProtocol::ChannelSend<RefPtr<mozilla::ipc::DataPipeSender>>(mozilla::UniquePtr<IPC::Message, mozilla::DefaultDelete<IPC::Message>>, unsigned int, std::function<void (RefPtr<mozilla::ipc::DataPipeSender>&&)>&&, std::function<void (mozilla::ipc::ResponseRejectReason)>&&) /builds/worker/workspace/obj-build/dist/include/mozilla/ipc/ProtocolUtils.h:277:9
        #2 0x7f49ca15127f in mozilla::dom::PWebTransportChild::SendCreateUnidirectionalStream(mozilla::Maybe<long> const&, std::function<void (RefPtr<mozilla::ipc::DataPipeSender>&&)>&&, std::function<void (mozilla::ipc::ResponseRejectReason)>&&) /builds/worker/workspace/obj-build/ipc/ipdl/PWebTransportChild.cpp:116:5
        #3 0x7f49ca121a9b in mozilla::dom::WebTransport::CreateUnidirectionalStream(mozilla::dom::WebTransportSendStreamOptions const&, mozilla::ErrorResult&) /dom/webtransport/api/WebTransport.cpp:653:11
        #4 0x7f49c59fe67c in createUnidirectionalStream /builds/worker/workspace/obj-build/dom/bindings/WebTransportBinding.cpp:1450:60
        #5 0x7f49c59fe67c in mozilla::dom::WebTransport_Binding::createUnidirectionalStream_promiseWrapper(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&) /builds/worker/workspace/obj-build/dom/bindings/WebTransportBinding.cpp:1466:13
        #6 0x7f49c66c894d in bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ConvertExceptionsToPromises>(JSContext*, unsigned int, JS::Value*) /dom/bindings/BindingUtils.cpp:3335:13
        #7 0x7f49d0a97703 in CallJSNative /js/src/vm/Interpreter.cpp:486:13
        #8 0x7f49d0a97703 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /js/src/vm/Interpreter.cpp:580:12
        #9 0x7f49d0abc9b6 in InternalCall /js/src/vm/Interpreter.cpp:647:10
        #10 0x7f49d0abc9b6 in CallFromStack /js/src/vm/Interpreter.cpp:652:10
        #11 0x7f49d0abc9b6 in js::Interpret(JSContext*, js::RunState&) /js/src/vm/Interpreter.cpp:3395:16
        #12 0x7f49d0a964a8 in MaybeEnterInterpreterTrampoline /js/src/vm/Interpreter.cpp:400:10
        #13 0x7f49d0a964a8 in js::RunScript(JSContext*, js::RunState&) /js/src/vm/Interpreter.cpp:458:13
        #14 0x7f49d0a978bc in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /js/src/vm/Interpreter.cpp:612:13
        #15 0x7f49d0a99836 in InternalCall /js/src/vm/Interpreter.cpp:647:10
        #16 0x7f49d0a99836 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /js/src/vm/Interpreter.cpp:679:8
        #17 0x7f49d101bea3 in js::CallSelfHostedFunction(JSContext*, JS::Handle<js::PropertyName*>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) /js/src/vm/SelfHosting.cpp:1473:10
        #18 0x7f49d0bc2e95 in AsyncFunctionResume(JSContext*, JS::Handle<js::AsyncFunctionGeneratorObject*>, ResumeKind, JS::Handle<JS::Value>) /js/src/vm/AsyncFunction.cpp:149:8
        #19 0x7f49d0f0ce2c in AsyncFunctionPromiseReactionJob /js/src/builtin/Promise.cpp:2111:12
        #20 0x7f49d0f0ce2c in PromiseReactionJob(JSContext*, unsigned int, JS::Value*) /js/src/builtin/Promise.cpp:2174:12
        #21 0x7f49d0a97703 in CallJSNative /js/src/vm/Interpreter.cpp:486:13
        #22 0x7f49d0a97703 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /js/src/vm/Interpreter.cpp:580:12
        #23 0x7f49d0a99836 in InternalCall /js/src/vm/Interpreter.cpp:647:10
        #24 0x7f49d0a99836 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /js/src/vm/Interpreter.cpp:679:8
        #25 0x7f49d0c04f6b in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /js/src/vm/CallAndConstruct.cpp:117:10
        #26 0x7f49c4c78ee3 in mozilla::dom::PromiseJobCallback::Call(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::ErrorResult&) /builds/worker/workspace/obj-build/dom/bindings/PromiseBinding.cpp:83:8
        #27 0x7f49c01433ea in Call /builds/worker/workspace/obj-build/dist/include/mozilla/dom/PromiseBinding.h:198:12
        #28 0x7f49c01433ea in Call /builds/worker/workspace/obj-build/dist/include/mozilla/dom/PromiseBinding.h:211:12
        #29 0x7f49c01433ea in mozilla::PromiseJobRunnable::Run(mozilla::AutoSlowOperation&) /xpcom/base/CycleCollectedJSContext.cpp:213:18
        #30 0x7f49c011a1eb in mozilla::CycleCollectedJSContext::PerformMicroTaskCheckPoint(bool) /xpcom/base/CycleCollectedJSContext.cpp:676:17
        #31 0x7f49c011b0ff in mozilla::CycleCollectedJSContext::AfterProcessTask(unsigned int) /xpcom/base/CycleCollectedJSContext.cpp:463:3
        #32 0x7f49c20b147f in XPCJSContext::AfterProcessTask(unsigned int) /js/xpconnect/src/XPCJSContext.cpp:1491:28
        #33 0x7f49c03a0d92 in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1277:24
        #34 0x7f49c03add64 in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:479:10
        #35 0x7f49c1dc405d in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:107:5
        #36 0x7f49c1c12ada in RunInternal /ipc/chromium/src/base/message_loop.cc:369:10
        #37 0x7f49c1c12ada in RunHandler /ipc/chromium/src/base/message_loop.cc:362:3
        #38 0x7f49c1c12ada in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:344:3
        #39 0x7f49caa99829 in nsBaseAppShell::Run() /widget/nsBaseAppShell.cpp:148:27
        #40 0x7f49d06a6c48 in XRE_RunAppShell() /toolkit/xre/nsEmbedFunctions.cpp:738:20
        #41 0x7f49c1c12ada in RunInternal /ipc/chromium/src/base/message_loop.cc:369:10
        #42 0x7f49c1c12ada in RunHandler /ipc/chromium/src/base/message_loop.cc:362:3
        #43 0x7f49c1c12ada in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:344:3
        #44 0x7f49d06a63c4 in XRE_InitChildProcess(int, char**, XREChildData const*) /toolkit/xre/nsEmbedFunctions.cpp:673:34
        #45 0x555d2f2b52cd in content_process_main /browser/app/../../ipc/contentproc/plugin-container.cpp:57:28
        #46 0x555d2f2b52cd in main /browser/app/nsBrowserApp.cpp:375:18
        #47 0x7f49dea29d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
        #48 0x7f49dea29e3f in __libc_start_main csu/../csu/libc-start.c:392:3
        #49 0x555d2f1de938 in _start (/home/jkratzer/builds/m-c-20230425154313-asan-opt/firefox+0xfa938) (BuildId: f31e1396c4affebb88e3664275626659)
    
    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV /builds/worker/workspace/obj-build/dist/include/mozilla/ipc/ProtocolUtils.h:222:45 in CanSend
    ==1936969==ABORTING
Attached file Testcase
Whiteboard: [fuzzblocker]
Assignee: nobody → rjesup
Status: NEW → ASSIGNED
Pushed by rjesup@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7337707e8b32
Allow to create streams before WebTransportSessionProxyState::ACTIVE, r=jesup,necko-reviewers
https://hg.mozilla.org/integration/autoland/rev/54cc048fd39a
Allow calling createUni/BidirectionalStream() before ready r=necko-reviewers,kershaw
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/39733 for changes under testing/web-platform/tests
Whiteboard: [fuzzblocker] → [fuzzblocker], [wptsync upstream]
Attachment #9330669 - Attachment is obsolete: true
Upstream PR was closed without merging

I update the failed test and I'll try to land these patches again.

Flags: needinfo?(rjesup)
Pushed by kjang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6cd66feb6089
Allow to create streams before WebTransportSessionProxyState::ACTIVE, r=jesup,necko-reviewers
See Also: → 1830076
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
Blocks: 1830076
See Also: 1830076
Pushed by rjesup@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b01a70f3bfd6
Allow calling createUni/BidirectionalStream() before ready r=necko-reviewers,kershaw

Backed out for causing failures on /webtransport/datagrams

[task 2023-05-01T14:02:51.164Z] 14:02:51     INFO - TEST-PASS | /webtransport/datagrams.https.any.worker.html | Fail to transfer max-size+1 datagram 
[task 2023-05-01T14:02:51.164Z] 14:02:51     INFO - TEST-UNEXPECTED-TIMEOUT | /webtransport/datagrams.https.any.worker.html | Sending and receiving datagrams is ready to use before session is established - Test timed out
[task 2023-05-01T14:02:51.165Z] 14:02:51     INFO - 
[task 2023-05-01T14:02:51.165Z] 14:02:51     INFO - TEST-UNEXPECTED-NOTRUN | /webtransport/datagrams.https.any.worker.html | Datagram's outgoingHighWaterMark correctly regulates written datagrams - expected FAIL
[task 2023-05-01T14:02:51.165Z] 14:02:51     INFO - TEST-INFO | expected FAIL
[task 2023-05-01T14:02:51.165Z] 14:02:51     INFO - 
[task 2023-05-01T14:02:51.165Z] 14:02:51     INFO - TEST-UNEXPECTED-NOTRUN | /webtransport/datagrams.https.any.worker.html | Datagrams read is less than or equal to the incomingHighWaterMark - expected FAIL
[task 2023-05-01T14:02:51.165Z] 14:02:51     INFO - TEST-INFO | expected FAIL
[task 2023-05-01T14:02:51.166Z] 14:02:51     INFO - 
[task 2023-05-01T14:02:51.166Z] 14:02:51     INFO - TEST-UNEXPECTED-NOTRUN | /webtransport/datagrams.https.any.worker.html | Datagram MaxAge getters/setters work correctly - expected PASS
[task 2023-05-01T14:02:51.167Z] 14:02:51     INFO - 
[task 2023-05-01T14:02:51.167Z] 14:02:51     INFO - TEST-UNEXPECTED-NOTRUN | /webtransport/datagrams.https.any.worker.html | Datagram HighWaterMark getters/setters work correctly - expected PASS
[task 2023-05-01T14:02:51.167Z] 14:02:51     INFO - TEST-UNEXPECTED-TIMEOUT | /webtransport/datagrams.https.any.worker.html | expected OK
[task 2023-05-01T14:02:51.167Z] 14:02:51     INFO - TEST-INFO took 30484ms
Flags: needinfo?(rjesup)
Pushed by rjesup@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9bfa2a382b4c
Allow calling createUni/BidirectionalStream() before ready r=necko-reviewers,kershaw
Regressions: 1830964
Regressions: 1830965
Regressions: 1830966
Upstream PR merged by moz-wptsync-bot
Flags: needinfo?(rjesup)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: