Skip to content

Fix search app buffer use-after-free (#143134)#143298

Merged
ebarlas merged 2 commits intoelastic:9.3from
ebarlas:backport/9.3/pr-143134
Mar 2, 2026
Merged

Fix search app buffer use-after-free (#143134)#143298
ebarlas merged 2 commits intoelastic:9.3from
ebarlas:backport/9.3/pr-143134

Conversation

@ebarlas
Copy link
Copy Markdown
Contributor

@ebarlas ebarlas commented Feb 27, 2026

This is a backport of the following commits from main to 9.3: 755e020

updateSearchApplication released a ReleasableBytesStreamOutput in
a try-with-resources block while an async client.index() call
still held a BytesReference view of its pages.

The bug was latent until elastic#142451 switched the default buffer size
to PAGE_SIZE_IN_BYTES, causing BigArrays to recycle pages instead
of plain byte arrays. Freed pages were immediately reused,
corrupting the IndexRequest source on replica nodes.

Bind buffer release to the async listener via ActionListener.run
and flush instead of close, matching AsyncTaskIndexService.
@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.3.2 labels Feb 27, 2026
@ebarlas ebarlas added :Security/Security Security issues without another label backport Team:Security Meta label for security team and removed needs:triage Requires assignment of a team area label labels Feb 27, 2026
@ebarlas ebarlas self-assigned this Feb 28, 2026
@ebarlas ebarlas requested a review from DaveCTurner February 28, 2026 00:57
@ebarlas ebarlas merged commit 643f991 into elastic:9.3 Mar 2, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :Security/Security Security issues without another label Team:Security Meta label for security team v9.3.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants