Skip to content

[8.13] Fix use-after-free at event-loop shutdown (#105486)#105575

Merged
elasticsearchmachine merged 1 commit intoelastic:8.13from
DaveCTurner:backport/8.13/pr-105486
Feb 15, 2024
Merged

[8.13] Fix use-after-free at event-loop shutdown (#105486)#105575
elasticsearchmachine merged 1 commit intoelastic:8.13from
DaveCTurner:backport/8.13/pr-105486

Conversation

@DaveCTurner
Copy link
Copy Markdown
Member

Backports the following commits to 8.13:

We could still be manipulating a network message when the event loop
shuts down, causing us to close the message while it's still in use.
This is at best going to be a little surprising to the caller, and at
worst could be an outright use-after-free bug.

This commit moves the double-check for a leaked promise to happen
strictly after the event loop has fully terminated, so that we can be
sure we've finished using it by this point.

Relates elastic#105306, elastic#97301
@DaveCTurner DaveCTurner added :Distributed/Network Http and internode communication implementations >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Distributed Meta label for distributed team. labels Feb 15, 2024
@elasticsearchmachine elasticsearchmachine merged commit 127da57 into elastic:8.13 Feb 15, 2024
@DaveCTurner DaveCTurner deleted the backport/8.13/pr-105486 branch February 15, 2024 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Distributed/Network Http and internode communication implementations Team:Distributed Meta label for distributed team. v8.13.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants