Repository navigation
fix: namespace holders by allow-list, parsed text names, Symbol trust after code text, shared roots (R51-RX9) - #453
Merged
Merged
Conversation
…trust Symbol after code text, treat shared roots as opaque
…holder proofs on top of main
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the four findings of review/r4-a25rr7.md (R51-RX9).
may_hold_globalis an allow-list. A holder is proven not to be the global object only when it is a fixed local binding (not rebound through the global object, not named by code text, not shared with another input) initialised by a literal with no__proto__key or accessor, whose every use is a member access, a resolved method call, a test ortypeof, and whose__proto__or unresolved-key writes store values that are proven too. Free names andthismay hold it. Arrays, functions and primitives also need the built-in prototype chains to be unchanged: no built-in prototype is obtained as a value, by__proto__,getPrototypeOf, a descriptor reader, an unresolved key on a constructor,with, or a code text the literal-text judge cannot clear. The scan runs again whenever the settle loop finds new rebound roots; writes inside recognised protection blocks and machinery do not count as rebinding. A numeric or fresh-Symbol()key cannot name a namespace, so such reads give the global kind instead.names_reach_text), so escapes and nested runners count. Nested texts are judged in every lane.Symbolstays trusted only while every code text that may run is a literal that does not nameSymbolafter parsing; any other runner text drops the trust.is_shared_globalreports are opaque before the first analysis, count as a global source, and every fixedness check undercalls/agnostic/goes throughrebound(), which includes them.--unsafe: F2, F3 and F4 apply in both lanes. For F1 --unsafe keeps its premise that built-in prototypes are not patched (q-rx9-a15); the holder proofs apply in both lanes. The other-input key rebinding row (rx9-m21) is under the keyed-rebind premise under --unsafe.
Rows: the 26 fin repros and 41 multi-input cases are in rename_a25rr. The recursive-helper row in dynamic_reach_rows decodes again, as it did before the namespace-by-key rule.
Measured against main: obfuscator BASELINEs identical (io, versions, relayer), bundle-matrix identical, Krunker and game.js byte-identical in both lanes (instructions +5 to 6% on 0.20 and 2.6.9 default, under 3% elsewhere). Full sweep: no case got worse in either lane; every case failing with this branch fails the same way on main. Reviewer probe dirs: no default-lane difference left except the k1 error-text rows. Wasm 16,153,413 bytes before the last rebase.