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

WebRTC - Use After Free in socket thread

Looben Yang Follow

Originally disclosed on Mozilla

Critical View original
  • Fixed in 29 days
  • Paid in 32 days
  • Disclosed after 29 days
Text
Created attachment 8761474
UAF_socket_thread.html

Steps to reproduce:

1.Open repro UAF_socket_thread.html in Firefox browser.
2.Firefox crashes at corrupted address in nr_ice_peer_ctx_find_component() in socket thread.


Firefox version: 50.0a1 (2016-06-09)

Exception thrown: read access violation.
pstr was 0x2FE07494.


>	xul.dll!nr_ice_peer_ctx_find_component(nr_ice_peer_ctx_ * pctx, nr_ice_media_stream_ * str, int component_id, nr_ice_component_ * * compp) Line 717	C
 	xul.dll!nr_ice_media_stream_send(nr_ice_peer_ctx_ * pctx, nr_ice_media_stream_ * str, int component, unsigned char * data, int len) Line 734	C
 	xul.dll!mozilla::NrIceMediaStream::SendPacket(int component_id, const unsigned char * data, unsigned int len) Line 568	C++
 	xul.dll!mozilla::TransportLayerIce::SendPacket(const unsigned char * data, unsigned int len) Line 172	C++
 	xul.dll!mozilla::TransportLayerNSPRAdapter::Write(const void * buf, int length) Line 114	C++
 	xul.dll!mozilla::TransportLayerWrite(PRFileDesc * f, const void * buf, int length) Line 142	C++
 	xul.dll!mozilla::TransportLayerSend(PRFileDesc * f, const void * buf, int amount, int flags, unsigned int to) Line 234	C++
 	nss3.dll!ssl_DefSend(sslSocketStr * ss, const unsigned char * buf, int len, int flags) Line 103	C
 	nss3.dll!ssl3_SendRecord(sslSocketStr * ss, ssl3CipherSpec * cwSpec, SSL3ContentType type, const unsigned char * pIn, int nIn, int flags) Line 3234	C
 	nss3.dll!SSL3_SendAlert(sslSocketStr * ss, SSL3AlertLevel level, SSL3AlertDescription desc) Line 3528	C
 	nss3.dll!ssl_SecureClose(sslSocketStr * ss) Line 777	C
 	nss3.dll!ssl_Close(PRFileDesc * fd) Line 2507	C
 	nss3.dll!PR_Close(PRFileDesc * fd) Line 104	C
 	xul.dll!mozilla::TransportLayerDtls::~TransportLayerDtls() Line 374	C++
 	[External Code]	
 	xul.dll!mozilla::TransportFlow::ClearLayers(std::deque<mozilla::TransportLayer *,std::allocator<mozilla::TransportLayer *> > * layers) Line 58	C++
 	xul.dll!mozilla::TransportFlow::DestroyFinal(nsAutoPtr<std::deque<mozilla::TransportLayer *,std::allocator<mozilla::TransportLayer *> > > layers) Line 45	C++
 	xul.dll!mozilla::runnable_args_func<void (__cdecl*)(nsAutoPtr<std::deque<mozilla::TransportLayer *,std::allocator<mozilla::TransportLayer *> > >),nsAutoPtr<std::deque<mozilla::TransportLayer *,std::allocator<mozilla::TransportLayer *> > > >::Run() Line 118	C++
 	xul.dll!mozilla::TransportFlow::~TransportFlow() Line 39	C++
 	xul.dll!mozilla::TransportFlow::Release() Line 19	C++
 	xul.dll!nsProxyReleaseEvent<mozilla::TransportFlow>::Run() Line 33	C++
 	xul.dll!nsThread::ProcessNextEvent(bool aMayWait, bool * aResult) Line 1029	C++
 	xul.dll!NS_ProcessNextEvent(nsIThread * aThread, bool aMayWait) Line 290	C++
 	xul.dll!mozilla::net::nsSocketTransportService::Run() Line 914	C++
 	xul.dll!nsThread::ProcessNextEvent(bool aMayWait, bool * aResult) Line 1029	C++
 	xul.dll!NS_ProcessNextEvent(nsIThread * aThread, bool aMayWait) Line 290	C++
 	xul.dll!mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate * aDelegate) Line 354	C++
 	xul.dll!MessageLoop::RunHandler() Line 229	C++
 	xul.dll!MessageLoop::Run() Line 209	C++
 	xul.dll!nsThread::ThreadFunc(void * aArg) Line 468	C++
 	nss3.dll!_PR_NativeRunThread(void * arg) Line 419	C
 	nss3.dll!pr_root(void * arg) Line 95	C
 	[External Code]	
 	[Frames below may be incorrect and/or missing, no symbols loaded for ucrtbase.dll]

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 WebRTC. Mozilla made it public on 8 July 2016 as CVE-2016-5258.

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.