Skip to content

Fix body int overflow issues in packetbeat HTTP parser, linter fixes#48563

Merged
fearful-symmetry merged 5 commits intoelastic:mainfrom
fearful-symmetry:http-body-len-check
Jan 29, 2026
Merged

Fix body int overflow issues in packetbeat HTTP parser, linter fixes#48563
fearful-symmetry merged 5 commits intoelastic:mainfrom
fearful-symmetry:http-body-len-check

Conversation

@fearful-symmetry
Copy link
Contributor

Proposed commit message

A small PR that fixes a handful of integer overflow issues in the packetbeat HTTP parser.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • I have added an entry in ./changelog/fragments using the changelog tool.
@fearful-symmetry fearful-symmetry self-assigned this Jan 27, 2026
@fearful-symmetry fearful-symmetry requested a review from a team as a code owner January 27, 2026 17:19
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 27, 2026
@github-actions
Copy link
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)
@mergify
Copy link
Contributor

mergify bot commented Jan 27, 2026

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @fearful-symmetry? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses integer overflow vulnerabilities in the packetbeat HTTP parser by adding validation checks before type conversions to uint64 and uint16. It also includes linter fixes that standardize error message formatting to lowercase.

Changes:

  • Added overflow checks for status codes, body sizes, and chunk sizes before converting to unsigned integer types
  • Standardized error messages to use lowercase formatting per linting conventions
  • Added a changelog fragment documenting the bug fix

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packetbeat/protos/http/http_parser.go Added integer overflow validation checks and standardized error message casing
changelog/fragments/1769534243-add-int-checks-to-http-parser.yaml Added changelog entry documenting the HTTP parser integer overflow bug fixes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fearful-symmetry fearful-symmetry added Team:Security-Linux Platform Linux Platform Team in Security Solution backport-active-all Automated backport with mergify to all the active branches and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jan 28, 2026
@elasticmachine
Copy link
Contributor

Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform)

@fearful-symmetry fearful-symmetry merged commit aec03cc into elastic:main Jan 29, 2026
45 checks passed
@github-actions
Copy link
Contributor

@Mergifyio backport 8.19 9.2 9.3

@mergify
Copy link
Contributor

mergify bot commented Jan 29, 2026

mergify bot pushed a commit that referenced this pull request Jan 29, 2026
…48563)

* fix body int overflow issues, linter fixes

* changelog

* linter

* linter fix

* fix error check

(cherry picked from commit aec03cc)
mergify bot pushed a commit that referenced this pull request Jan 29, 2026
…48563)

* fix body int overflow issues, linter fixes

* changelog

* linter

* linter fix

* fix error check

(cherry picked from commit aec03cc)
mergify bot pushed a commit that referenced this pull request Jan 29, 2026
…48563)

* fix body int overflow issues, linter fixes

* changelog

* linter

* linter fix

* fix error check

(cherry picked from commit aec03cc)
pierrehilbert pushed a commit that referenced this pull request Jan 30, 2026
…48563) (#48613)

* fix body int overflow issues, linter fixes

* changelog

* linter

* linter fix

* fix error check

(cherry picked from commit aec03cc)

Co-authored-by: Alex K. <8418476+fearful-symmetry@users.noreply.github.com>
pierrehilbert pushed a commit that referenced this pull request Jan 30, 2026
…48563) (#48612)

* fix body int overflow issues, linter fixes

* changelog

* linter

* linter fix

* fix error check

(cherry picked from commit aec03cc)

Co-authored-by: Alex K. <8418476+fearful-symmetry@users.noreply.github.com>
fearful-symmetry added a commit that referenced this pull request Jan 30, 2026
…48563) (#48614)

* fix body int overflow issues, linter fixes

* changelog

* linter

* linter fix

* fix error check

(cherry picked from commit aec03cc)

Co-authored-by: Alex K. <8418476+fearful-symmetry@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches Team:Security-Linux Platform Linux Platform Team in Security Solution

4 participants