Global-buffer-overflow in nsXBLProtoImpl::InstallImplementation
Originally disclosed on Mozilla
- Fixed in 5 days
- Paid in 11 days
- Disclosed after 5 days
Created attachment 8398290 Testcase
I have fuzzPriv extension that makes this easier to reproduce.
==359==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7fcc9dcee2c8 at pc 0x7fcc97373f8f bp 0x7fffec68f930 sp 0x7fffec68f928 READ of size 4 at 0x7fcc9dcee2c8 thread T0 #0 0x7fcc97373f8e in Hold dom/xbl/nsXBLService.h:159 #1 0x7fcc97373f8e in AddRef dom/xbl/nsXBLService.h:161 #2 0x7fcc97373f8e in assign_with_AddRef objdir-ff-asan/dom/xbl/../../dist/include/nsAutoPtr.h:865 #3 0x7fcc97373f8e in operator= objdir-ff-asan/dom/xbl/../../dist/include/nsAutoPtr.h:957 #4 0x7fcc97373f8e in fromJSClass dom/xbl/nsXBLBinding.h:73 #5 0x7fcc97373f8e in nsXBLProtoImpl::InstallImplementation(nsXBLPrototypeBinding*, nsXBLBinding*) dom/xbl/nsXBLProtoImpl.cpp:66 #6 0x7fcc973a1eb4 in nsXBLService::LoadBindings(nsIContent*, nsIURI*, nsIPrincipal*, nsXBLBinding**, bool*) dom/xbl/nsXBLService.cpp:516 #7 0x7fcc9856fd4a in nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState&, nsIContent*, nsIFrame*, nsIAtom*, int, bool, nsStyleContext*, unsigned int, nsTArraynsIAnonymousContentCreator::ContentInfo, nsCSSFrameConstructor::FrameConstructionItemList&) layout/base/nsCSSFrameConstructor.cpp:5207 #8 0x7fcc98592cc2 in nsCSSFrameConstructor::BuildInlineChildItems(nsFrameConstructorState&, nsCSSFrameConstructor::FrameConstructionItem&, bool, bool) layout/base/nsCSSFrameConstructor.cpp:10714 #9 0x7fcc9857289f in nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState&, nsIContent, nsIFrame*, nsIAtom*, int, bool, nsStyleContext*, unsigned int, nsTArraynsIAnonymousContentCreator::ContentInfo, nsCSSFrameConstructor::FrameConstructionItemList&) layout/base/nsCSSFrameConstructor.cpp:5394 #10 0x7fcc9858d15f in nsCSSFrameConstructor::AddFrameConstructionItems(nsFrameConstructorState&, nsIContent, bool, nsIFrame*, nsCSSFrameConstructor::FrameConstructionItemList&) layout/base/nsCSSFrameConstructor.cpp:5148 #11 0x7fcc9859e2fc in nsCSSFrameConstructor::ContentAppended(nsIContent*, nsIContent*, bool) layout/base/nsCSSFrameConstructor.cpp:6748 #12 0x7fcc9859923c in nsCSSFrameConstructor::CreateNeededFrames(nsIContent*) layout/base/nsCSSFrameConstructor.cpp:6427 #13 0x7fcc985992a8 in nsCSSFrameConstructor::CreateNeededFrames(nsIContent*) layout/base/nsCSSFrameConstructor.cpp:6434 #14 0x7fcc985992a8 in nsCSSFrameConstructor::CreateNeededFrames(nsIContent*) layout/base/nsCSSFrameConstructor.cpp:6434 #15 0x7fcc9859f9e9 in nsCSSFrameConstructor::CreateNeededFrames() layout/base/nsCSSFrameConstructor.cpp:6449 #16 0x7fcc984c2477 in PresShell::FlushPendingNotifications(mozilla::ChangesToFlush) layout/base/nsPresShell.cpp:4042 #17 0x7fcc984f7673 in nsRefreshDriver::Tick(long, mozilla::TimeStamp) layout/base/nsRefreshDriver.cpp:1142 #18 0x7fcc984fbd34 in TickDriver layout/base/nsRefreshDriver.cpp:168 #19 0x7fcc984fbd34 in mozilla::RefreshDriverTimer::Tick() layout/base/nsRefreshDriver.cpp:160 #20 0x7fcc94035fc4 in nsTimerImpl::Fire() xpcom/threads/nsTimerImpl.cpp:551 #21 0x7fcc9403664e in nsTimerEvent::Run() xpcom/threads/nsTimerImpl.cpp:635 #22 0x7fcc9402d4e0 in nsThread::ProcessNextEvent(bool, bool*) xpcom/threads/nsThread.cpp:694 #23 0x7fcc93ef8d5a in NS_ProcessNextEvent(nsIThread*, bool) xpcom/glue/nsThreadUtils.cpp:263 #24 0x7fcc947f0159 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) ipc/glue/MessagePump.cpp:95 #25 0x7fcc94799130 in RunInternal ipc/chromium/src/base/message_loop.cc:226 #26 0x7fcc94799130 in RunHandler ipc/chromium/src/base/message_loop.cc:219 #27 0x7fcc94799130 in MessageLoop::Run() ipc/chromium/src/base/message_loop.cc:193 #28 0x7fcc96906447 in nsBaseAppShell::Run() widget/xpwidgets/nsBaseAppShell.cpp:164 #29 0x7fcc9971ccb8 in nsAppStartup::Run() toolkit/components/startup/nsAppStartup.cpp:276 #30 0x7fcc9958c1a3 in XREMain::XRE_mainRun() toolkit/xre/nsAppRunner.cpp:4019 #31 0x7fcc9958d08d in XREMain::XRE_main(int, char**, nsXREAppData const*) toolkit/xre/nsAppRunner.cpp:4088 #32 0x7fcc9958dedd in XRE_main toolkit/xre/nsAppRunner.cpp:4300 #33 0x48c6e7 in do_main browser/app/nsBrowserApp.cpp:282 #34 0x48c6e7 in main browser/app/nsBrowserApp.cpp:643 #35 0x7fcca259276c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 #36 0x48bbbc in _start
0x7fcc9dcee2c8 is located 0 bytes to the right of global variable 'JSObject::class_' from 'objdir-ff-asan/js/src/Unified_cpp_js_src7.cpp' (0x7fcc9dcee160) of size 360 SUMMARY: AddressSanitizer: global-buffer-overflow ??:0 ?? Shadow bytes around the buggy address: 0x0ffa13b95c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ffa13b95c10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ffa13b95c20: 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 00 00 00 00 0x0ffa13b95c30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ffa13b95c40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0ffa13b95c50: 00 00 00 00 00 00 00 00 00[f9]f9 f9 f9 f9 f9 f9 0x0ffa13b95c60: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00 0x0ffa13b95c70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ffa13b95c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ffa13b95c90: 00 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 0x0ffa13b95ca0: 00 00 00 00 00 00 00 00 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 Contiguous container OOB:fc ASan internal: fe ==359==ABORTING
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 high-severity memory corruption bug in CSS Parsing and Computation. Mozilla made it public on 2 April 2014 as CVE-2014-1524.
About 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.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
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.