Skip to content
Memory corruption Disclosed report CVE-2016-1959

Service Worker - Memory corruption in ServiceWorkerManager::ClaimClients

Looben Yang Follow

Originally disclosed on Mozilla

Critical View original
  • Fixed in 50 days
  • Paid in 55 days
  • Disclosed after 50 days
Text
Using Clients API in Service Workers can trigger memory corruption in ServiceWorkerManager::ClaimClients().


Firefox crashes by executing invalid address:

 
First-chance exception at 0x043E0FF8 (xul.dll) in firefox.exe: 0xC0000005: Access violation executing location 0x043E0FF8.
Unhandled exception at 0x043E0FF8 (xul.dll) in firefox.exe: 0xC0000005: Access violation executing location 0x043E0FF8.


Call Stack:

 	xul.dll!043e0ff8()	C++
>	xul.dll!nsQueryInterface::operator()(const nsID & aIID, void * * aAnswer) Line 19	C++
 	xul.dll!nsCOMPtr_base::assign_from_qi(const nsQueryInterface aQI, const nsID & aIID) Line 62	C++
 	xul.dll!mozilla::dom::workers::ServiceWorkerManager::ClaimClients(nsIPrincipal * aPrincipal, const nsCString & aScope, unsigned __int64 aId) Line 3687	C++
 	xul.dll!`anonymous namespace'::ClaimRunnable::Run() Line 205	C++
 	xul.dll!nsThread::ProcessNextEvent(bool aMayWait, bool * aResult) Line 964	C++
 	xul.dll!NS_ProcessNextEvent(nsIThread * aThread, bool aMayWait) Line 297	C++
 	xul.dll!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate * aDelegate) Line 95	C++
 	xul.dll!MessageLoop::RunHandler() Line 228	C++
 	xul.dll!MessageLoop::Run() Line 202	C++
 	xul.dll!nsBaseAppShell::Run() Line 158	C++
 	xul.dll!nsAppShell::Run() Line 259	C++
 	xul.dll!nsAppStartup::Run() Line 282	C++
 	xul.dll!XREMain::XRE_mainRun() Line 4298	C++
 	xul.dll!NS_TableDrivenQI(void * aThis, const nsID & aIID, void * * aInstancePtr, const QITableEntry * aEntries) Line 18	C++
 	xul.dll!nsComponentManagerImpl::QueryInterface(const nsID & aIID, void * * aInstancePtr) Line 969	C++
 	xul.dll!nsQueryInterface::operator()(const nsID & aIID, void * * aAnswer) Line 19	C++
 	xul.dll!nsCOMPtr_base::assign_from_qi(const nsQueryInterface aQI, const nsID & aIID) Line 62	C++

	
The virtual function table was corrupted and points to an invalid address:

-		this	0x2ef11370 {mRawPtr=0x2ef01808 {...} }	const nsQueryInterface *
-		mRawPtr	0x2ef01808 {...}	nsISupports *
-		__vfptr	0x043e0ff8 {xul.dll!mozilla::dom::DOMIfaceAndProtoJSClass PrototypeClass} {0x043e4658 {xul.dll!`string'} "DOMExceptionPrototype", ...}	void * *
		[0]	0x043e4658 {xul.dll!`string'} "DOMExceptionPrototype"	void *
		[1]	0x00400000	void *
		[2]	0x00000000	void *
+		aIID	{m0=1124576232 m1=21382 m2=16420 ...}	const nsID &
+		aAnswer	0x0062f34c {0x0062f390}	void * *

The original report as published on Mozilla's Bugzilla, by Looben Yang. 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 critical-severity memory corruption bug in DOM: Service Workers. Mozilla made it public on 11 February 2016 as CVE-2016-1959.

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.

More by Looben Yang

View all

50 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.