Skip to content

HAProxy: Reject HAProxyMessages with malformated TLV and not leak memory#16866

Merged
normanmaurer merged 3 commits into
4.1from
ha41
Jun 2, 2026
Merged

HAProxy: Reject HAProxyMessages with malformated TLV and not leak memory#16866
normanmaurer merged 3 commits into
4.1from
ha41

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

@normanmaurer normanmaurer commented Jun 1, 2026

Motivation:

We need to verify that the contained length actually is valid before retaining the buffer as otherwise we will leak memory.

Modifications:

  • Verify length is valid
  • Only retain buffer if we not throw exceptio
  • Add unit test

Result:

Ensure we never leak memory when handling invalid messages

Motivation:

We need to verify that the contained length actually is valid before retaining the buffer as otherwise we will leak memory.

Modifications:

- Verify length is valid
- Only retain buffer if we not throw exceptio
- Add unit test

Result:

Ensure we never leak memory when handling invalid messages
@normanmaurer normanmaurer added this to the 4.1.135.Final milestone Jun 1, 2026
@normanmaurer normanmaurer added the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Jun 1, 2026
@normanmaurer normanmaurer changed the title HAProxy: Reject HAProxyMessages with malformated TLV and not leak memory Motivation: HAProxy: Reject HAProxyMessages with malformated TLV and not leak memory Jun 1, 2026
@normanmaurer normanmaurer merged commit c4623e8 into 4.1 Jun 2, 2026
19 checks passed
@normanmaurer normanmaurer deleted the ha41 branch June 2, 2026 10:08
@netty-project-bot
Copy link
Copy Markdown
Contributor

Could not create auto-port PR.
Got conflicts when cherry-picking onto 5.0.

@chrisvest
Copy link
Copy Markdown
Member

Port to 5.0: #16914

@chrisvest chrisvest removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Jun 4, 2026
chrisvest added a commit that referenced this pull request Jun 5, 2026
- #16881
- #16876
- #16866
- #16870
- #16837
- #16858
- #16882
- #16893

---------

Co-authored-by: Norman Maurer <[email protected]>
Co-authored-by: Violeta Georgieva <[email protected]>
Co-authored-by: Szymon Habrainski <[email protected]>
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