[JSC] GetByStatus::computeFor's prototype walk must not skip a base structure's non-reified static properties
CVE: CVE-2026-112673 · Safari 27.2 · Released October 26, 2026 Impact: Processing maliciously crafted web content may lead to an unexpected process termination Apple's description: A type confusion issue was addressed with improved state handling. Credit: Myungyong Lee
High. The fold never looked at the receiver, so the JIT returned a prototype's value where a built-in accessor should have run, and any page can reach it. Turning the wrong value into a wrong type needs an abstract-vs-runtime divergence that this bug does not establish on its own.
JavaScriptCore's optimizing JITs speed up property loads by proving, at compile time, which object in a prototype chain actually holds a given name. They do this through GetByStatus, a summary that walks each Structure (JSC's hidden class) along the chain and records Presence and Absence conditions that the compiled code relies on. The invariant at stake is that "absent from this structure" must mean absent from every store the object reads from. That includes the static property tables that built-in objects fill in lazily.
The angle: A page can make optimized code read a property from the wrong object in the prototype chain. The built-in's own accessor is skipped and the code returns a value the engine never meant to produce.
Source/JavaScriptCore/bytecode/GetByStatus.cpp
Source/JavaScriptCore/runtime/Structure.h
JSTests/stress/get-by-status-fold-must-not-skip-base-static-property.js
Patch Details
The change adds one helper and applies it at three decision points that previously trusted the materialised property table alone.
Structure.h. It adds a newStructure::hasNonReifiedStaticProperty(PropertyName)that combines the existinghasNonReifiedStaticProperties()flag test with afindPropertyHashEntry(propertyName)lookup. The comment above it states the contract: any lookup that concludes a property is absent from a structure must also consult the static table.GetByStatus.cpp. This is the primary fix. Inside theattemptToFoldlambda ofGetByStatus::computeFor(JSGlobalObject*, const StructureSet&, ...), the prototype walk now bails out withstd::nullopt(no fold) when any structure it visits, including the head structure, still owns the name through an unreified static table. The check sits beforeprototypeForLookupadvances the walk, so the base structure is covered on the first iteration.PutByStatus.cpp. BeforePutByStatus::computeFortreats a store as an add-property transition, it now returnsLikelyTakesSlowPathif the base structure has a non-reified static entry foruid. The new comment explains why: such a put "is not a transition at all and goes through the static entry's setter or replaces it in place."DFGGraph.cpp. The per-structure functor inGraph::tryEnsureAbsencenow refuses to prove absence when the structure's static table still holds the property. Before this change it trusted thegetConcurrentlymiss.PropertyCondition.cpp. The Absence case ofisStillValidAssumingImpurePropertyWatchpointalready rejected structures whose static table held the name. It is refactored onto the new helper and its semantics are unchanged.- Collateral. The
attempToFoldlambdas are renamed toattemptToFoldinGetByStatus.cppandDFGAbstractInterpreterInlines.h. The[&]() ->lambda is shortened to[&] ->. - Test. A new stress test,
get-by-status-fold-must-not-skip-base-static-property.js, runs at--jitPolicyScale=0so it reaches the optimizing tiers quickly.
Background
Structures.
A Structure is JSC's hidden class. It records an object's property layout (name → offset and attributes), its prototype, and type-info flags. Objects with the same shape share a Structure, and every JIT tier specialises its code against Structures.
Static property tables and lazy reification.
Many built-in objects, including constructors, prototypes and DOM bindings, declare their properties in a compile-time hash table (HashTable, queried with findPropertyHashEntry) instead of adding them to the Structure up front. These entries are reified, meaning copied into the Structure's ordinary property table, lazily and on demand. hasNonReifiedStaticProperties() reports that such a table exists and has not been materialised yet.
getConcurrently.
JSC compiles optimized code on background threads. getConcurrently is the thread-safe lookup those threads use to query a Structure's materialised property table. It does not consult static hash tables.
GetByStatus and PutByStatus.
These are summaries computed while the DFG parses bytecode. Each one describes how a property access behaves across a set of Structures. A Simple variant with a condition set lets the JIT replace a generic get or put with a direct load or store, guarded by property conditions on the prototype chain. The overload GetByStatus::computeFor(JSGlobalObject*, const StructureSet&, ...) builds a status from Structures the compiler already knows, independent of inline-cache profiling. Its attemptToFold lambda walks the prototype chain looking for the object that holds the property.
Property conditions and watchpoints.
A condition is a claim such as "Presence of x at offset N on Structure S" or "Absence of x on Structure S". The JIT installs these as watchpoints. If a Structure later changes in a way that breaks the condition, the compiled code that depends on it is jettisoned. generateConditions is the routine that produces a condition set by running a functor over the chain.
Legacy RegExp statics.
The RegExp constructor exposes legacy properties such as RegExp.input (alias $_) that return the last match state. They are implemented as static-table accessors on the constructor object.
Analysis
This is a JIT miscompilation built on a false absence proof. The compiler treated a lazily filled property store as authoritative, so a name the receiver actually owned was resolved further up the prototype chain.
RegExp (base, Structure S0) Function.prototype (Structure S1)
+--------------------------------+ proto +------------------------------+
| property table: x |------->| property table: input ------+--> shadow {p0, y:13.37}
| static table (NOT reified): | +------------------------------+
| input -> last-match getter --+--> "q0002048"
+--------------------------------+
correct : a.input -> S0 static getter -> "q0002048" -> r.y === undefined
misfold : getConcurrently(S0,"input") miss -> walk to S1 -> load shadow -> r.y === 13.37
The diagram shows the gap. Before the fix, two separate lookup mechanisms each had a blind spot, and together they left the left-hand box unchecked. getConcurrently on S0 sees only the property table, which holds x but not input, because input still lives in the unreified static table. generateConditions, which backs the fold, starts its functor at the prototype (S1) and never examines the head structure. Neither one examined S0's static table, so the fold concluded that input was missing from RegExp. It then continued along the proto arrow, found an ordinary own input on Function.prototype, and emitted a Simple variant that loads shadow directly from S1's slot.
The regression test builds exactly this shape:
- It installs
Function.prototype.input = shadow, an ordinary object with ayfield.setup()then warms up a plaininputload off an object whose prototype isFunction.prototype. subject.match(/.*/)sets the RegExp last-match state, so the staticRegExp.inputaccessor would return"q0002048".RegExp.x = 1gives the constructor an ordinary own property. Theb.x; b.x; b.x;line in then == 0branch runs 100,000 times witha = RegExp, so the optimizing tiers compilefwithaknown to haveRegExp's Structure.- The
n > 0branch,let r = a.input; return r.y;, stays cold during warm-up.a.inputtherefore has no inline-cache profile of its own, and the structure-setcomputeForbuilds its status from the Structure the compiler already knows. - Under the misfold,
risshadowinstead of the last-match string.r.ythen reads13.37where correct semantics produceundefined, because a string has noy. The test assertsundefined, and then checksRegExp.input === subjectto confirm the static accessor still answers correctly at runtime.
The fix closes the head-structure gap at its source. The new hasNonReifiedStaticProperty check runs on every structure the attemptToFold loop visits, starting with the base, and declines to fold the moment a static table could still supply the name. With no fold, the access stays generic and the static getter runs.
The same missing check existed at two other decision points. Graph::tryEnsureAbsence could prove a property absent on a structure whose static table still owned it, giving the DFG the same false belief through a different entry point. PutByStatus::computeFor could model a store to a static-table-owned property as an add-property transition. That bypasses the static entry's setter or its ReadOnly semantics, and it could produce a Structure whose property table disagrees with the static entry. PropertyCondition's Absence check was the one place already taught about non-reified static tables. The validator was correct, but the callers deciding whether to emit such conditions were not, and the validator never saw the head-structure case because the condition was never generated for it.
The vulnerability weakens the soundness of JIT property-access specialisation inside the WebContent renderer. JSC's optimizing tiers assume that a condition set derived by GetByStatus describes exactly where a property resolves. Before the fix, that assumption failed for any object whose own property lived in an unreified static table. Compiled code would return a value from the wrong holder and skip the static accessor, including the accessor's side effects and its return value. The confirmed effect is that semantically wrong value, and it is reachable from ordinary web content using only a Function.prototype assignment, a RegExp match and DFG warm-up.
The projected escalation runs through the abstract interpreter. If downstream DFG phases specialise on the folded value's structure while the runtime value differs, this would become a type-confused property access. That access would be bounded by the layout of the Structure the compiler specialised against: a relative read class over the mismatched cell, not arbitrary read/write without some further invariant failure. Establishing that abstract-value versus runtime-value divergence is the missing step, and this bug does not supply it on its own. Apple's advisory lists unexpected process termination as the impact while describing the issue as type confusion. On the put side, whether the shadowing transition could be turned into a memory-safety primitive is unclear. Either way the bug lives in the WebContent process and does not cross the sandbox; a full chain would need a separate escape.
A miss in the materialised property table is not a miss: RegExp's own static input was invisible to the fold, so the JIT resolved the load on Function.prototype instead.
Insight
PropertyCondition's Absence validator already knew about non-reified static tables, and that is exactly why the bug survived. The safety net sat at condition validation, while the head structure fell through at condition generation, which never produces a head-structure condition for the validator to reject. Lazy reification is a performance optimisation that silently splits an object's own properties across two stores, so every absence or miss proof in the JIT stack has to consult both. The fix had to land in three places at once (GetByStatus, PutByStatus, Graph::tryEnsureAbsence). The new Structure::hasNonReifiedStaticProperty helper effectively writes that contract down as an API.
Audit directions
- Absence proofs over half of a lazily filled store. Narrow: Audit every compiler-side JSC caller of
getConcurrently/getthat treatsinvalidOffsetas "not here". Start with thegenerateConditionsFor*family,InByStatus,DeleteByStatus,CheckPrivateBrandStatusand the AI fold inDFGAbstractInterpreterInlines.h. The tell is a miss decision on a Structure with nohasNonReifiedStaticPropertyconsult beside it. Wider: The same split exists for indexed properties, custom accessors andJSGlobalObjectlazy properties (LazyProperty); check whether fast-path misses there also consult the lazy store. Widest: SpiderMonkey'sJSClassresolve hooks (lazy standard classes) pose the same question for IonMonkey: any "property absent" proof must also prove the resolve hook will not materialise the name. V8's lazily instantiated API accessors raise the same question. The invariant to carry: a miss is provable only after every backing store that could later materialise the name has been consulted. - Prototype walkers that start one hop above the receiver. Narrow: The patch comment states that
generateConditions"starts running its functor at the prototype and skips the head structure." Grep JSC for other walkers with that shape, such as functors passed to condition generators andObjectPropertyConditionSetbuilders, and verify that some other code always covers the head structure's special stores. The tell is a loop initialised withprototypeForLookup/storedPrototypewith no separate head-structure static or custom check before it. Wider: Any IC or JIT layer where the receiver check and the chain check are done by different functions is at risk, because each assumes the other covers the head. Ceiling: the named starting points are JSC-internal; the cross-engine form of this question is covered by the first direction. - Put-side analogues. Narrow: Does any store-caching path model a write to a statically declared property as an add-property transition? Start with
PutByStatus::computeForPropertyInlineCacheand wherePutByVariant::transitionvariants are constructed. Wider: CheckDefineOwnProperty-style DFG nodes, where a transition on a non-reified structure would let the materialised table disagree with the static entry. The tell is transition caching gated only on agetConcurrentlymiss plusisDictionary/ReadOnlychecks, with no static-table consult. Ceiling: JSC-specific in the form given here. - Abstract interpreter trusting a status-derived type. Narrow: For
GetByStatusSimple variants with non-empty condition sets, trace whether the AI'sattemptToFoldinDFGAbstractInterpreterInlines.hand the bytecode parser's lowering always consume the same condition set. Wider: A hit is any path where the AI narrows the result's structure while the node can still fall back to a generic get that runs a getter. That is the abstract-versus-runtime divergence that would promote this bug class from a wrong value to a type confusion. Ceiling: JSC-specific; the question concerns DFG's own AI and lowering contract.