Assertion failure: obj == cacheResult, at vm/Compartment-inl.h:105
Originally disclosed on Mozilla
- Fixed in 7 days
- Paid in 8 days
- Disclosed after 7 days
Created attachment 9530414
debug stack
'''js
var x = newGlobal({ newCompartment: true });
var y = Debugger(x);
y.x = y;
y.onDebuggerStatement = function(w) {
nukeAllCCWs();
w.environment.getVariable("x");
}
x.eval('function f(z) { with(z) { debugger } }');
x.f(y);
'''
'''
(gdb) bt
#0 0x00005555572a49d8 in MOZ_CrashSequence (aAddress=0x0, aLine=105)
at /home/msf2/shell-cache/js-dbg-64-linux-x86_64-256e8bad1a52-598750/objdir-js/dist/include/mozilla/Assertions.h:237
#1 JS::Compartment::wrap (this=<optimized out>, cx=<optimized out>, vp=...) at /home/msf2/trees/firefox/js/src/vm/Compartment-inl.h:105
#2 0x0000555557a7fd91 in js::CrossCompartmentWrapper::get (this=0x555558f615b0 <js::CrossCompartmentWrapper::singleton>, cx=0x7ffff5e3c200, wrapper=...,
receiver=..., id=..., vp=...) at /home/msf2/trees/firefox/js/src/proxy/CrossCompartmentWrapper.cpp:184
#3 0x0000555557aa355e in js::Proxy::getInternal (cx=0x7ffff5e3c200, proxy=proxy@entry=..., receiver=receiver@entry=..., id=id@entry=..., vp=...)
at /home/msf2/trees/firefox/js/src/proxy/Proxy.cpp:526
#4 0x0000555557a90fc0 in js::Proxy::get (cx=0x7ffff5e3c200, proxy=..., receiver_=..., id=..., vp=...)
at /home/msf2/trees/firefox/js/src/proxy/Proxy.cpp:534
#5 0x000055555750601f in with_GetProperty (cx=0x7ffff5e3c200, obj=..., receiver=..., id=..., vp=...)
at /home/msf2/trees/firefox/js/src/vm/EnvironmentObject.cpp:870
/snip
'''
'''
9bd0056bb97a-597036
9bd0056bb97aef3f6f44ec457417821f92a7eb4c is the first interesting commit
commit 9bd0056bb97aef3f6f44ec457417821f92a7eb4c
Author: Jon Coppeard
Date: Wed Nov 19 13:24:57 2025 +0000
Bug 1999464 - Don't nuke CCWs to the debugger object r=jandem
This is an alternative to the fix in bug 1995637 and removes that change.
The debugger mostly uses its own wrappers for cross compartment pointers
between debugger and debuggee globals. These are not in the CCW map and so are
not nuked by NukeCrossCompartmentWrappers. This pointer from a Breakpoint to
its owning debugger however is a normal CCW that is in the map and so can be
affected by that operation.
The change makes it so we skip nuking CCWs to the main debugger object. This
could affect other uses of this CCW but these are not accessible from content
JS so I don't think this is a problem.
It's important not to break the link between breakpoints and their debuggers
because they are present in two linked lists which are in different realms. To
clean up properly the link needs to be intact.
This change is also covered by the original test in bug 1995637.
Differential Revision: https://phabricator.services.mozilla.com/D273012
'''
Run with `--fuzzing-safe --no-threads --ion-eager`, 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`, tested on gh rev 256e8bad1a52af07e29574baf4aaf02f05b39d93.
Jon, is bug 1999464 a likely regressor?
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 medium-severity memory corruption bug in JavaScript Engine. Mozilla made it public on 9 December 2025 as CVE-2026-0884.
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.