Skip to content
DoS Disclosed report Advanced

[WASM-GC] Assertion failure: storageBytes.isValid() in calcStorageBytes

P1umer Follow

Originally disclosed on Mozilla

  • Fixed in 11 days
  • Paid in 17 days
  • Disclosed after 11 days
Text
Created attachment 9380692
poc0217.js

Steps to reproduce:

Git Commit : 3da086bd7bce12353fc65968802445dca46f4537
Build :
ac_add_options --enable-project=js
ac_add_options --disable-optimize
ac_add_options --disable-unified-build
ac_add_options --enable-debug
ac_add_options --disable-jemalloc

Running:
./js --wasm-memory-control --wasm-compiler=optimizing --wasm-exnref poc.js


Actual results:

'''
  * frame #0: 0x0000555558e0398f js`js::jit::CodeGenerator::visitWasmNewArrayObject(js::jit::LWasmNewArrayObject*) [inlined] js::WasmArrayObject::calcStorageBytes(numElements=4294967293) at WasmGcObject.h:223:5
    frame #1: 0x0000555558e03948 js`js::jit::CodeGenerator::visitWasmNewArrayObject(this=0x00007ffff66db1e0, lir=0x00007ffff006a2c0) at CodeGenerator.cpp:19094:9
    frame #2: 0x0000555558df4e75 js`js::jit::CodeGenerator::generateBody(this=0x00007ffff66db1e0) at CodeGenerator.cpp:7388:9
    frame #3: 0x0000555558ea4ef9 js`js::jit::CodeGenerator::generateWasm(this=0x00007ffff66db1e0, callIndirectId=CallIndirectId @ 0x00007ffff66daec0, trapOffset=(offset_ = 1194), argTypes=0x00007ffff66db1d0, trapExitLayout=0x00007ffff66dc0e0, trapExitLayoutNumWords=16, offsets=0x00007ffff66db1a0, stackMaps=0x000055555ab67958, decoder=0x00007ffff66db130) at CodeGenerator.cpp:15196:8
    frame #4: 0x000055555984421e js`js::wasm::IonCompileFunctions(moduleEnv=0x00007fffffffc770, compilerEnv=<unavailable>, lifo=0x000055555ab672d0, inputs=0x000055555ab67338, code=0x000055555ab67660, error=0x00007ffff66dcc20) at WasmIonCompile.cpp:9377:20
    frame #5: 0x00005555597db405 js`ExecuteCompileTask(task=0x000055555ab672b0, error=0x00007ffff66dcc20) at WasmGenerator.cpp:729:12
    frame #6: 0x00005555597dadad js`js::wasm::CompileTask::runHelperThreadTask(this=0x000055555ab672b0, lock=<unavailable>) at WasmGenerator.cpp:755:10
    frame #7: 0x0000555557c60c52 js`js::GlobalHelperThreadState::runTaskLocked(this=0x000055555aa1b940, task=0x000055555ab672b0, locked=0x00007ffff66dcd20) at HelperThreads.cpp:1726:9
    frame #8: 0x0000555557c60800 js`js::GlobalHelperThreadState::runOneTask(this=0x000055555aa1b940, lock=0x00007ffff66dcd20) at HelperThreads.cpp:1695:5
    frame #9: 0x0000555557c9ff7c js`js::HelperThread::threadLoop(this=0x000055555aa175d0, pool=0x000055555aa1cfb0) at InternalThreadPool.cpp:282:27
    frame #10: 0x0000555557c9fa7d js`js::HelperThread::ThreadMain(pool=0x000055555aa1cfb0, helper=0x000055555aa175d0) at InternalThreadPool.cpp:225:11
    frame #11: 0x0000555557ca1756 js`js::detail::ThreadTrampoline<void (&)(js::InternalThreadPool*, js::HelperThread*), js::InternalThreadPool*&, js::HelperThread*>::Start(void*) [inlined] void js::detail::ThreadTrampoline<void (&)(js::InternalThreadPool*, js::HelperThread*), js::InternalThreadPool*&, js::HelperThread*>::callMain<0ul, 1ul>(this=0x000055555aa1d080) at Thread.h:228:5
    frame #12: 0x0000555557ca1738 js`js::detail::ThreadTrampoline<void (&)(js::InternalThreadPool*, js::HelperThread*), js::InternalThreadPool*&, js::HelperThread*>::Start(aPack=0x000055555aa1d080) at Thread.h:217:11
    frame #13: 0x00007ffff7f8e609 libpthread.so.0`start_thread(arg=<unavailable>) at pthread_create.c:477:8
    frame #14: 0x00007ffff7b43353 libc.so.6`__clone + 67
'''

The original report as published on Mozilla's Bugzilla, by P1umer. 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 high-severity doS bug in JavaScript: WebAssembly. Mozilla made it public on 28 February 2024.

About DoS

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by P1umer

View all

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

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.