Assertion failure: data == JS::SCTAG_TMO_ALLOC_DATA || data == JS::SCTAG_TMO_MAPPED_DATA, at js/src/vm/StructuredClone.cpp:3457
A debug assertion in the JavaScript engine's structured clone code fails when processing a crafted test case, indicating an internal invariant about transferable object data tags is violated. The text does not describe any attacker impact beyond crashing the debug build.
- Fixed in 26 days
- Paid in 32 days
- Disclosed after 26 days
Created attachment 9418558
bug.js
Steps to reproduce:
Checkout commit ef4ef8198add3192d1e49157fb3f377ea7e60009 and invoke the js shell as follows:
'''
js --fuzzing-safe <test-case>
'''
Actual results:
'''
Assertion failure: data == JS::SCTAG_TMO_ALLOC_DATA || data == JS::SCTAG_TMO_MAPPED_DATA, at js/src/vm/StructuredClone.cpp:3457
'''
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
Root cause
Likely the structured clone implementation mishandles the data tag of a transferred object, so the expected alloc/mapped tag invariant does not hold.
Impact
The crafted input triggers an assertion failure that aborts the debug build; the text does not show any effect on release builds or any security consequence.
What the attacker needed
Debug build of the js shell; fuzzing-safe mode; crafted test case
How it was found
- Check out the specified commit of the engine source.
- Run the js shell with fuzzing-safe mode on the provided test case.
- Observe the assertion failure in StructuredClone.cpp.
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.
A JavaScript engine has a debug-only check that stops the program if an internal assumption turns out to be wrong. Here a specially crafted script made that check fail, which means the engine's own bookkeeping about moved memory was inconsistent. The report only shows a crash in a debug build, not what a real attacker could do.
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.