Bump quickjs: cycle-GC use-after-free fix for async closures#36
Merged
Conversation
EdgeJS now resolves Node tests and fixtures from the repo root, so the V8 and QuickJS CMake entry points no longer need a separate upstream Node checkout path. Co-authored-by: Cursor <cursoragent@cursor.com>
Place eval_flags before filename in napi_contextify so the struct matches QuickJS header field order and WASIX/native builds compile cleanly. Co-authored-by: Cursor <cursoragent@cursor.com>
Points the quickjs submodule at wasmerio/quickjs#6 (fix/async-generator-gc-uaf, a5522a7), porting the CVE-2023-48184 / bellard#156 fix so the cycle collector no longer frees a value still referenced by a suspended async generator's closure var_ref. NOTE: not final until wasmerio/quickjs#6 merges; update this pointer to the merged commit afterward. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Arshia001
added a commit
to wasmerio/edgejs
that referenced
this pull request
Jun 30, 2026
Brings in wasmerio/napi#36 -> wasmerio/quickjs#6, porting the CVE-2023-48184 / bellard#156 fix to our quickjs-ng tree. The cycle collector no longer frees a Promise resolving function still referenced by a suspended async generator's closure var_ref (heap-use-after-free in gc_decref_child during a later GC). Surfaces in async-heavy apps iterating streams (Etherpad, undici); reproduces with `for await (const x of socket)` under GC pressure. This complements the handle-wrap teardown fix already in this branch; both are QuickJS GC use-after-free fixes. NOTE: not final until wasmerio/quickjs#6 and wasmerio/napi#36 merge; update the napi pointer to the merged commit afterward. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pulls in wasmerio/quickjs 14bf204, which fixes a heap-use-after-free where open closure var_refs could outlive the async frame they point into when an incomplete async function/generator is freed during cycle collection. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
syrusakbary
approved these changes
Jun 30, 2026
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.
Bumps the
quickjssubmodule to wasmerio/quickjs#6 (fix/async-generator-gc-uaf,a5522a7), which ports the CVE-2023-48184 / bellard#156 fix to our quickjs-ng tree.The cycle collector could free a Promise resolving function still referenced by a suspended async generator's closure var_ref → heap-use-after-free in
gc_decref_childduring a later GC. Surfaces in async-heavy apps iterating streams (Etherpad, undici); reproduces deterministically withfor await (const x of socket)under GC pressure.🤖 Generated with Claude Code