Skip to content
Memory corruption Disclosed report

Heap-use-after-free in mozilla::plugins::parent

Abhishek Arya Follow

Originally disclosed on Mozilla

Critical View original
  • Fixed in 29 days
  • Paid in 4 months
  • Disclosed after 29 days

Created attachment 660634 Testcase

Reproduces on trunk. For reproducing reliably, just run > 10 simultaneous firefox instances.

================================================================= ==21539== ERROR: AddressSanitizer heap-use-after-free on address 0x7f8bcb1c0088 at pc 0x7f8c1f38cac0 bp 0x7fffbeb1a2f0 sp 0x7fffbeb1a2e8 WRITE of size 4 at 0x7f8bcb1c0088 thread T0 #0 0x7f8c1f38cac0 in mozilla::plugins::parent::_releaseobject(NPObject*) src/dom/plugins/base/nsNPAPIPlugin.cpp:1389 0x7f8bcb1c0088 is located 8 bytes inside of 32-byte region [0x7f8bcb1c0080,0x7f8bcb1c00a0) freed by thread T0 here: #0 0x42b630 in free ??:0 #1 0x7f8c1f3e57bd in NPObjWrapperPluginDestroyedCallback(PLDHashTable*, PLDHashEntryHdr*, unsigned int, void*) src/dom/plugins/base/nsJSNPRuntime.cpp:1944 previously allocated by thread T0 here: #0 0x42b6f0 in __interceptor_malloc ??:0 #1 0x7f8c236873a8 in moz_xmalloc src/memory/mozalloc/mozalloc.cpp:57 #2 0x7f8c1f96a10b in mozilla::plugins::PluginScriptableObjectParent::CreateProxyObject() src/dom/plugins/ipc/PluginScriptableObjectParent.cpp:557 #3 0x7f8c1f9c4f32 in mozilla::plugins::PPluginModuleParent::OnMessageReceived(IPC::Message const&) src/objdir-ff-asan/ipc/ipdl/PPluginModuleParent.cpp:858 #4 0x7f8c1f978d8d in mozilla::ipc::AsyncChannel::OnDispatchMessage(IPC::Message const&) src/ipc/glue/AsyncChannel.cpp:473 #5 0x7f8c1f9d3228 in mozilla::plugins::PPluginInstanceParent::CallNPP_GetValue_NPPVpluginScriptableNPObject(mozilla::plugins::PPluginScriptableObjectParent**, short*) src/objdir-ff-asan/ipc/ipdl/PPluginInstanceParent.cpp:374 #6 0x7f8c1f9490a0 in mozilla::plugins::PluginInstanceParent::NPP_GetValue(NPPVariable, void*) src/dom/plugins/ipc/PluginInstanceParent.cpp:1104 #7 0x7f8c1f95a48d in mozilla::plugins::PluginModuleParent::NPP_GetValue(_NPP*, NPPVariable, void*) src/dom/plugins/ipc/PluginModuleParent.cpp:709 Shadow byte and word: 0x1ff179638011: fd 0x1ff179638010: fd fd fd fd fd fd fd fd More shadow bytes: 0x1ff179637ff0: fd fd fd fd fd fd fd fd 0x1ff179637ff8: fd fd fd fd fd fd fd fd 0x1ff179638000: fa fa fa fa fa fa fa fa 0x1ff179638008: fa fa fa fa fa fa fa fa =>0x1ff179638010: fd fd fd fd fd fd fd fd 0x1ff179638018: fd fd fd fd fd fd fd fd 0x1ff179638020: fa fa fa fa fa fa fa fa 0x1ff179638028: fa fa fa fa fa fa fa fa 0x1ff179638030: fd fd fd fd fd fd fd fd Stats: 331M malloced (365M for red zones) by 595516 calls Stats: 49M realloced by 25909 calls Stats: 292M freed by 330351 calls Stats: 158M really freed by 206564 calls Stats: 536M (137309 full pages) mmaped in 134 calls mmaps by size class: 8:344043; 9:49146; 10:16380; 11:20470; 12:4096; 13:2048; 14:1536; 15:384; 16:576; 17:1280; 18:272; 19:40; 20:20; mallocs by size class: 8:461364; 9:70728; 10:23906; 11:25624; 12:5405; 13:2947; 14:2126; 15:554; 16:764; 17:1730; 18:303; 19:45; 20:20; frees by size class: 8:220906; 9:56741; 10:19146; 11:21782; 12:4052; 13:2704; 14:1865; 15:492; 16:612; 17:1711; 18:281; 19:42; 20:17; rfrees by size class: 8:136492; 9:35705; 10:11257; 11:16093; 12:2517; 13:1371; 14:1234; 15:312; 16:395; 17:1147; 18:34; 19:6; 20:1; Stats: malloc large: 2098 small slow: 3007 ==21539== ABORTING

The original report as published on Mozilla's Bugzilla, by Abhishek Arya. 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 Plug-ins. Mozilla made it public on 11 October 2012.

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 Abhishek Arya

View all

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