ref_fuzz5 crashes Nightly in mozilla::MediaManager::OnNavigation
A fuzzing run against Firefox Nightly produced a crash inside the media manager's navigation handler, where a pointer read hit a fill pattern. The report shows only a debugger dump, so it does not establish what an attacker could do beyond causing a crash.
Originally disclosed on Mozilla
- Fixed in 10 days
- Paid in 13 days
- Disclosed after 10 days
While fuzzing Nightly with ref_fuzz5, this crash happened. https://crash-stats.mozilla.com/report/index/378396d7-43d6-4774-b4a2-087ae2161115
windbg + a516c754042c438a5c1499171ca525a980ecb911:
(3688.3fc4): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
xul!mozilla::MediaManager::OnNavigation+0x1de:
00007ffed2707856 4c3998c8000000 cmp qword ptr [rax+0C8h],r11 ds:e5e5e5e5e5e5e6ad=????????????????
2:031> ~* kp
. 31 Id: 3688.3fc4 Suspend: 1 Teb: 00007ff63380d000 Unfrozen Child-SP RetAddr Call Site 0000003ccefce510 00007ffed216dabc xul!mozilla::MediaManager::OnNavigation(unsigned int64 aWindowID = 0x8000006e)+0x1de [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\dom\media\mediamanager.cpp @ 2698] 0000003ccefce560 00007ffed194366a xul!mozilla::dom::Navigator::OnNavigation(void)+0x28 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\dom\base\navigator.cpp @ 1778] 0000003ccefce590 00007ffed14d8453 xul!nsGlobalWindow::SetNewDocument+0x8bf5be [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\dom\base\nsglobalwindow.cpp @ 2700] 0000003ccefce8b0 00007ffed14d6b9e xul!nsDocumentViewer::InitInternal(class nsIWidget * aParentWidget = 0x0000003cd92ed000, class nsISupports * aState = 0x0000000000000000, struct mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> * aBounds = 0x0000003cdde40c20, bool aDoCreation = true, bool aNeedMakeCX = true, bool aForceSetNewDocument = true)+0x25b [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\layout\base\nsdocumentviewer.cpp @ 900]
0000003ccefce950 00007ffed131cac5 xul!nsDocumentViewer::Init(class nsIWidget * aParentWidget = 0x0000003cd6042ec0, struct mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> * aBounds = 0x0000003ccefceaa0)+0x1e [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\layout\base\nsdocumentviewer.cpp @ 644]
0000003ccefce9a0 00007ffed10789df xul!nsDocShell::SetupNewViewer(class nsIContentViewer * aNewViewer = 0x0000003cd8f04a60)+0x355 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\docshell\base\nsdocshell.cpp @ 9382] 0000003ccefceb60 00007ffed14b69f4 xul!nsDocShell::Embed(class nsIContentViewer * aContentViewer = 0x0000000080000000, char * aCommand = 0x0000003cd9043800 "???", class nsISupports * aExtraInfo = 0x00007ffed1721562)+0x2f [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\docshell\base\nsdocshell.cpp @ 7241]
0000003ccefceb90 00007ffed14b6658 xul!nsDocShell::CreateContentViewer(class nsACString_internal * aContentType = 0x0000000000000000, class nsIRequest * aRequest = 0x0000003cdde05dd0, class nsIStreamListener ** aContentHandler = 0x0000003cdde05dd0)+0x158 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\docshell\base\nsdocshell.cpp @ 9187] 0000003ccefcec40 00007ffed14b641a xul!nsDSURIContentListener::DoContent(class nsACString_internal * aContentType = 0x0000003cd89478b8, bool aIsContentPreferred = true, class nsIRequest * aRequest = 0x0000000000000000, class nsIStreamListener ** aContentHandler = 0x0000003c00790800, bool * aAbortProcess = 0x0000003ccefced98)+0xe8 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\docshell\base\nsdsuricontentlistener.cpp @ 128] 0000003ccefcecb0 00007ffed14b54d5 xul!nsDocumentOpenInfo::TryContentListener(class nsIURIContentListener * aListener = 0x0000000000000001, class nsIChannel * aChannel = 0x0000003ce7000620)+0x2fe [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\uriloader\base\nsuriloader.cpp @ 742] 0000003ccefced80 00007ffed11a847b xul!nsDocumentOpenInfo::DispatchContent(class nsIRequest * request = 0x0000000000000000, class nsISupports * aCtxt = 0x0000003cd62f7301)+0x34d [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\uriloader\base\nsuriloader.cpp @ 414] 0000003ccefcefa0 00007ffed11a7b7f xul!nsDocumentOpenInfo::OnStartRequest(class nsIRequest * request = 0x0000003cd0f49918, class nsISupports * aCtxt = 0x0000003ccefcf128)+0x353 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\uriloader\base\nsuriloader.cpp @ 277] 0000003ccefcf0c0 00007ffed11cbf83 xul!nsBaseChannel::OnStartRequest(class nsIRequest * request = 0x0000003cdb542d70, class nsISupports * ctxt = 0x0000003cdb542d70)+0x7f [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\netwerk\base\nsbasechannel.cpp @ 809] 0000003ccefcf0f0 00007ffed11ccc71 xul!nsInputStreamPump::OnStateStart(void)+0xc3 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\netwerk\base\nsinputstreampump.cpp @ 525] 0000003ccefcf120 00007ffed11ccb64 xul!nsInputStreamPump::OnInputStreamReady(class nsIAsyncInputStream * stream = 0x0000003cd6047d68)+0xf9 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\netwerk\base\nsinputstreampump.cpp @ 441]
0000003ccefcf160 00007ffed120a83f xul!nsOutputStreamReadyEvent::Run(void)+0x24 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\xpcom\io\nsstreamutils.cpp @ 97]
0000003ccefcf190 00007ffed12087c5 xul!nsThread::ProcessNextEvent(bool aMayWait = true, bool * aResult = 0x0000003ccefcf5f0)+0x4b3 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\xpcom\threads\nsthread.cpp @ 1216] 0000003ccefcf2a0 00007ffed1d3f600 xul!mozilla::ipc::MessagePump::Run(class base::MessagePump::Delegate * aDelegate = 0x0000003ccefcf601)+0x9d [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\ipc\glue\messagepump.cpp @ 96]
0000003ccefcf320 00007ffed15abb8f xul!mozilla::ipc::MessagePumpForChildProcess::Run(class base::MessagePump::Delegate * aDelegate = 0x0000003ccefcf610)+0x70 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\ipc\glue\messagepump.cpp @ 302] 0000003ccefcf350 00007ffe`d15abb52 xul!MessageLoop::RunHandler(void)+0x1b [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\ipc\chromium\src\base\message_loop.cc @ 226]
^ User interrupted operation error in '~* kp'
2:031> !analyze -v -f
-
* -
Exception Analysis * -
*
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\system32\ole32.dll - *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\System32\msmpeg2vdec.dll - *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\system32\mf.dll - *** ERROR: Module load completed but symbols could not be loaded for C:\Program Files (x86)\Malwarebytes Anti-Exploit\mbae64.dll *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Program Files (x86)\Stardock\Start8\Start8_64.dll - *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\SYSTEM32\nvwgf2umx.dll -
FAULTING_IP: xul!mozilla::MediaManager::OnNavigation+1de [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\dom\media\mediamanager.cpp @ 2698] 00007ffe`d2707856 4c3998c8000000 cmp qword ptr [rax+0C8h],r11
EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff) ExceptionAddress: 00007ffed2707856 (xul!mozilla::MediaManager::OnNavigation+0x00000000000001de) ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000000 NumberParameters: 2 Parameter[0]: 0000000000000000 Parameter[1]: ffffffffffffffff Attempt to read from address ffffffffffffffff
FAULTING_THREAD: 0000000000003fc4
PROCESS_NAME: firefox.exe
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
EXCEPTION_PARAMETER1: 0000000000000000
EXCEPTION_PARAMETER2: ffffffffffffffff
READ_ADDRESS: ffffffffffffffff
FOLLOWUP_IP: xul!mozilla::MediaManager::OnNavigation+1de [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\dom\media\mediamanager.cpp @ 2698] 00007ffe`d2707856 4c3998c8000000 cmp qword ptr [rax+0C8h],r11
NTGLOBALFLAG: 70
APPLICATION_VERIFIER_FLAGS: 0
BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_READ_FILL_PATTERN_e5e5e5e5
PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_FILL_PATTERN_e5e5e5e5
DEFAULT_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_e5e5e5e5
LAST_CONTROL_TRANSFER: from 00007ffed216dabc to 00007ffed2707856
STACK_TEXT:
0000003ccefce510 00007ffed216dabc : 0000000000000000 000000008000006e 0000003cd9043800 0000003ccefce690 : xul!mozilla::MediaManager::OnNavigation+0x1de [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\dom\media\mediamanager.cpp @ 2698]
0000003ccefce560 00007ffed194366a : 0000003cd9043800 0000000000000000 0000003cd9043800 0000003cd9098000 : xul!mozilla::dom::Navigator::OnNavigation+0x28 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\dom\base\navigator.cpp @ 1778]
0000003ccefce590 00007ffed14d8453 : 0000003cd9043830 0000003cd9043830 0000003ccefce908 0000000000000000 : xul!nsGlobalWindow::SetNewDocument+0x8bf5be [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\dom\base\nsglobalwindow.cpp @ 2700]
0000003ccefce8b0 00007ffed14d6b9e : 0000000000000001 0000003cd92ed000 0000000000000000 0000003cdde40c20 : xul!nsDocumentViewer::InitInternal+0x25b [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\layout\base\nsdocumentviewer.cpp @ 900]
0000003ccefce950 00007ffed131cac5 : 0000003cd6042ec0 0000003cd6042ec0 0000003ccefceaa0 0000003cd9043800 : xul!nsDocumentViewer::Init+0x1e [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\layout\base\nsdocumentviewer.cpp @ 644]
0000003ccefce9a0 00007ffed10789df : 0000003c00000000 0000003cd8f04a60 0000003cd90439c8 0000003cd90439c8 : xul!nsDocShell::SetupNewViewer+0x355 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\docshell\base\nsdocshell.cpp @ 9382]
0000003ccefceb60 00007ffed14b69f4 : 0000003cd0f498e0 0000000080000000 0000003cd9043800 00007ffed1721562 : xul!nsDocShell::Embed+0x2f [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\docshell\base\nsdocshell.cpp @ 7241]
0000003ccefceb90 00007ffed14b6658 : 0000000000000000 0000000000000000 0000003cdde05dd0 0000003cdde05dd0 : xul!nsDocShell::CreateContentViewer+0x158 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\docshell\base\nsdocshell.cpp @ 9187]
0000003ccefcec40 00007ffed14b641a : 0000000000790800 0000003cd89478b8 0000003cd89478a0 0000000000000000 : xul!nsDSURIContentListener::DoContent+0xe8 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\docshell\base\nsdsuricontentlistener.cpp @ 128]
0000003ccefcecb0 00007ffed14b54d5 : 0000003cd62f7301 0000000000000001 0000003ce7000620 0000003ccf300200 : xul!nsDocumentOpenInfo::TryContentListener+0x2fe [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\uriloader\base\nsuriloader.cpp @ 742]
0000003ccefced80 00007ffed11a847b : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : xul!nsDocumentOpenInfo::DispatchContent+0x34d [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\uriloader\base\nsuriloader.cpp @ 414]
0000003ccefcefa0 00007ffed11a7b7f : 0000000000000000 0000003cd0f49918 0000003ccefcf128 0000000000003682 : xul!nsDocumentOpenInfo::OnStartRequest+0x353 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\uriloader\base\nsuriloader.cpp @ 277]
0000003ccefcf0c0 00007ffed11cbf83 : 0000003cdb542d70 0000003cdb542d70 0000003cdb542d70 0000003cd8a4bca8 : xul!nsBaseChannel::OnStartRequest+0x7f [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\netwerk\base\nsbasechannel.cpp @ 809]
0000003ccefcf0f0 00007ffed11ccc71 : 0000003cd0f3f000 0000000000003682 0000003cdb542d78 0000003cd8a4bca8 : xul!nsInputStreamPump::OnStateStart+0xc3 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\netwerk\base\nsinputstreampump.cpp @ 525]
0000003ccefcf120 00007ffed11ccb64 : 0000003cd0f3f000 0000003cd6047d68 0000003ccefcf239 0000003cd0f093d0 : xul!nsInputStreamPump::OnInputStreamReady+0xf9 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\netwerk\base\nsinputstreampump.cpp @ 441]
0000003ccefcf160 00007ffed120a83f : 0000003cd0f8a800 0000003ccefcf239 0000003ccefcf301 0000000000000001 : xul!nsOutputStreamReadyEvent::Run+0x24 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\xpcom\io\nsstreamutils.cpp @ 97]
0000003ccefcf190 00007ffed12087c5 : 0000003cd0f12ce0 0000003cd0f12ce0 0000003ccefcf5f0 0000003cd0f12ce0 : xul!nsThread::ProcessNextEvent+0x4b3 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\xpcom\threads\nsthread.cpp @ 1216]
0000003ccefcf2a0 00007ffed1d3f600 : 0000003cd0f12ce0 0000003ccefcf601 0000003ccefcf501 0000003ccefcf7a0 : xul!mozilla::ipc::MessagePump::Run+0x9d [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\ipc\glue\messagepump.cpp @ 96]
0000003ccefcf320 00007ffed15abb8f : 0000003ccefcf5f0 0000003ccefcf610 0000003cd0f02101 00007ffedea1854d : xul!mozilla::ipc::MessagePumpForChildProcess::Run+0x70 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\ipc\glue\messagepump.cpp @ 302]
0000003ccefcf350 00007ffed15abb52 : 0000003ccefcf3d8 0000003cd0f02098 00007ffed3f04af0 00007ffed1206e3e : xul!MessageLoop::RunHandler+0x1b [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\ipc\chromium\src\base\message_loop.cc @ 226]
0000003ccefcf380 00007ffed14945a4 : 0000003cd8a4bca0 0000003cd901dd60 0000003ccefcf610 0000003cd0f02101 : xul!MessageLoop::Run+0x3e [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\ipc\chromium\src\base\message_loop.cc @ 206]
0000003ccefcf3d0 00007ffed1494264 : 0000003cd8a4bca0 00007ffed1454f8a 0000edebf46a4bc1 0000003cd8a4bca0 : xul!nsBaseAppShell::Run+0x3c [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\widget\nsbaseappshell.cpp @ 158]
0000003ccefcf400 00007ffed2ead0a6 : 0000000000000003 0000003cd0f02101 0000003ccefcf4a9 00007ffed2eac2fd : xul!nsAppShell::Run+0x2c [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\widget\windows\nsappshell.cpp @ 264]
0000003ccefcf430 00007ffed1d3f5b9 : 0000003cd8a4bca0 0000000000000000 0000000000000002 00007ffed35896f8 : xul!XRE_RunAppShell+0x2e [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\toolkit\xre\nsembedfunctions.cpp @ 869]
0000003ccefcf460 00007ffed15abb8f : 0000003ccefcf5f0 0000003ccefcf610 0000003cd0f02101 0000003ccefcf4b0 : xul!mozilla::ipc::MessagePumpForChildProcess::Run+0x29 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\ipc\glue\messagepump.cpp @ 278]
0000003ccefcf490 00007ffed15abb52 : 0000003c00000fff 0000003ccefcf7a0 0000000000000003 00007ffed15db476 : xul!MessageLoop::RunHandler+0x1b [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\ipc\chromium\src\base\message_loop.cc @ 226]
0000003ccefcf4c0 00007ffed2eacd2d : 0000003cd8a40400 0000003ccefcf610 0000000000000003 0000003ccefcf7a0 : xul!MessageLoop::Run+0x3e [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\ipc\chromium\src\base\message_loop.cc @ 206]
0000003ccefcf510 00007ff63449b116 : 000000000000000b 0000003cd0f020e0 0000003cd0f02080 00007ff6344b68a0 : xul!XRE_InitChildProcess+0x639 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\toolkit\xre\nsembedfunctions.cpp @ 705]
0000003ccefcf780 00007ff634498669 : 000000000000000c 000000000000000c 0000003cd0f020e0 0000000000000480 : firefox!content_process_main+0x8e [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\ipc\contentproc\plugin-container.cpp @ 198]
0000003ccefcf7d0 00007ff634496615 : 0000000000000000 00007ff63380f000 0000000000000000 0000000000000000 : firefox!wmain+0x54f9 [c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\toolkit\xre\nswindowswmain.cpp @ 115]
0000003ccefcfbd0 00007ffef47113d2 : 00007ff634496670 00007ff63380f000 0000000000000000 0000000000000000 : firefox!__scrt_common_main_seh+0x11d [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 253]
0000003ccefcfc10 00007ffef68654e4 : 00007ffef47113b0 0000000000000000 0000000000000000 0000000000000000 : KERNEL32!BaseThreadInitThunk+0x22
0000003ccefcfc40 0000000000000000 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : ntdll!RtlUserThreadStart+0x34
FAULTING_SOURCE_CODE:
No source found for 'c:\builds\moz2_slave\m-cen-w64-ntly-000000000000000\build\src\dom\media\mediamanager.cpp'
SYMBOL_STACK_INDEX: 0
SYMBOL_NAME: xul!mozilla::MediaManager::OnNavigation+1de
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: xul
IMAGE_NAME: xul.dll
DEBUG_FLR_IMAGE_TIMESTAMP: 5829c841
STACK_COMMAND: ~31s ; kb
FAILURE_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_e5e5e5e5_c0000005_xul.dll!mozilla::MediaManager::OnNavigation
BUCKET_ID: X64_APPLICATION_FAULT_INVALID_POINTER_READ_FILL_PATTERN_e5e5e5e5_xul!mozilla::MediaManager::OnNavigation+1de
WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/firefox_exe/53_0_0_6162/5829c279/xul_dll/53_0_0_6162/5829c841/c0000005/01717856.htm?Retriage=1
Followup: MachineOwner
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a stale or uninitialised pointer used in the media manager's navigation handler, as the faulting read hits a debug fill pattern.
Impact
The crash could take down the affected Firefox content process, but the text does not show a route from a web page to the crash.
What the attacker needed
Nightly build; fuzzing input
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A fuzzer feeds a program lots of odd input to find crashes. Here it made Firefox's media code follow a bad memory address, so the browser process stopped. The report is a debugger trace, not a full explanation of how a web page could trigger it.
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.