Skip to content

fix: prevent use after free in chatter list - #7252

Merged
pajlada merged 2 commits into
Chatterino:masterfrom
3r01:fix-chatter-list-use-after-free
Sep 8, 2026
Merged

pajlada merged 2 commits into
Chatterino:masterfrom
3r01:fix-chatter-list-use-after-free

Conversation

@3r01

@3r01 3r01 commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Closing the Chatter List window while it is loading causes its API callbacks to access widgets after the window is destroyed

Repro:

  1. Open a channel where you are a moderator
  2. Hold escape and press the Chatter List button
  3. Observe that the Chatter List window opens and immediately closes while it is still loading
  4. Observe that chatterino crashes

Fixed by passing the window as caller to the network requests so callbacks are skipped if the window is destroyed

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread src/providers/twitch/api/Helix.cpp Outdated
Comment thread src/providers/twitch/api/Helix.cpp Outdated
Comment thread src/providers/twitch/api/Helix.cpp Outdated
Comment thread src/providers/twitch/api/Helix.cpp Outdated
Comment thread src/providers/twitch/api/Helix.cpp Outdated
Comment thread src/providers/twitch/api/Helix.cpp Outdated
Comment thread src/providers/twitch/api/Helix.cpp Outdated
Comment thread src/providers/twitch/api/Helix.cpp Outdated
Comment thread src/widgets/ChatterListWidget.cpp Outdated
Comment thread src/widgets/ChatterListWidget.cpp Outdated
@pajlada
pajlada merged commit aa01b88 into Chatterino:master Sep 8, 2026
18 checks passed
@3r01
3r01 deleted the fix-chatter-list-use-after-free branch September 8, 2026 20:37
babicekmarek pushed a commit to babicekmarek/streamally-chatterino that referenced this pull request Sep 14, 2026
Closing the `Chatter List` window while it is loading causes its API
callbacks to access widgets after the window is destroyed

Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
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.

2 participants