AddressSanitizer: SEGV on unknown address or Assertion failure: !producer->isDiscarded(), at jit/IonAnalysis.cpp:3149
Originally disclosed on Mozilla
- Fixed in 3 days
- Paid in 11 days
- Disclosed after 3 days
Created attachment 9553030
testcase.tar.xz
Create a `wrapper.js`:
'''js
new WebAssembly.Module(read(scriptArgs[0], "binary"));
'''
Debug stack:
'''
(gdb) bt
#0 0x00005555580287ca in MOZ_CrashSequence (aAddress=0x0, aLine=3149)
at /home/msf2/shell-cache/js-dbg-64-linux-x86_64-2c1cefd4edaa-613584/objdir-js/dist/include/mozilla/Assertions.h:237
#1 CheckOperand (consumer=consumer@entry=0x7ffff5528460, use=<optimized out>, usesBalance=usesBalance@entry=0x7fffffff72bc)
at /home/msf2/trees/firefox/js/src/jit/IonAnalysis.cpp:3149
#2 0x00005555580111ab in js::jit::AssertBasicGraphCoherency (graph=..., force=<optimized out>) at /home/msf2/trees/firefox/js/src/jit/IonAnalysis.cpp:3293
#3 0x000055555800f8f1 in js::jit::OptimizeMIR (mir=mir@entry=0x7fffffff8d08) at /home/msf2/trees/firefox/js/src/jit/Ion.cpp:1018
#4 0x000055555875e46a in js::wasm::IonCompileFunctions (codeMeta=..., codeTailMeta=0x0, compilerEnv=..., lifo=..., inputs=..., code=code@entry=0x7ffff5e7f3c8,
error=0x7fffffffc728) at /home/msf2/trees/firefox/js/src/wasm/WasmIonCompile.cpp:11000
#5 0x000055555873c009 in ExecuteCompileTask (task=0x7ffff5e7f000, error=0x7fffffffc728) at /home/msf2/trees/firefox/js/src/wasm/WasmGenerator.cpp:613
/snip
'''
Opt ASan stack:
'''
AddressSanitizer:DEADLYSIGNAL
=================================================================
==77392==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x58879fa5532b bp 0x7fff5dcb6fb0 sp 0x7fff5dcb6f50 T0)
==77392==The signal is caused by a WRITE memory access.
==77392==Hint: address points to the zero page.
#0 0x58879fa5532b in js::InlineList<js::jit::MInstruction>::remove(js::InlineListNode<js::jit::MInstruction>*) /home/msf2/trees/firefox/js/src/jit/InlineList.h:418:17
#1 0x58879fa5532b in js::jit::MBasicBlock::discardIgnoreOperands(js::jit::MInstruction*) /home/msf2/trees/firefox/js/src/jit/MIRGraph.cpp:894:17
#2 0x58879ef50474 in js::jit::ValueNumberer::discardDef(js::jit::MDefinition*, js::jit::ValueNumberer::AllowEffectful) /home/msf2/trees/firefox/js/src/jit/ValueNumbering.cpp:383:12
#3 0x58879ef507ac in js::jit::ValueNumberer::processDeadDefs() /home/msf2/trees/firefox/js/src/jit/ValueNumbering.cpp:422:10
#4 0x58879ef51dff in js::jit::ValueNumberer::removePredecessorAndDoDCE(js::jit::MBasicBlock*, js::jit::MBasicBlock*, unsigned long) /home/msf2/trees/firefox/js/src/jit/ValueNumbering.cpp:490:56
#5 0x58879ef5234f in js::jit::ValueNumberer::removePredecessorAndCleanUp(js::jit::MBasicBlock*, js::jit::MBasicBlock*) /home/msf2/trees/firefox/js/src/jit/ValueNumbering.cpp:556:8
/snip
'''
'''
0629c75d9760-612211
0629c75d9760cd85e8b5966fc8b2ebfc5bcc042a is the first interesting commit
commit 0629c75d9760cd85e8b5966fc8b2ebfc5bcc042a
Author: Jan de Mooij
Date: Sat Mar 7 09:19:37 2026 +0000
Bug 2020906 - Improve FoldTests pattern matching. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D286003
'''
Run with `--fuzzing-safe --no-threads --no-baseline --no-ion wrapper.js testcase.wasm`, for the debug build, compile with `AR=ar sh ~/trees/firefox/js/src/configure --enable-debug --enable-debug-symbols --with-ccache --enable-nspr-build --enable-ctypes --enable-gczeal --enable-rust-simd --disable-tests`, for the opt ASan build, compile with `AR=ar sh ~/trees/firefox/js/src/configure --enable-fuzzing --without-sysroot --enable-address-sanitizer --disable-jemalloc --disable-stdcxx-compat --enable-undefined-sanitizer --with-ccache --enable-nspr-build --enable-ctypes --enable-gczeal --enable-rust-simd --disable-tests`, tested on gh rev 2c1cefd4edaa3e020ac5d67af6f42459b4ff57c3.
Jan, is bug 2020906 a likely regressor? (Note that bug 2020906 is s-s)
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 17 March 2026.
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.