Open Bug 1749342 Opened 3 years ago Updated 2 months ago

Assertion failure: mResultPromise, at /dom/payments/PaymentRequest.cpp:719

Categories

(Core :: DOM: Web Payments, defect, P3)

x86_64
Linux
defect

Tracking

()

People

(Reporter: jkratzer, Assigned: edenchuang)

References

(Blocks 1 open bug)

Details

(Keywords: bugmon, testcase, Whiteboard: [bugmon:bisected,confirmed] dom-lws-bugdash-triage)

Attachments

(1 file)

Testcase found while fuzzing mozilla-central rev b81970e39db4 (built with: --enable-debug --enable-fuzzing).

Testcase can be reproduced using the following commands:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch --build b81970e39db4 --debug --fuzzing -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.html
Assertion failure: mResultPromise, at /dom/payments/PaymentRequest.cpp:719

    ==955966==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fce26639bda bp 0x7fff00ee2450 sp 0x7fff00ee21d0 T955966)
    ==955966==The signal is caused by a WRITE memory access.
    ==955966==Hint: address points to the zero page.
        #0 0x7fce26639bda in RespondCanMakePayment /dom/payments/PaymentRequest.cpp:719:3
        #1 0x7fce26639bda in mozilla::dom::PaymentRequestManager::RespondPayment(mozilla::dom::PaymentRequest*, mozilla::dom::IPCPaymentActionResponse const&) /dom/payments/PaymentRequestManager.cpp:651:17
        #2 0x7fce2664545f in mozilla::dom::PaymentRequestChild::RecvRespondPayment(mozilla::dom::IPCPaymentActionResponse const&) /dom/payments/ipc/PaymentRequestChild.cpp:40:26
        #3 0x7fce22aa0018 in mozilla::dom::PPaymentRequestChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PPaymentRequestChild.cpp:187:63
        #4 0x7fce227e156b in mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PContentChild.cpp:8250:32
        #5 0x7fce22663e7f in mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /ipc/glue/MessageChannel.cpp:2039:25
        #6 0x7fce22660751 in mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /ipc/glue/MessageChannel.cpp:1964:9
        #7 0x7fce22661c2c in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /ipc/glue/MessageChannel.cpp:1823:3
        #8 0x7fce2266286d in mozilla::ipc::MessageChannel::MessageTask::Run() /ipc/glue/MessageChannel.cpp:1851:14
        #9 0x7fce21bd0ece in mozilla::RunnableTask::Run() /xpcom/threads/TaskController.cpp:468:16
        #10 0x7fce21baad26 in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:771:26
        #11 0x7fce21ba99e8 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:607:15
        #12 0x7fce21ba9c63 in mozilla::TaskController::ProcessPendingMTTask(bool) /xpcom/threads/TaskController.cpp:391:36
        #13 0x7fce21bd3f06 in operator() /xpcom/threads/TaskController.cpp:124:37
        #14 0x7fce21bd3f06 in mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_0>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:531:5
        #15 0x7fce21bbf623 in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1195:16
        #16 0x7fce21bc670a in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:467:10
        #17 0x7fce22669c86 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:85:21
        #18 0x7fce225897c7 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:331:10
        #19 0x7fce225896d2 in RunHandler /ipc/chromium/src/base/message_loop.cc:324:3
        #20 0x7fce225896d2 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:306:3
        #21 0x7fce26808158 in nsBaseAppShell::Run() /widget/nsBaseAppShell.cpp:137:27
        #22 0x7fce28833a83 in XRE_RunAppShell() /toolkit/xre/nsEmbedFunctions.cpp:864:20
        #23 0x7fce2266ab7a in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:235:9
        #24 0x7fce225897c7 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:331:10
        #25 0x7fce225896d2 in RunHandler /ipc/chromium/src/base/message_loop.cc:324:3
        #26 0x7fce225896d2 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:306:3
        #27 0x7fce288330bb in XRE_InitChildProcess(int, char**, XREChildData const*) /toolkit/xre/nsEmbedFunctions.cpp:701:34
        #28 0x55c9545f1029 in content_process_main /browser/app/../../ipc/contentproc/plugin-container.cpp:57:28
        #29 0x55c9545f1029 in main /browser/app/nsBrowserApp.cpp:327:18
        #30 0x7fce37b540b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
        #31 0x55c9545cc7bc in _start (/home/jkratzer/builds/mc-debug/firefox-bin+0x157bc)
    
    UndefinedBehaviorSanitizer can not provide additional info.
    SUMMARY: UndefinedBehaviorSanitizer: SEGV /dom/payments/PaymentRequest.cpp:719:3 in RespondCanMakePayment
    ==955966==ABORTING
Attached file Testcase

Bugmon Analysis
Verified bug as reproducible on mozilla-central 20220111034934-2a1c32b1731b.
Failed to bisect testcase (Testcase reproduces on start build!):

Start: b97f7d02c91242976b9f88dd8994875923cbeadf (20210112043340)
End: b81970e39db444fa9a70eaf2e656f3e48c18a7c1 (20220110093702)
BuildFlags: BuildFlags(asan=False, tsan=False, debug=True, fuzzing=True, coverage=False, valgrind=False, no_opt=False, fuzzilli=False)

Whiteboard: [bugmon:confirm] → [bugmon:bisected,confirmed]

I have zero knowledge on Web Payment, do you know anyone do? I can still try.

Flags: needinfo?(jstutte)

Eden knows most here. I assume this is low severity, but if there is an easy fix we might just want to close it.

Severity: -- → S4
Flags: needinfo?(jstutte) → needinfo?(echuang)
Priority: -- → P3
Attachment #9258367 - Attachment mime type: text/plain → text/html
Attachment #9258367 - Attachment mime type: text/html → text/plain
Assignee: nobody → echuang
Flags: needinfo?(echuang)

Bugmon was unable reproduce this issue.
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.

Keywords: bugmon

A change to the Taskcluster build definitions over the weekend caused Bugmon to fail when reproducing issues. This issue has been corrected. Re-enabling bugmon.

Keywords: bugmon

Interesting that there's no manually enabled pref here and still hit payment actor when the pref is disabled by default everywhere. Maybe the IPC actor should be no-op if the pref is disabled.

Whiteboard: [bugmon:bisected,confirmed] → [bugmon:bisected,confirmed] dom-lws-bugdash-triage

Wait, the testcase doesn't do anything magical to trigger IPC, just a plain new PaymentRequest. How does it work without pref?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: