Crash [@ js::gc::PreWriteBarrierImpl]
Originally disclosed on Mozilla
- Fixed in 3 days
- Paid in 10 days
- Disclosed after 3 days
Created attachment 9536835
testcase
See attachment
'''
(gdb) bt
#0 js::gc::PreWriteBarrierImpl (thing=0xef351e99030) at /home/msf2/trees/firefox/js/src/gc/Cell.h:532
#1 0x0000555557a2e92d in js::gc::PreWriteBarrier<JSObject> (thing=0xef351e00000) at /home/msf2/trees/firefox/js/src/gc/Cell.h:552
#2 js::InternalBarrierMethods<JSObject*, void>::preBarrier (v=0xef351e00000) at /home/msf2/trees/firefox/js/src/gc/Barrier.h:351
#3 js::WriteBarriered<JSObject*>::pre (this=0x7ffff5e59cd8) at /home/msf2/trees/firefox/js/src/gc/Barrier.h:519
#4 js::PreBarriered<JSObject*>::setUnchecked (this=0x7ffff5e59cd8, v=<optimized out>) at /home/msf2/trees/firefox/js/src/gc/Barrier.h:572
#5 js::PreBarriered<JSObject*>::operator= (this=0x7ffff5e59cd8, other=...) at /home/msf2/trees/firefox/js/src/gc/Barrier.h:563
/snip
'''
'''
059f94423945-596024
059f9442394566ff0be7439a15ee55703c5e0057 is the first interesting commit
commit 059f9442394566ff0be7439a15ee55703c5e0057
Author: Jon Coppeard
Date: Wed Nov 12 15:18:01 2025 +0000
Bug 1827612 - Remove stable hashing for WeakMap and rekey entries instead r=sfink
This adds a vector of keys of entries where the key or value is in the nursery
so that we can trace these at the start or minor GC. If the vector grows too
large we sweep the whole map instead.
This replaces the post barrier for WeakMap keys so the table now uses
PreBarriered<Key> instead of HeapPtr<Key>.
This doesn't provide much improvement to WeakMap.get performance on its own but
it is a prerequisite for bug 1995021.
Stable hashing is still used for WeakRef and FinalizationRegistry targets.
Differential Revision: https://phabricator.services.mozilla.com/D270562
'''
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 64a19d6e96aa456e7947aa3f96b4cd8b54f97235.
Jon, is bug 1827612 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 high-severity memory corruption bug in JavaScript: GC. Mozilla made it public on 14 January 2026 as CVE-2026-2758.
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.