Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connectd: fix double-free crash on connection timeout. #7736

Conversation

rustyrussell
Copy link
Contributor

@rustyrussell rustyrussell commented Oct 14, 2024

tmpctx may not get cleaned immediately, so the timeout (a child of the struct early_peer at this point) can still outlast the conn!

Changelog-Fixed: connectd: crash on erroneous timeout.
Fixes: #7728

@rustyrussell rustyrussell added this to the v24.08.2 milestone Oct 14, 2024
tmpctx may not get cleaned immediately, so the timeout (a child of
the struct early_peer at this point) can still outlast the conn.
Do the clearer thing, and explicitly free the timeout.

Changelog-Fixed: connectd: crash on erroneous timeout.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell rustyrussell force-pushed the fix-connectd-timeout-crash branch from d215ecc to a3ba33e Compare October 14, 2024 04:22
Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

ACK a3ba33e

Would be good to have the stacktrace inside the commit message for next time :) but I know that you know, you tech me that.

@vincenzopalazzo vincenzopalazzo merged commit 4e6bac6 into ElementsProject:master Oct 14, 2024
38 checks passed
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.

crash: lightningd: gossipd failed (exit status 2), exiting
2 participants