Skip to content
Disclosed report

AddressSanitizer (invalid READ of size 4) GetMostRecentDestWindow widget/gtk/nsDragService.h:105

Francisco A Follow

Originally disclosed on Mozilla

  • Fixed in 12 days
  • Paid in 25 days
  • Disclosed after 12 days

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36

Steps to reproduce:

firefox-41.0a1 ASAN debug build

Related to GetMostRecentDestWindow, no testcase so If anyone wants to take a look, thanks.

Actual results:

================================================================= ==1667==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60d000231158 at pc 0x7f4974d6ab25 bp 0x7ffff908ce90 sp 0x7ffff908ce88 READ of size 4 at 0x60d000231158 thread T0 (Web Content) #0 0x7f4974d6ab24 in GetMostRecentDestWindow /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/widget/gtk/nsDragService.h:105 #1 0x7f4974d6ab24 in nsWindow::Destroy() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/widget/gtk/nsWindow.cpp:630 #2 0x7f49744f60dc in nsPluginInstanceOwner::CreateWidget() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/dom/plugins/base/nsPluginInstanceOwner.cpp:2917 #3 0x7f49744ac401 in CreateWidget /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/dom/plugins/base/nsPluginHost.cpp:3374 #4 0x7f49744ac401 in nsPluginHost::InstantiatePluginInstance(nsACString_internal const&, nsIURI*, nsObjectLoadingContent*, nsPluginInstanceOwner**) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/dom/plugins/base/nsPluginHost.cpp:845 #5 0x7f4971801967 in nsObjectLoadingContent::InstantiatePluginInstance(bool) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/dom/base/nsObjectLoadingContent.cpp:788 #6 0x7f497180abea in nsObjectLoadingContent::LoadObject(bool, bool, nsIRequest*) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/dom/base/nsObjectLoadingContent.cpp:2385 #7 0x7f4971807c6a in nsObjectLoadingContent::OnStartRequest(nsIRequest*, nsISupports*) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/dom/base/nsObjectLoadingContent.cpp:1127 #8 0x7f496fcbd174 in mozilla::net::HttpChannelChild::DoOnStartRequest(nsIRequest*, nsISupports*) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/netwerk/protocol/http/HttpChannelChild.cpp:492 #9 0x7f496fcc6c69 in mozilla::net::HttpChannelChild::OnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, bool const&, bool const&, unsigned int const&, nsCString const&, nsCString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, unsigned int const&) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/netwerk/protocol/http/HttpChannelChild.cpp:482 #10 0x7f496fcc5e0a in mozilla::net::HttpChannelChild::RecvOnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, bool const&, bool const&, unsigned int const&, nsCString const&, nsCString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/netwerk/protocol/http/HttpChannelChild.cpp:407 #11 0x7f4970200630 in mozilla::net::PHttpChannelChild::OnMessageReceived(IPC::Message const&) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/obj-firefox/ipc/ipdl/./PHttpChannelChild.cpp:529 #12 0x7f49707793b8 in mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/obj-firefox/ipc/ipdl/./PContentChild.cpp:5337 #13 0x7f4970084c42 in mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/glue/MessageChannel.cpp:1279 #14 0x7f4970082656 in mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message const&) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/glue/MessageChannel.cpp:1198 #15 0x7f49700762b4 in mozilla::ipc::MessageChannel::OnMaybeDequeueOne() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/glue/MessageChannel.cpp:1182 #16 0x7f497001af94 in RunTask /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:364 #17 0x7f497001af94 in MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask const&) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:372 #18 0x7f497001c047 in MessageLoop::DoWork() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:459 #19 0x7f497008bee2 in mozilla::ipc::DoWorkRunnable::Run() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/glue/MessagePump.cpp:220 #20 0x7f496f7bbb17 in nsThread::ProcessNextEvent(bool, bool*) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/xpcom/threads/nsThread.cpp:848 #21 0x7f496f83603a in NS_ProcessNextEvent(nsIThread*, bool) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/xpcom/glue/nsThreadUtils.cpp:265 #22 0x7f497008b649 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/glue/MessagePump.cpp:95 #23 0x7f4970019b1c in RunInternal /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:234 #24 0x7f4970019b1c in RunHandler /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:227 #25 0x7f4970019b1c in MessageLoop::Run() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:201 #26 0x7f4974d12347 in nsBaseAppShell::Run() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/widget/nsBaseAppShell.cpp:165 #27 0x7f4976b06582 in XRE_RunAppShell /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/toolkit/xre/nsEmbedFunctions.cpp:778 #28 0x7f4970019b1c in RunInternal /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:234 #29 0x7f4970019b1c in RunHandler /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:227 #30 0x7f4970019b1c in MessageLoop::Run() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:201 #31 0x7f4976b05c7b in XRE_InitChildProcess /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/toolkit/xre/nsEmbedFunctions.cpp:614 #32 0x48cf52 in content_process_main(int, char**) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/app/../contentproc/plugin-container.cpp:236 #33 0x7f496d266a3f in __libc_start_main /build/buildd/glibc-2.21/csu/libc-start.c:289 #34 0x48c2ac in _start (/home/revskills/Browsers/firefox/plugin-container+0x48c2ac)

0x60d000231158 is located 8 bytes to the right of 144-byte region [0x60d0002310c0,0x60d000231150) allocated by thread T0 (Web Content) here: #0 0x4748c1 in __interceptor_malloc /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:74 #1 0x48d56d in moz_xmalloc /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/memory/mozalloc/mozalloc.cpp:83 #2 0x7f4974d34dfa in operator new /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/obj-firefox/widget/../dist/include/mozilla/mozalloc.h:186 #3 0x7f4974d34dfa in nsDragServiceProxyConstructor(nsISupports*, nsID const&, void**) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/widget/nsContentProcessWidgetFactory.cpp:24 #4 0x7f496f794911 in nsComponentManagerImpl::CreateInstanceByContractID(char const*, nsISupports*, nsID const&, void**) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/xpcom/components/nsComponentManager.cpp:1223 #5 0x7f496f78bf1a in nsComponentManagerImpl::GetServiceByContractID(char const*, nsID const&, void**) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/xpcom/components/nsComponentManager.cpp:1584 #6 0x7f496f825771 in CallGetService /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/xpcom/glue/nsComponentManagerUtils.cpp:67 #7 0x7f496f825771 in nsGetServiceByContractID::operator()(nsID const&, void**) const /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/xpcom/glue/nsComponentManagerUtils.cpp:280 #8 0x7f496f81aa06 in nsCOMPtr_base::assign_from_gs_contractid(nsGetServiceByContractID, nsID const&) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/xpcom/glue/nsCOMPtr.cpp:103 #9 0x7f49716e54fb in nsCOMPtr /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/obj-firefox/dom/base/../../dist/include/nsCOMPtr.h:514 #10 0x7f49716e54fb in nsContentUtils::GetDragSession() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/dom/base/nsContentUtils.cpp:5349 #11 0x7f49755d9e2c in PresShell::ProcessSynthMouseMoveEvent(bool) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/layout/base/nsPresShell.cpp:5456 #12 0x7f4975607678 in PresShell::nsSynthMouseMoveEvent::WillRefresh(mozilla::TimeStamp) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/layout/base/nsPresShell.h:643 #13 0x7f4975329a9d in nsRefreshDriver::Tick(long, mozilla::TimeStamp) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/layout/base/nsRefreshDriver.cpp:1649 #14 0x7f49753346ee in TickDriver /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/layout/base/nsRefreshDriver.cpp:195 #15 0x7f49753346ee in mozilla::RefreshDriverTimer::Tick(long, mozilla::TimeStamp) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/layout/base/nsRefreshDriver.cpp:186 #16 0x7f4975333f5d in RunRefreshDrivers /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/layout/base/nsRefreshDriver.cpp:437 #17 0x7f4975333f5d in TickRefreshDriver /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/layout/base/nsRefreshDriver.cpp:371 #18 0x7f4975333f5d in mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync(mozilla::TimeStamp) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/layout/base/nsRefreshDriver.cpp:342 #19 0x7f4975bddaf0 in mozilla::layout::VsyncChild::RecvNotify(mozilla::TimeStamp const&) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/layout/ipc/VsyncChild.cpp:63 #20 0x7f497057ec12 in mozilla::layout::PVsyncChild::OnMessageReceived(IPC::Message const&) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/obj-firefox/ipc/ipdl/./PVsyncChild.cpp:220 #21 0x7f497010c15c in mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/obj-firefox/ipc/ipdl/./PBackgroundChild.cpp:1288 #22 0x7f4970084c42 in mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/glue/MessageChannel.cpp:1279 #23 0x7f4970082656 in mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message const&) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/glue/MessageChannel.cpp:1198 #24 0x7f49700762b4 in mozilla::ipc::MessageChannel::OnMaybeDequeueOne() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/glue/MessageChannel.cpp:1182 #25 0x7f497001af94 in RunTask /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:364 #26 0x7f497001af94 in MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask const&) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:372 #27 0x7f497001c047 in MessageLoop::DoWork() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:459 #28 0x7f497008bee2 in mozilla::ipc::DoWorkRunnable::Run() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/glue/MessagePump.cpp:220 #29 0x7f496f7bbb17 in nsThread::ProcessNextEvent(bool, bool*) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/xpcom/threads/nsThread.cpp:848 #30 0x7f496f83603a in NS_ProcessNextEvent(nsIThread*, bool) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/xpcom/glue/nsThreadUtils.cpp:265 #31 0x7f497008b649 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/glue/MessagePump.cpp:95 #32 0x7f4970019b1c in RunInternal /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:234 #33 0x7f4970019b1c in RunHandler /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:227 #34 0x7f4970019b1c in MessageLoop::Run() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:201 #35 0x7f4974d12347 in nsBaseAppShell::Run() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/widget/nsBaseAppShell.cpp:165 #36 0x7f4976b06582 in XRE_RunAppShell /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/toolkit/xre/nsEmbedFunctions.cpp:778 #37 0x7f4970019b1c in RunInternal /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:234 #38 0x7f4970019b1c in RunHandler /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:227 #39 0x7f4970019b1c in MessageLoop::Run() /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/ipc/chromium/src/base/message_loop.cc:201 #40 0x7f4976b05c7b in XRE_InitChildProcess /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/toolkit/xre/nsEmbedFunctions.cpp:614

SUMMARY: AddressSanitizer: heap-buffer-overflow /builds/slave/m-cen-l64-asan-ntly-0000000000/build/src/widget/gtk/nsDragService.h:105 GetMostRecentDestWindow Shadow bytes around the buggy address: 0x0c1a8003e1d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c1a8003e1e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c1a8003e1f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa 00 00 0x0c1a8003e200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c1a8003e210: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 =>0x0c1a8003e220: 00 00 00 00 00 00 00 00 00 00 fa[fa]fa fa fa fa 0x0c1a8003e230: fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c1a8003e240: 00 00 00 fa fa fa fa fa fa fa fa fa 00 00 00 00 0x0c1a8003e250: 00 00 00 00 00 00 00 00 00 00 00 00 00 fa fa fa 0x0c1a8003e260: fa fa fa fa fa fa 00 00 00 00 00 00 00 00 00 00 0x0c1a8003e270: 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa fa 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 Contiguous container OOB:fc ASan internal: fe ==1667==ABORTING

The original report as published on Mozilla's Bugzilla, by Francisco A.. 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.

What is known

A medium-severity security bug in Plug-ins. Mozilla made it public on 7 July 2015.

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

More by Francisco A

View all

8 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.