Skip to content

Fix EventSource use-after-free - #7166

Merged
sohpeach merged 1 commit into
swallace/patch-stream-pump-cancelfrom
swallace/patch-eventsource-uaf
Aug 28, 2026
Merged

Fix EventSource use-after-free#7166
sohpeach merged 1 commit into
swallace/patch-stream-pump-cancelfrom
swallace/patch-eventsource-uaf

Conversation

@sohpeach

Copy link
Copy Markdown
Member

Merging from upstream.

EventSourceSink queued a gated callback capturing a raw EventSource pointer. If the EventSource was collected before callback execution, the callback dereferenced freed native memory.

Carry a weak EventSource reference through the sink and promote it under the isolate lock before dispatch.

@sohpeach
sohpeach requested review from a team as code owners August 28, 2026 09:25
@sohpeach
sohpeach force-pushed the swallace/patch-eventsource-uaf branch from b858645 to 929931c Compare August 28, 2026 09:51
@ask-bonk

ask-bonk Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

@sohpeach Bonk workflow was cancelled.

View workflow run · To retry, trigger Bonk again.

@sohpeach
sohpeach force-pushed the swallace/patch-eventsource-uaf branch from 929931c to ebe27d6 Compare August 28, 2026 10:55
EventSourceSink queued a gated callback capturing a raw EventSource
pointer. If the EventSource was collected before callback execution, the
callback dereferenced freed native memory.

Carry a weak EventSource reference through the sink and promote it under
the isolate lock before dispatch.
@sohpeach
sohpeach force-pushed the swallace/patch-eventsource-uaf branch from ebe27d6 to 1883e0f Compare August 28, 2026 11:39
@sohpeach
sohpeach merged commit 1b0594c into main Aug 28, 2026
26 of 30 checks passed
@sohpeach
sohpeach deleted the swallace/patch-eventsource-uaf branch August 28, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants