Skip to content

Harden beats packet parsing#26139

Open
kroepke wants to merge 3 commits into
masterfrom
limit-beats-decoding
Open

Harden beats packet parsing#26139
kroepke wants to merge 3 commits into
masterfrom
limit-beats-decoding

Conversation

@kroepke
Copy link
Copy Markdown
Member

@kroepke kroepke commented May 27, 2026

Description

When parsing beats packets we allocated memory based on the declared frame sizes for the three possible frame types.
As the value is untrusted, we now reject unreasonable large values before allocating memory.

Motivation and Context

Malformed packets could lead to unreasonable memory allocation during beats protocol parsing.

How Has This Been Tested?

Unit tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have requested a documentation update.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@kroepke kroepke requested a review from a team May 27, 2026 15:32
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.

1 participant