Closed Bug 1547057 Opened 7 months ago Closed 7 months ago

Assertion failure: aOrigin, at /builds/worker/workspace/build/src/dom/security/featurepolicy/FeaturePolicy.cpp:120

Categories

(Core :: DOM: Security, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox-esr60 --- unaffected
firefox67 --- wontfix
firefox68 --- fixed

People

(Reporter: jkratzer, Assigned: baku)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase, Whiteboard: [domsecurity-active])

Attachments

(2 files)

Attached file testcase.html

Testcase found while fuzzing mozilla-central rev 0ec836eceb96.

Assertion failure: aOrigin, at /builds/worker/workspace/build/src/dom/security/featurepolicy/FeaturePolicy.cpp:120

rax = 0x000055ce1ce2de40 rdx = 0x0000000000000000
rcx = 0x00007f173a276e11 rbx = 0x00007ffe0cae5e38
rsi = 0x00007f17455568b0 rdi = 0x00007f1745555680
rbp = 0x00007ffe0cae5e20 rsp = 0x00007ffe0cae5dd0
r8 = 0x00007f17455568b0 r9 = 0x00007f17466c0740
r10 = 0x0000000000000000 r11 = 0x0000000000000000
r12 = 0x00007f172e1a9200 r13 = 0x0000000000000000
r14 = 0x00007ffe0cae6070 r15 = 0x00007ffe0cae6058
rip = 0x00007f173681d509
OS|Linux|0.0.0 Linux 4.18.0-17-generic #18~18.04.1-Ubuntu SMP Fri Mar 15 15:27:12 UTC 2019 x86_64
CPU|amd64|family 6 model 94 stepping 3|1
GPU|||
Crash|SIGSEGV /SEGV_MAPERR|0x0|0
0|0|libxul.so|mozilla::dom::FeaturePolicy::AllowsFeatureInternal(nsTSubstring<char16_t> const&, nsIPrincipal*) const|hg:hg.mozilla.org/mozilla-central:dom/security/featurepolicy/FeaturePolicy.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|145|0x3
0|1|libxul.so|std::_Function_handler<void(char const*), mozilla::dom::FeaturePolicy::AllowedFeatures(nsTArray<nsTString<char16_t> >&)::<lambda(char const*)> >::_M_invoke|hg:hg.mozilla.org/mozilla-central:gcc/include/c++/6.4.0/functional:0ec836eceb969c548067cee6de2ea213513a43d5|1731|0x35
0|2|libxul.so|mozilla::dom::FeaturePolicyUtils::ForEachFeature(std::function<void (char const*)> const&)|hg:hg.mozilla.org/mozilla-central:dom/security/featurepolicy/FeaturePolicyUtils.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|65|0x32
0|3|libxul.so|mozilla::dom::FeaturePolicy::AllowedFeatures(nsTArray<nsTString<char16_t> >&)|hg:hg.mozilla.org/mozilla-central:dom/security/featurepolicy/FeaturePolicy.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|161|0x5
0|4|libxul.so|mozilla::dom::Policy_Binding::allowedFeatures|s3:gecko-generated-sources:cb93dd21188815717b6a77568da36cf8132bfe6fccd8a1320a2db5a4c83c6e0e2ac962253ec23ac658d37ba624c0c1362af86835fe1944eca0a40649a0c35221/dom/bindings/FeaturePolicyBinding.cpp:|580|0xb
0|5|libxul.so|bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*)|hg:hg.mozilla.org/mozilla-central:dom/bindings/BindingUtils.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|3153|0x24
0|6|libxul.so|CallJSNative(JSContext*, bool ()(JSContext, unsigned int, JS::Value*), JS::CallArgs const&)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|443|0x13
0|7|libxul.so|js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|535|0x12
0|8|libxul.so|InternalCall|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|590|0xd
0|9|libxul.so|Interpret|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|594|0xf
0|10|libxul.so|js::RunScript(JSContext*, js::RunState&)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|423|0xb
0|11|libxul.so|js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|563|0xf
0|12|libxul.so|InternalCall|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|590|0xd
0|13|libxul.so|js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|606|0x5
0|14|libxul.so|JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>)|hg:hg.mozilla.org/mozilla-central:js/src/jsapi.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|2636|0x1c
0|15|libxul.so|mozilla::dom::EventListener::HandleEvent(JSContext*, JS::Handle<JS::Value>, mozilla::dom::Event&, mozilla::ErrorResult&)|s3:gecko-generated-sources:9ca8646d8042e9b4b76d2e1b358b984be17743b71b832c0897d61bb500e0fecbe38fa54273dc522878c87fcb2c9bfd274a8190c7bc56fbbb58cb3ca68462e527/dom/bindings/EventListenerBinding.cpp:|52|0x5
0|16|libxul.so|void mozilla::dom::EventListener::HandleEvent<mozilla::dom::EventTarget*>(mozilla::dom::EventTarget* const&, mozilla::dom::Event&, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*)|s3:gecko-generated-sources:f3d9c01258576daaac3afc4fb3b283652e7f1168abb5287eff6775451ebd0ab6a0e4c8d88d3a67f7147042501bc091c6dfed25b4b8ccf4e4f420897b8d0ba906/dist/include/mozilla/dom/EventListenerBinding.h:|66|0x1c
0|17|libxul.so|mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*)|hg:hg.mozilla.org/mozilla-central:dom/events/EventListenerManager.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|1040|0x1e
0|18|libxul.so|mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool)|hg:hg.mozilla.org/mozilla-central:dom/events/EventListenerManager.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|1240|0x19
0|19|libxul.so|mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&)|hg:hg.mozilla.org/mozilla-central:dom/events/EventDispatcher.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|351|0x6
0|20|libxul.so|mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&)|hg:hg.mozilla.org/mozilla-central:dom/events/EventDispatcher.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|551|0x12
0|21|libxul.so|mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>)|hg:hg.mozilla.org/mozilla-central:dom/events/EventDispatcher.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|1047|0x1a
0|22|libxul.so|nsDocumentViewer::LoadComplete(nsresult)|hg:hg.mozilla.org/mozilla-central:layout/base/nsDocumentViewer.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|1102|0x25
0|23|libxul.so|nsDocShell::EndPageLoad(nsIWebProgress
, nsIChannel*, nsresult)|hg:hg.mozilla.org/mozilla-central:docshell/base/nsDocShell.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|6625|0x14
0|24|libxul.so|nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult)|hg:hg.mozilla.org/mozilla-central:docshell/base/nsDocShell.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|6425|0x18
0|25|libxul.so|nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, nsresult)|hg:hg.mozilla.org/mozilla-central:uriloader/base/nsDocLoader.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|1313|0x64
0|26|libxul.so|nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult)|hg:hg.mozilla.org/mozilla-central:uriloader/base/nsDocLoader.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|872|0x2a
0|27|libxul.so|nsDocLoader::DocLoaderIsEmpty(bool)|hg:hg.mozilla.org/mozilla-central:uriloader/base/nsDocLoader.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|710|0x15
0|28|libxul.so|nsDocLoader::OnStopRequest(nsIRequest*, nsresult)|hg:hg.mozilla.org/mozilla-central:uriloader/base/nsDocLoader.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|598|0x16
0|29|libxul.so|mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult)|hg:hg.mozilla.org/mozilla-central:netwerk/base/nsLoadGroup.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|568|0x17
0|30|libxul.so|mozilla::dom::Document::DoUnblockOnload()|hg:hg.mozilla.org/mozilla-central:dom/base/Document.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|7971|0x20
0|31|libxul.so|mozilla::dom::Document::UnblockOnload(bool)|hg:hg.mozilla.org/mozilla-central:dom/base/Document.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|7903|0x8
0|32|libxul.so|mozilla::dom::Document::DispatchContentLoadedEvents()|hg:hg.mozilla.org/mozilla-central:dom/base/Document.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|5087|0xd
0|33|libxul.so|mozilla::detail::RunnableMethodImpl<mozilla::dom::Document*, void (mozilla::dom::Document::)(), true, (mozilla::RunnableKind)0>::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThreadUtils.h:0ec836eceb969c548067cee6de2ea213513a43d5|1174|0x13
0|34|libxul.so|mozilla::SchedulerGroup::Runnable::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/threads/SchedulerGroup.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|295|0x15
0|35|libxul.so|nsThread::ProcessNextEvent(bool, bool
)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|1180|0x15
0|36|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThreadUtils.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|486|0x11
0|37|libxul.so|mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|88|0xa
0|38|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:0ec836eceb969c548067cee6de2ea213513a43d5|315|0x17
0|39|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:0ec836eceb969c548067cee6de2ea213513a43d5|290|0x8
0|40|libxul.so|nsBaseAppShell::Run()|hg:hg.mozilla.org/mozilla-central:widget/nsBaseAppShell.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|137|0xd
0|41|libxul.so|XRE_RunAppShell()|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsEmbedFunctions.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|919|0x11
0|42|libxul.so|mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|238|0x5
0|43|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:0ec836eceb969c548067cee6de2ea213513a43d5|315|0x17
0|44|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:0ec836eceb969c548067cee6de2ea213513a43d5|290|0x8
0|45|libxul.so|XRE_InitChildProcess(int, char**, XREChildData const*)|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsEmbedFunctions.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|757|0xc
0|46|firefox-bin|content_process_main(mozilla::Bootstrap*, int, char**)|hg:hg.mozilla.org/mozilla-central:ipc/contentproc/plugin-container.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|56|0x14
0|47|firefox-bin|main|hg:hg.mozilla.org/mozilla-central:browser/app/nsBrowserApp.cpp:0ec836eceb969c548067cee6de2ea213513a43d5|263|0x11
0|48|libc-2.27.so|__libc_start_main|||0xe7
0|49|firefox-bin|_start|||0x29

Flags: in-testsuite?

Baku, can you take a look please?

Flags: needinfo?(amarchesini)
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [domsecurity-active]
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/337438b77704
HTMLIFrameElement must always set the default origin for FeaturePolicy, r=ckerschb
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.