UAF due to GC freeing trial inlined ICScript which is still alive
A use-after-free occurs because a trial-inlined ICScript is not correctly marked as alive, so the garbage collector frees it while a call inline cache still points to it. An attacker could trigger the engine to jump to a freed pointer, which may lead to a crash or potentially exploitable memory corruption.
- Fixed in 14 hours
- Paid in 10 days
- Disclosed after 14 hours
Steps to reproduce:
The regressor for this bug appears to be bug 1960433. The issue is that the trial inlined ICScript is not being correctly determined to be alive, causing it to be freed by the GC and, consequently, causing the call IC to jump to a freed pointer.
'''
engine version : e11224bc34678000338c265c9053253cf7edf9cc
engine version date : 2026-01-31T14:52:00
'''
Args: `js --fuzzing-safe <...>`
'''js
gczeal(10);
function a() { this.b; }
c = [a];
for (f = 0; ; f++) {
d = f == 1000;
a();
e = c[d | 0];
a.prototype = e;
new a;
}
'''
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 liveness analysis for trial-inlined ICScript fails to keep the inlined script alive, so the garbage collector reclaims it while a call inline cache still references it.
Impact
The call inline cache can jump to a freed pointer, which could cause a crash and may be exploitable as memory corruption.
What the attacker needed
Ability to run the JS shell; fuzzing-safe build
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.
When a program runs, it sometimes reuses memory that is no longer needed and hands it back to the system. A use-after-free happens when the program keeps a pointer to that memory and later uses it as if it were still valid. Here the JavaScript engine's garbage collector freed some compiled code that a call site still referenced, so the engine could jump into memory that no longer belongs to it.
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.